summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWooHyun Jung <wh0705.jung@samsung.com>2019-08-02 05:03:38 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-05 17:44:32 +0200
commit53649030db9a46dd7a25a2cc41bc1d7d7a1b2460 (patch)
treebc18a547a877377ab8b642ecb05e8fef4924011e
parentd9198f10a96c14512f2319e93121681c452896aa (diff)
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
-rw-r--r--src/lib/elementary/Efl_Ui.h2
-rw-r--r--src/lib/elementary/efl_ui_action_connector.c (renamed from src/lib/elementary/efl_ui_clickable_util.c)16
-rw-r--r--src/lib/elementary/efl_ui_action_connector.eo (renamed from src/lib/elementary/efl_ui_clickable_util.eo)10
-rw-r--r--src/lib/elementary/efl_ui_button.c2
-rw-r--r--src/lib/elementary/efl_ui_check.c2
-rw-r--r--src/lib/elementary/efl_ui_frame.c2
-rw-r--r--src/lib/elementary/efl_ui_image.c2
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.c2
-rw-r--r--src/lib/elementary/efl_ui_item.c2
-rw-r--r--src/lib/elementary/efl_ui_panes.c2
-rw-r--r--src/lib/elementary/efl_ui_text.c2
-rw-r--r--src/lib/elementary/meson.build4
12 files changed, 24 insertions, 24 deletions
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index 4ed285771f..56fe6a7d5e 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -246,7 +246,7 @@ typedef Eo Efl_Ui_Spotlight_Indicator;
246# include <efl_ui_navigation_bar_part.eo.h> 246# include <efl_ui_navigation_bar_part.eo.h>
247# include <efl_ui_navigation_bar_part_back_button.eo.h> 247# include <efl_ui_navigation_bar_part_back_button.eo.h>
248# include <efl_ui_navigation_layout.eo.h> 248# include <efl_ui_navigation_layout.eo.h>
249# include <efl_ui_clickable_util.eo.h> 249# include <efl_ui_action_connector.eo.h>
250# include <efl_ui_format.eo.h> 250# include <efl_ui_format.eo.h>
251# include <efl_ui_spin.eo.h> 251# include <efl_ui_spin.eo.h>
252# include <efl_ui_spin_button.eo.h> 252# include <efl_ui_spin_button.eo.h>
diff --git a/src/lib/elementary/efl_ui_clickable_util.c b/src/lib/elementary/efl_ui_action_connector.c
index 8e1c74f8a7..2d3dace64a 100644
--- a/src/lib/elementary/efl_ui_clickable_util.c
+++ b/src/lib/elementary/efl_ui_action_connector.c
@@ -9,7 +9,7 @@
9 9
10typedef struct { 10typedef struct {
11 11
12} Efl_Ui_Clickable_Util_Data; 12} Efl_Ui_Action_Connector_Data;
13 13
14static void 14static void
15_on_press_cb(void *data, 15_on_press_cb(void *data,
@@ -47,14 +47,14 @@ _theme_move_cb(void *data, const Efl_Event *ev EINA_UNUSED)
47 efl_input_clickable_button_state_reset(data, 1); 47 efl_input_clickable_button_state_reset(data, 1);
48} 48}
49 49
50EFL_CALLBACKS_ARRAY_DEFINE(bind_to_theme_callbacks, 50EFL_CALLBACKS_ARRAY_DEFINE(bind_clickable_to_theme_callbacks,
51 {EFL_EVENT_POINTER_MOVE, _theme_move_cb}, 51 {EFL_EVENT_POINTER_MOVE, _theme_move_cb},
52) 52)
53 53
54EOLIAN static void 54EOLIAN static void
55_efl_ui_clickable_util_bind_to_theme(Efl_Canvas_Layout *object, Efl_Input_Clickable *clickable) 55_efl_ui_action_connector_bind_clickable_to_theme(Efl_Canvas_Layout *object, Efl_Input_Clickable *clickable)
56{ 56{
57 efl_event_callback_array_add(object, bind_to_theme_callbacks(), clickable); 57 efl_event_callback_array_add(object, bind_clickable_to_theme_callbacks(), clickable);
58 58
59 efl_layout_signal_callback_add(object, "efl,action,press", "*", clickable, _on_press_cb, NULL); 59 efl_layout_signal_callback_add(object, "efl,action,press", "*", clickable, _on_press_cb, NULL);
60 efl_layout_signal_callback_add(object, "efl,action,unpress", "*", clickable, _on_unpress_cb, NULL); 60 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)
96 } 96 }
97} 97}
98 98
99EFL_CALLBACKS_ARRAY_DEFINE(bind_to_object_callbacks, 99EFL_CALLBACKS_ARRAY_DEFINE(bind_clickable_to_object_callbacks,
100 {EFL_EVENT_POINTER_DOWN, _press_cb}, 100 {EFL_EVENT_POINTER_DOWN, _press_cb},
101 {EFL_EVENT_POINTER_UP, _unpress_cb}, 101 {EFL_EVENT_POINTER_UP, _unpress_cb},
102) 102)
103 103
104EOLIAN static void 104EOLIAN static void
105_efl_ui_clickable_util_bind_to_object(Efl_Input_Interface *object, Efl_Input_Clickable *clickable) 105_efl_ui_action_connector_bind_clickable_to_object(Efl_Input_Interface *object, Efl_Input_Clickable *clickable)
106{ 106{
107 efl_event_callback_array_add(object, bind_to_object_callbacks(), clickable); 107 efl_event_callback_array_add(object, bind_clickable_to_object_callbacks(), clickable);
108} 108}
109 109
110 110
111#include "efl_ui_clickable_util.eo.c" 111#include "efl_ui_action_connector.eo.c"
diff --git a/src/lib/elementary/efl_ui_clickable_util.eo b/src/lib/elementary/efl_ui_action_connector.eo
index 5db5e67a5c..40fda6a6e6 100644
--- a/src/lib/elementary/efl_ui_clickable_util.eo
+++ b/src/lib/elementary/efl_ui_action_connector.eo
@@ -1,10 +1,10 @@
1class @beta Efl.Ui.Clickable_Util { 1class @beta Efl.Ui.Action_Connector {
2 [[Helper class that connects theme signals or object events to the @Efl.Input.Clickable interface. 2 [[Helper class that connects theme signals or object events to the interfaces which are for actions.
3 3
4 This simplifies creating widgets that implement the @Efl.Input.Clickable interface. 4 For example, this simplifies creating widgets that implement the @Efl.Input.Clickable interface.
5 ]] 5 ]]
6 methods { 6 methods {
7 bind_to_theme @class { 7 bind_clickable_to_theme @class {
8 [[This will listen to the standard "click" events on a theme and emit the appropriate 8 [[This will listen to the standard "click" events on a theme and emit the appropriate
9 events through the @Efl.Input.Clickable interface. 9 events through the @Efl.Input.Clickable interface.
10 10
@@ -19,7 +19,7 @@ class @beta Efl.Ui.Clickable_Util {
19 clickable : Efl.Input.Clickable; [[The object to call the clickable methods on.]] 19 clickable : Efl.Input.Clickable; [[The object to call the clickable methods on.]]
20 } 20 }
21 } 21 }
22 bind_to_object @class { 22 bind_clickable_to_object @class {
23 [[This will listen to the standard "click" events on an object, and emit the appropriate 23 [[This will listen to the standard "click" events on an object, and emit the appropriate
24 events through the @Efl.Input.Clickable interface. 24 events through the @Efl.Input.Clickable interface.
25 25
diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c
index 8292d2985f..f71fb3e0ad 100644
--- a/src/lib/elementary/efl_ui_button.c
+++ b/src/lib/elementary/efl_ui_button.c
@@ -247,7 +247,7 @@ _efl_ui_button_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Button_Data *_pd EINA_
247 edje_object_signal_callback_add 247 edje_object_signal_callback_add
248 (wd->resize_obj, "efl,action,unpress", "*", 248 (wd->resize_obj, "efl,action,unpress", "*",
249 _on_unpressed_signal, obj); 249 _on_unpressed_signal, obj);
250 efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj); 250 efl_ui_action_connector_bind_clickable_to_theme(wd->resize_obj, obj);
251 } 251 }
252 252
253 _elm_access_object_register(obj, wd->resize_obj); 253 _elm_access_object_register(obj, wd->resize_obj);
diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c
index 87bc965a36..fd562191e0 100644
--- a/src/lib/elementary/efl_ui_check.c
+++ b/src/lib/elementary/efl_ui_check.c
@@ -310,7 +310,7 @@ _efl_ui_check_efl_object_constructor(Eo *obj, Efl_Ui_Check_Data *pd EINA_UNUSED)
310 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); 310 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
311 311
312 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 312 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
313 efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj); 313 efl_ui_action_connector_bind_clickable_to_theme(wd->resize_obj, obj);
314 if (elm_widget_is_legacy(obj)) 314 if (elm_widget_is_legacy(obj))
315 { 315 {
316 efl_layout_signal_callback_add 316 efl_layout_signal_callback_add
diff --git a/src/lib/elementary/efl_ui_frame.c b/src/lib/elementary/efl_ui_frame.c
index 2ae9a1b53c..4f8891a0cc 100644
--- a/src/lib/elementary/efl_ui_frame.c
+++ b/src/lib/elementary/efl_ui_frame.c
@@ -142,7 +142,7 @@ _efl_ui_frame_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Frame_Data *_pd EINA_UN
142 edje_object_signal_callback_add 142 edje_object_signal_callback_add
143 (wd->resize_obj, "efl,anim,done", "efl", 143 (wd->resize_obj, "efl,anim,done", "efl",
144 _on_recalc_done, obj); 144 _on_recalc_done, obj);
145 efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj); 145 efl_ui_action_connector_bind_clickable_to_theme(wd->resize_obj, obj);
146 efl_event_callback_add(obj, EFL_INPUT_EVENT_CLICKED, _clicked_cb, obj); 146 efl_event_callback_add(obj, EFL_INPUT_EVENT_CLICKED, _clicked_cb, obj);
147 } 147 }
148 148
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 239a099064..342c9d2d56 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -584,7 +584,7 @@ _efl_ui_image_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Image_Data *priv)
584 } 584 }
585 else 585 else
586 { 586 {
587 efl_ui_clickable_util_bind_to_object(priv->hit_rect, obj); 587 efl_ui_action_connector_bind_clickable_to_object(priv->hit_rect, obj);
588 } 588 }
589 589
590 priv->smooth = EINA_TRUE; 590 priv->smooth = EINA_TRUE;
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index bdb42cde08..6b529d210d 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -1849,7 +1849,7 @@ _efl_ui_image_zoomable_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Image_Zoomable
1849 (priv->img, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, obj); 1849 (priv->img, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, obj);
1850 evas_object_event_callback_add 1850 evas_object_event_callback_add
1851 (priv->img, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj); 1851 (priv->img, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj);
1852 efl_ui_clickable_util_bind_to_object(priv->img, obj); 1852 efl_ui_action_connector_bind_clickable_to_object(priv->img, obj);
1853 evas_object_image_scale_hint_set(priv->img, EVAS_IMAGE_SCALE_HINT_STATIC); 1853 evas_object_image_scale_hint_set(priv->img, EVAS_IMAGE_SCALE_HINT_STATIC);
1854 1854
1855 /* XXX: mmm... */ 1855 /* XXX: mmm... */
diff --git a/src/lib/elementary/efl_ui_item.c b/src/lib/elementary/efl_ui_item.c
index edbfd74937..c0c863bf73 100644
--- a/src/lib/elementary/efl_ui_item.c
+++ b/src/lib/elementary/efl_ui_item.c
@@ -223,7 +223,7 @@ _efl_ui_item_efl_object_finalize(Eo *obj, Efl_Ui_Item_Data *pd EINA_UNUSED)
223 /* Support Item Focus Feature */ 223 /* Support Item Focus Feature */
224 elm_widget_can_focus_set(obj, EINA_TRUE); 224 elm_widget_can_focus_set(obj, EINA_TRUE);
225 225
226 efl_ui_clickable_util_bind_to_object(wd->resize_obj, obj); 226 efl_ui_action_connector_bind_clickable_to_object(wd->resize_obj, obj);
227 return eo; 227 return eo;
228} 228}
229 229
diff --git a/src/lib/elementary/efl_ui_panes.c b/src/lib/elementary/efl_ui_panes.c
index d818ec0fcc..30f5770a90 100644
--- a/src/lib/elementary/efl_ui_panes.c
+++ b/src/lib/elementary/efl_ui_panes.c
@@ -438,7 +438,7 @@ _efl_ui_panes_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Panes_Data *_pd EINA_UN
438 } 438 }
439 else 439 else
440 { 440 {
441 efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj); 441 efl_ui_action_connector_bind_clickable_to_theme(wd->resize_obj, obj);
442 } 442 }
443 evas_object_event_callback_add 443 evas_object_event_callback_add
444 (wd->resize_obj, EVAS_CALLBACK_RESIZE, 444 (wd->resize_obj, EVAS_CALLBACK_RESIZE,
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 7a90a63827..3adfade9c3 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -2189,7 +2189,7 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
2189 (sd->entry_edje, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj); 2189 (sd->entry_edje, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj);
2190 evas_object_event_callback_add 2190 evas_object_event_callback_add
2191 (sd->entry_edje, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, obj); 2191 (sd->entry_edje, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, obj);
2192 efl_ui_clickable_util_bind_to_object(sd->entry_edje, obj); 2192 efl_ui_action_connector_bind_clickable_to_object(sd->entry_edje, obj);
2193 2193
2194 efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, 2194 efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
2195 _text_size_changed_cb, obj); 2195 _text_size_changed_cb, obj);
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 3216383f41..0ca268998b 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -176,7 +176,7 @@ pub_eo_files = [
176 'efl_ui_caching_factory.eo', 176 'efl_ui_caching_factory.eo',
177 'efl_ui_widget_factory.eo', 177 'efl_ui_widget_factory.eo',
178 'efl_ui_relative_layout.eo', 178 'efl_ui_relative_layout.eo',
179 'efl_ui_clickable_util.eo', 179 'efl_ui_action_connector.eo',
180 'efl_ui_format.eo', 180 'efl_ui_format.eo',
181 'efl_ui_collection.eo', 181 'efl_ui_collection.eo',
182 'efl_ui_position_manager_entity.eo', 182 'efl_ui_position_manager_entity.eo',
@@ -929,7 +929,7 @@ elementary_src = [
929 'efl_ui_exact_model.c', 929 'efl_ui_exact_model.c',
930 'efl_ui_average_model.c', 930 'efl_ui_average_model.c',
931 'efl_ui_relative_layout.c', 931 'efl_ui_relative_layout.c',
932 'efl_ui_clickable_util.c', 932 'efl_ui_action_connector.c',
933 'efl_ui_format.c', 933 'efl_ui_format.c',
934 'efl_ui_scroll_util.c', 934 'efl_ui_scroll_util.c',
935 'efl_ui_collection.c', 935 'efl_ui_collection.c',