summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Levin <avi.levin@samsung.com>2015-04-28 16:41:29 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2015-06-29 11:02:17 +0300
commit37c76b3920a7f09bc336ffbbb31758ff0986b7cd (patch)
treede716083076f071613950c640fc8da0faa83882c
parente68e171ba3d974b126793409af9071f8a10d1857 (diff)
elc_popup: porting evas smart callbacks to eo
-rwxr-xr-x[-rw-r--r--]src/lib/elc_popup.c56
1 files changed, 32 insertions, 24 deletions
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index 629b294ee..7cbcaa20f 100644..100755
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -83,21 +83,23 @@ _visuals_set(Evas_Object *obj)
83 elm_layout_signal_emit(sd->main_layout, "elm,state,action_area,hidden", "elm"); 83 elm_layout_signal_emit(sd->main_layout, "elm,state,action_area,hidden", "elm");
84} 84}
85 85
86static void 86static Eina_Bool
87_block_clicked_cb(void *data, 87_block_clicked_cb(void *data,
88 Evas_Object *obj EINA_UNUSED, 88 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
89 void *event_info EINA_UNUSED)
90{ 89{
91 evas_object_smart_callback_call(data, SIG_BLOCK_CLICKED, NULL); 90 eo_do(data, eo_event_callback_call(ELM_POPUP_EVENT_BLOCK_CLICKED, NULL));
91
92 return EINA_TRUE;
92} 93}
93 94
94static void 95static Eina_Bool
95_timeout_cb(void *data, 96_timeout_cb(void *data,
96 Evas_Object *obj EINA_UNUSED, 97 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
97 void *event_info EINA_UNUSED)
98{ 98{
99 evas_object_hide(data); 99 evas_object_hide(data);
100 evas_object_smart_callback_call(data, SIG_TIMEOUT, NULL); 100 eo_do(data, eo_event_callback_call(ELM_POPUP_EVENT_TIMEOUT, NULL));
101
102 return EINA_TRUE;
101} 103}
102 104
103static Evas_Object * 105static Evas_Object *
@@ -196,9 +198,10 @@ _elm_popup_evas_object_smart_del(Eo *obj, Elm_Popup_Data *sd)
196 evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_RESIZE, _parent_geom_cb, obj); 198 evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_RESIZE, _parent_geom_cb, obj);
197 evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_MOVE, _parent_geom_cb, obj); 199 evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_MOVE, _parent_geom_cb, obj);
198 200
199 evas_object_smart_callback_del 201 eo_do(sd->notify, eo_event_callback_del(
200 (sd->notify, "block,clicked", _block_clicked_cb); 202 ELM_POPUP_EVENT_BLOCK_CLICKED, _block_clicked_cb, obj));
201 evas_object_smart_callback_del(sd->notify, "timeout", _timeout_cb); 203 eo_do(sd->notify, eo_event_callback_del(
204 ELM_POPUP_EVENT_TIMEOUT, _timeout_cb, obj));
202 evas_object_event_callback_del 205 evas_object_event_callback_del
203 (sd->content, EVAS_CALLBACK_DEL, _on_content_del); 206 (sd->content, EVAS_CALLBACK_DEL, _on_content_del);
204 evas_object_event_callback_del(obj, EVAS_CALLBACK_SHOW, _on_show); 207 evas_object_event_callback_del(obj, EVAS_CALLBACK_SHOW, _on_show);
@@ -765,24 +768,26 @@ _elm_popup_item_elm_widget_item_signal_emit(Eo *eo_it EINA_UNUSED, Elm_Popup_Ite
765 elm_layout_signal_emit(VIEW(it), emission, source); 768 elm_layout_signal_emit(VIEW(it), emission, source);
766} 769}
767 770
768static void 771static Eina_Bool
769_item_focused_cb(void *data, 772_item_focused_cb(void *data,
770 Evas_Object *obj EINA_UNUSED, 773 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
771 void *event_info EINA_UNUSED)
772{ 774{
773 Elm_Popup_Item_Data *it = data; 775 Elm_Popup_Item_Data *it = data;
774 776
775 evas_object_smart_callback_call(WIDGET(it), SIG_ITEM_FOCUSED, EO_OBJ(it)); 777 eo_do(WIDGET(it), eo_event_callback_call(ELM_POPUP_EVENT_ITEM_FOCUSED, EO_OBJ(it)));
778
779 return EINA_TRUE;
776} 780}
777 781
778static void 782static Eina_Bool
779_item_unfocused_cb(void *data, 783_item_unfocused_cb(void *data,
780 Evas_Object *obj EINA_UNUSED, 784 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
781 void *event_info EINA_UNUSED)
782{ 785{
783 Elm_Popup_Item_Data *it = data; 786 Elm_Popup_Item_Data *it = data;
784 787
785 evas_object_smart_callback_call(WIDGET(it), SIG_ITEM_UNFOCUSED, EO_OBJ(it)); 788 eo_do(WIDGET(it), eo_event_callback_call(ELM_POPUP_EVENT_ITEM_UNFOCUSED, EO_OBJ(it)));
789
790 return EINA_TRUE;
786} 791}
787 792
788EOLIAN static Eo * 793EOLIAN static Eo *
@@ -810,8 +815,10 @@ _item_new(Elm_Popup_Item_Data *it)
810 elm_layout_signal_callback_add(VIEW(it), "elm,action,click", "*", 815 elm_layout_signal_callback_add(VIEW(it), "elm,action,click", "*",
811 _item_select_cb, it); 816 _item_select_cb, it);
812 evas_object_size_hint_align_set(VIEW(it), EVAS_HINT_FILL, EVAS_HINT_FILL); 817 evas_object_size_hint_align_set(VIEW(it), EVAS_HINT_FILL, EVAS_HINT_FILL);
813 evas_object_smart_callback_add(VIEW(it), SIG_LAYOUT_FOCUSED, _item_focused_cb, it); 818 eo_do(VIEW(it), eo_event_callback_add
814 evas_object_smart_callback_add(VIEW(it), SIG_LAYOUT_UNFOCUSED, _item_unfocused_cb, it); 819 (ELM_LAYOUT_EVENT_FOCUSED, _item_focused_cb, it));
820 eo_do(VIEW(it), eo_event_callback_add
821 (ELM_LAYOUT_EVENT_UNFOCUSED, _item_unfocused_cb, it));
815 evas_object_show(VIEW(it)); 822 evas_object_show(VIEW(it));
816 } 823 }
817} 824}
@@ -1439,10 +1446,11 @@ _elm_popup_evas_object_smart_add(Eo *obj, Elm_Popup_Data *priv)
1439 _size_hints_changed_cb, obj); 1446 _size_hints_changed_cb, obj);
1440 1447
1441 priv->content_text_wrap_type = ELM_WRAP_MIXED; 1448 priv->content_text_wrap_type = ELM_WRAP_MIXED;
1442 evas_object_smart_callback_add 1449 eo_do(priv->notify, eo_event_callback_add
1443 (priv->notify, "block,clicked", _block_clicked_cb, obj); 1450 (ELM_POPUP_EVENT_BLOCK_CLICKED,_block_clicked_cb, obj));
1444 1451
1445 evas_object_smart_callback_add(priv->notify, "timeout", _timeout_cb, obj); 1452 eo_do(priv->notify, eo_event_callback_add
1453 (ELM_POPUP_EVENT_TIMEOUT, _timeout_cb, obj));
1446 1454
1447 elm_widget_can_focus_set(obj, EINA_TRUE); 1455 elm_widget_can_focus_set(obj, EINA_TRUE);
1448 elm_widget_can_focus_set(priv->main_layout, EINA_TRUE); 1456 elm_widget_can_focus_set(priv->main_layout, EINA_TRUE);