efl_ui_action_connector: rename clickable_util to action_connector

efl_ui_clickable_util was only for efl_input_clickable interface,
but there can be more cases which want to connect object event
to specific action interfaces (such as scrolling) in the future.
For that extension, efl_ui_action_connector seems better.

ref: T7847

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9486
This commit is contained in:
WooHyun Jung 2019-08-02 05:03:38 +00:00 committed by Marcel Hollerbach
parent d9198f10a9
commit 53649030db
12 changed files with 24 additions and 24 deletions

View File

@ -246,7 +246,7 @@ typedef Eo Efl_Ui_Spotlight_Indicator;
# include <efl_ui_navigation_bar_part.eo.h> # include <efl_ui_navigation_bar_part.eo.h>
# include <efl_ui_navigation_bar_part_back_button.eo.h> # include <efl_ui_navigation_bar_part_back_button.eo.h>
# include <efl_ui_navigation_layout.eo.h> # include <efl_ui_navigation_layout.eo.h>
# include <efl_ui_clickable_util.eo.h> # include <efl_ui_action_connector.eo.h>
# include <efl_ui_format.eo.h> # include <efl_ui_format.eo.h>
# include <efl_ui_spin.eo.h> # include <efl_ui_spin.eo.h>
# include <efl_ui_spin_button.eo.h> # include <efl_ui_spin_button.eo.h>

View File

@ -9,7 +9,7 @@
typedef struct { typedef struct {
} Efl_Ui_Clickable_Util_Data; } Efl_Ui_Action_Connector_Data;
static void static void
_on_press_cb(void *data, _on_press_cb(void *data,
@ -47,14 +47,14 @@ _theme_move_cb(void *data, const Efl_Event *ev EINA_UNUSED)
efl_input_clickable_button_state_reset(data, 1); efl_input_clickable_button_state_reset(data, 1);
} }
EFL_CALLBACKS_ARRAY_DEFINE(bind_to_theme_callbacks, EFL_CALLBACKS_ARRAY_DEFINE(bind_clickable_to_theme_callbacks,
{EFL_EVENT_POINTER_MOVE, _theme_move_cb}, {EFL_EVENT_POINTER_MOVE, _theme_move_cb},
) )
EOLIAN static void EOLIAN static void
_efl_ui_clickable_util_bind_to_theme(Efl_Canvas_Layout *object, Efl_Input_Clickable *clickable) _efl_ui_action_connector_bind_clickable_to_theme(Efl_Canvas_Layout *object, Efl_Input_Clickable *clickable)
{ {
efl_event_callback_array_add(object, bind_to_theme_callbacks(), clickable); efl_event_callback_array_add(object, bind_clickable_to_theme_callbacks(), clickable);
efl_layout_signal_callback_add(object, "efl,action,press", "*", clickable, _on_press_cb, NULL); efl_layout_signal_callback_add(object, "efl,action,press", "*", clickable, _on_press_cb, NULL);
efl_layout_signal_callback_add(object, "efl,action,unpress", "*", clickable, _on_unpress_cb, NULL); efl_layout_signal_callback_add(object, "efl,action,unpress", "*", clickable, _on_unpress_cb, NULL);
@ -96,16 +96,16 @@ _unpress_cb(void *data, const Efl_Event *ev EINA_UNUSED)
} }
} }
EFL_CALLBACKS_ARRAY_DEFINE(bind_to_object_callbacks, EFL_CALLBACKS_ARRAY_DEFINE(bind_clickable_to_object_callbacks,
{EFL_EVENT_POINTER_DOWN, _press_cb}, {EFL_EVENT_POINTER_DOWN, _press_cb},
{EFL_EVENT_POINTER_UP, _unpress_cb}, {EFL_EVENT_POINTER_UP, _unpress_cb},
) )
EOLIAN static void EOLIAN static void
_efl_ui_clickable_util_bind_to_object(Efl_Input_Interface *object, Efl_Input_Clickable *clickable) _efl_ui_action_connector_bind_clickable_to_object(Efl_Input_Interface *object, Efl_Input_Clickable *clickable)
{ {
efl_event_callback_array_add(object, bind_to_object_callbacks(), clickable); efl_event_callback_array_add(object, bind_clickable_to_object_callbacks(), clickable);
} }
#include "efl_ui_clickable_util.eo.c" #include "efl_ui_action_connector.eo.c"

View File

