summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Levin <avi.levin@samsung.com>2015-04-29 17:45:24 +0300
committerAvi Levin <avi.levin@samsung.com>2015-06-29 17:03:30 +0300
commit96c0ab939ecfff6b2f828156234ab281aae9c40b (patch)
tree7e6c839a6f64a3e3ea94903cd6db689710967ed9
parent0682b0e52541e5b53e4168f0f83d7765da80b39d (diff)
elm_photo: porting evas smart callbacks to eo
-rw-r--r--src/lib/elm_photo.c18
-rw-r--r--src/lib/elm_photo.eo5
2 files changed, 10 insertions, 13 deletions
diff --git a/src/lib/elm_photo.c b/src/lib/elm_photo.c
index 00c113d40..fc214da57 100644
--- a/src/lib/elm_photo.c
+++ b/src/lib/elm_photo.c
@@ -109,7 +109,7 @@ _drag_done_cb(void *unused EINA_UNUSED,
109 ELM_PHOTO_DATA_GET(obj, sd); 109 ELM_PHOTO_DATA_GET(obj, sd);
110 110
111 elm_object_scroll_freeze_pop(obj); 111 elm_object_scroll_freeze_pop(obj);
112 evas_object_smart_callback_call(obj, SIG_DRAG_END, NULL); 112 eo_do(obj, eo_event_callback_call(EVAS_DRAGGABLE_INTERFACE_EVENT_DRAG_END, NULL));
113 sd->drag_started = EINA_FALSE; 113 sd->drag_started = EINA_FALSE;
114} 114}
115 115
@@ -171,7 +171,8 @@ _long_press_cb(void *obj)
171 _drag_done_cb, NULL)) 171 _drag_done_cb, NULL))
172 { 172 {
173 elm_object_scroll_freeze_push(obj); 173 elm_object_scroll_freeze_push(obj);
174 evas_object_smart_callback_call(obj, SIG_DRAG_START, NULL); 174 eo_do(obj, eo_event_callback_call
175 (EVAS_DRAGGABLE_INTERFACE_EVENT_DRAG_START, NULL));
175 sd->drag_started = EINA_TRUE; 176 sd->drag_started = EINA_TRUE;
176 } 177 }
177 } 178 }
@@ -213,7 +214,7 @@ _mouse_up(void *data,
213 ELM_SAFE_FREE(sd->long_press_timer, ecore_timer_del); 214 ELM_SAFE_FREE(sd->long_press_timer, ecore_timer_del);
214 215
215 if (!sd->drag_started) 216 if (!sd->drag_started)
216 evas_object_smart_callback_call(data, SIG_CLICKED, NULL); 217 eo_do(data, eo_event_callback_call(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, NULL));
217} 218}
218 219
219static inline int 220static inline int
@@ -241,12 +242,13 @@ _elm_photo_internal_image_follow(Evas_Object *obj)
241 (img, EVAS_CALLBACK_RESIZE, _icon_move_resize_cb, obj); 242 (img, EVAS_CALLBACK_RESIZE, _icon_move_resize_cb, obj);
242} 243}
243 244
244static void 245static Eina_Bool
245_on_thumb_done(void *data, 246_on_thumb_done(void *data,
246 Evas_Object *obj EINA_UNUSED, 247 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
247 void *event EINA_UNUSED)
248{ 248{
249 _elm_photo_internal_image_follow(data); 249 _elm_photo_internal_image_follow(data);
250
251 return EINA_TRUE;
250} 252}
251 253
252EOLIAN static void 254EOLIAN static void
@@ -274,8 +276,8 @@ _elm_photo_evas_object_smart_add(Eo *obj, Elm_Photo_Data *priv)
274 evas_object_event_callback_add 276 evas_object_event_callback_add
275 (priv->icon, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, obj); 277 (priv->icon, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, obj);
276 278
277 evas_object_smart_callback_add 279 eo_do(priv->icon, eo_event_callback_add
278 (priv->icon, "thumb,done", _on_thumb_done, obj); 280 (ELM_ICON_EVENT_THUMB_DONE, _on_thumb_done, obj));
279 281
280 _elm_photo_internal_image_follow(obj); 282 _elm_photo_internal_image_follow(obj);
281 283
diff --git a/src/lib/elm_photo.eo b/src/lib/elm_photo.eo
index 2ff4c7d6f..67c2c844f 100644
--- a/src/lib/elm_photo.eo
+++ b/src/lib/elm_photo.eo
@@ -93,10 +93,5 @@ class Elm.Photo (Elm.Widget, Efl.File, Evas.Clickable_Interface, Evas.Draggable_
93 Evas.Object_Smart.del; 93 Evas.Object_Smart.del;
94 Elm.Widget.theme_apply; 94 Elm.Widget.theme_apply;
95 } 95 }
96 events {
97 clicked;
98 drag,start;
99 drag,end;
100 }
101 96
102} 97}