jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=9bdf0e86ee09d790746dc45f49db8e753463e06e

commit 9bdf0e86ee09d790746dc45f49db8e753463e06e
Author: Avi Levin <avi.le...@samsung.com>
Date:   Sun May 10 11:50:37 2015 +0300

    elm_scroller: porting evas smart callbacks to eo
---
 src/lib/elm_scroller.c  | 46 ++++++++++++++++++++++++++--------------------
 src/lib/elm_scroller.eo | 18 +++++++++++++++++-
 2 files changed, 43 insertions(+), 21 deletions(-)

diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c
index 07ec426..98f103b 100644
--- a/src/lib/elm_scroller.c
+++ b/src/lib/elm_scroller.c
@@ -491,140 +491,146 @@ static void
 _edge_left_cb(Evas_Object *obj,
               void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_EDGE_LEFT, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_EDGE_LEFT, NULL));
 }
 
 static void
 _edge_right_cb(Evas_Object *obj,
                void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_EDGE_RIGHT, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_EDGE_RIGHT, NULL));
 }
 
 static void
 _edge_top_cb(Evas_Object *obj,
              void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_EDGE_TOP, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_EDGE_TOP, NULL));
 }
 
 static void
 _edge_bottom_cb(Evas_Object *obj,
                 void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_EDGE_BOTTOM, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_EDGE_BOTTOM, NULL));
 }
 
 static void
 _scroll_cb(Evas_Object *obj,
            void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL, NULL);
+   eo_do(obj, eo_event_callback_call
+     (EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL, NULL));
 }
 
 static void
 _scroll_left_cb(Evas_Object *obj,
            void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL_LEFT, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_SCROLL_LEFT, NULL));
 }
 
 static void
 _scroll_right_cb(Evas_Object *obj,
            void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL_RIGHT, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_SCROLL_RIGHT, NULL));
 }
 
 static void
 _scroll_up_cb(Evas_Object *obj,
            void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL_UP, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_SCROLL_UP, NULL));
 }
 
 static void
 _scroll_down_cb(Evas_Object *obj,
            void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL_DOWN, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_SCROLL_DOWN, NULL));
 }
 
 static void
 _scroll_anim_start_cb(Evas_Object *obj,
                       void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL_ANIM_START, NULL);
+   eo_do(obj, eo_event_callback_call
+     (EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_ANIM_START, NULL));
 }
 
 static void
 _scroll_anim_stop_cb(Evas_Object *obj,
                      void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL_ANIM_STOP, NULL);
+   eo_do(obj, eo_event_callback_call
+     (EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_ANIM_STOP, NULL));
 }
 
 static void
 _scroll_drag_start_cb(Evas_Object *obj,
                       void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL_DRAG_START, NULL);
+   eo_do(obj, eo_event_callback_call
+     (EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_DRAG_START, NULL));
 }
 
 static void
 _scroll_drag_stop_cb(Evas_Object *obj,
                      void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL_DRAG_STOP, NULL);
+   eo_do(obj, eo_event_callback_call
+     (EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_DRAG_STOP, NULL));
 }
 
 static void
 _vbar_drag_cb(Evas_Object *obj,
                 void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_VBAR_DRAG, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_VBAR_DRAG, NULL));
 }
 
 static void
 _vbar_press_cb(Evas_Object *obj,
                 void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_VBAR_PRESS, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_VBAR_PRESS, NULL));
 }
 
 static void
 _vbar_unpress_cb(Evas_Object *obj,
                 void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_VBAR_UNPRESS, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_VBAR_UNPRESS, NULL));
 }
 
 static void
 _hbar_drag_cb(Evas_Object *obj,
                 void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_HBAR_DRAG, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_HBAR_DRAG, NULL));
 }
 
 static void
 _hbar_press_cb(Evas_Object *obj,
                 void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_HBAR_PRESS, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_HBAR_PRESS, NULL));
 }
 
 static void
 _hbar_unpress_cb(Evas_Object *obj,
                 void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_HBAR_UNPRESS, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_SCROLLER_EVENT_HBAR_UNPRESS, NULL));
 }
 
 static void
 _page_change_cb(Evas_Object *obj,
                 void *data EINA_UNUSED)
 {
-   evas_object_smart_callback_call(obj, SIG_SCROLL_PAGE_CHANGE, NULL);
+   eo_do(obj, eo_event_callback_call
+     (ELM_SCROLLER_EVENT_SCROLL_PAGE_CHANGED, NULL));
 }
 
 static void
diff --git a/src/lib/elm_scroller.eo b/src/lib/elm_scroller.eo
index 87ebe87..e9b36e7 100644
--- a/src/lib/elm_scroller.eo
+++ b/src/lib/elm_scroller.eo
@@ -37,7 +37,8 @@ enum Elm.Scroller.Movement_Block
 }
 
 class Elm.Scroller (Elm.Layout, Elm_Interface_Scrollable,
-                    Elm_Interface_Atspi_Widget_Action)
+                    Elm_Interface_Atspi_Widget_Action,
+                    Evas.Scrollable_Interface)
 {
    eo_prefix: elm_obj_scroller;
    methods {
@@ -118,6 +119,21 @@ class Elm.Scroller (Elm.Layout, Elm_Interface_Scrollable,
    events {
       focused;
       unfocused;
+      scroll,page,changed;
+      hbar,unpress;
+      hbar,press;
+      hbar,drag;
+      vbar,unpress;
+      vbar,press;
+      vbar,drag;
+      scroll,left;
+      scroll,right;
+      scroll,up;
+      scroll,down;
+      edge,left;
+      edge,right;
+      edge,top;
+      edge,bottom;
    }
 
 }

-- 


Reply via email to