@ -1,10 +1,10 @@
class @beta Efl.Ui.Clickable_Util { class @beta Efl.Ui.Action_Connector {
[[Helper class that connects theme signals or object events to the @Efl.Input.Clickable interface. [[Helper class that connects theme signals or object events to the interfaces which are for actions.
This simplifies creating widgets that implement the @Efl.Input.Clickable interface. For example, this simplifies creating widgets that implement the @Efl.Input.Clickable interface.
]] ]]
methods { methods {
bind_to_theme @class { bind_clickable_to_theme @class {
[[This will listen to the standard "click" events on a theme and emit the appropriate [[This will listen to the standard "click" events on a theme and emit the appropriate
events through the @Efl.Input.Clickable interface. events through the @Efl.Input.Clickable interface.
@ -19,7 +19,7 @@ class @beta Efl.Ui.Clickable_Util {
clickable : Efl.Input.Clickable; [[The object to call the clickable methods on.]] clickable : Efl.Input.Clickable; [[The object to call the clickable methods on.]]
} }
} }
bind_to_object @class { bind_clickable_to_object @class {
[[This will listen to the standard "click" events on an object, and emit the appropriate [[This will listen to the standard "click" events on an object, and emit the appropriate
events through the @Efl.Input.Clickable interface. events through the @Efl.Input.Clickable interface.

View File

@ -247,7 +247,7 @@ _efl_ui_button_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Button_Data *_pd EINA_
edje_object_signal_callback_add edje_object_signal_callback_add
(wd->resize_obj, "efl,action,unpress", "*", (wd->resize_obj, "efl,action,unpress", "*",
_on_unpressed_signal, obj); _on_unpressed_signal, obj);
efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj); efl_ui_action_connector_bind_clickable_to_theme(wd->resize_obj, obj);
} }
_elm_access_object_register(obj, wd->resize_obj); _elm_access_object_register(obj, wd->resize_obj);

View File

@ -310,7 +310,7 @@ _efl_ui_check_efl_object_constructor(Eo *obj, Efl_Ui_Check_Data *pd EINA_UNUSED)
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj); efl_ui_action_connector_bind_clickable_to_theme(wd->resize_obj, obj);
if (elm_widget_is_legacy(obj)) if (elm_widget_is_legacy(obj))
{ {
efl_layout_signal_callback_add efl_layout_signal_callback_add

View File

@ -142,7 +142,7 @@ _efl_ui_frame_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Frame_Data *_pd EINA_UN
edje_object_signal_callback_add edje_object_signal_callback_add
(wd->resize_obj, "efl,anim,done", "efl", (wd->resize_obj, "efl,anim,done", "efl",
_on_recalc_done, obj); _on_recalc_done, obj);
efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj); efl_ui_action_connector_bind_clickable_to_theme(wd->resize_obj, obj);
efl_event_callback_add(obj, EFL_INPUT_EVENT_CLICKED, _clicked_cb, obj); efl_event_callback_add(obj, EFL_INPUT_EVENT_CLICKED, _clicked_cb, obj);
} }

View File

@ -584,7 +584,7 @@ _efl_ui_image_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Image_Data *priv)
} }
else else
{ {
efl_ui_clickable_util_bind_to_object(priv->hit_rect, obj); efl_ui_action_connector_bind_clickable_to_object(priv->hit_rect, obj);
} }
priv->smooth = EINA_TRUE; priv->smooth = EINA_TRUE;

View File

@ -1849,7 +1849,7 @@ _efl_ui_image_zoomable_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Image_Zoomable
(priv->img, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, obj); (priv->img, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, obj);
evas_object_event_callback_add evas_object_event_callback_add
(priv->img, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj); (priv->img, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj);
efl_ui_clickable_util_bind_to_object(priv->img, obj); efl_ui_action_connector_bind_clickable_to_object(priv->img, obj);
evas_object_image_scale_hint_set(priv->img, EVAS_IMAGE_SCALE_HINT_STATIC); evas_object_image_scale_hint_set(priv->img, EVAS_IMAGE_SCALE_HINT_STATIC);
/* XXX: mmm... */ /* XXX: mmm... */

View File

@ -223,7 +223,7 @@ _efl_ui_item_efl_object_finalize(Eo *obj, Efl_Ui_Item_Data *pd EINA_UNUSED)
/* Support Item Focus Feature */ /* Support Item Focus Feature */
elm_widget_can_focus_set(obj, EINA_TRUE); elm_widget_can_focus_set(obj, EINA_TRUE);
efl_ui_clickable_util_bind_to_object(wd->resize_obj, obj); efl_ui_action_connector_bind_clickable_to_object(wd->resize_obj, obj);
return eo; return eo;
} }

View File

@ -438,7 +438,7 @@ _efl_ui_panes_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Panes_Data *_pd EINA_UN
} }
else else
{ {
efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj); efl_ui_action_connector_bind_clickable_to_theme(wd->resize_obj, obj);
} }
evas_object_event_callback_add evas_object_event_callback_add
(wd->resize_obj, EVAS_CALLBACK_RESIZE, (wd->resize_obj, EVAS_CALLBACK_RESIZE,

View File

@ -2189,7 +2189,7 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
(sd->entry_edje, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj); (sd->entry_edje, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj);
evas_object_event_callback_add evas_object_event_callback_add
(sd->entry_edje, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, obj); (sd->entry_edje, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, obj);
efl_ui_clickable_util_bind_to_object(sd->entry_edje, obj); efl_ui_action_connector_bind_clickable_to_object(sd->entry_edje, obj);
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
_text_size_changed_cb, obj); _text_size_changed_cb, obj);

View File

@ -176,7 +176,7 @@ pub_eo_files = [
'efl_ui_caching_factory.eo', 'efl_ui_caching_factory.eo',
'efl_ui_widget_factory.eo', 'efl_ui_widget_factory.eo',
'efl_ui_relative_layout.eo', 'efl_ui_relative_layout.eo',
'efl_ui_clickable_util.eo', 'efl_ui_action_connector.eo',
'efl_ui_format.eo', 'efl_ui_format.eo',
'efl_ui_collection.eo', 'efl_ui_collection.eo',
'efl_ui_position_manager_entity.eo', 'efl_ui_position_manager_entity.eo',
@ -929,7 +929,7 @@ elementary_src = [
'efl_ui_exact_model.c', 'efl_ui_exact_model.c',
'efl_ui_average_model.c', 'efl_ui_average_model.c',
'efl_ui_relative_layout.c', 'efl_ui_relative_layout.c',
'efl_ui_clickable_util.c', 'efl_ui_action_connector.c',
'efl_ui_format.c', 'efl_ui_format.c',
'efl_ui_scroll_util.c', 'efl_ui_scroll_util.c',
'efl_ui_collection.c', 'efl_ui_collection.c',