jackdanielz pushed a commit to branch master.

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

commit f119534baa905877700c8063807c2195399ec8d6
Author: Avi Levin <avi.le...@samsung.com>
Date:   Thu May 14 14:16:53 2015 +0300

    elm_calendar, elm_widget: porting evas smart callbacks to eo
---
 src/lib/elm_calendar.c |  6 +++---
 src/lib/elm_widget.c   | 12 +++++++-----
 src/lib/elm_widget.eo  |  4 ++++
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/lib/elm_calendar.c b/src/lib/elm_calendar.c
index 18574a1..7fd2491 100644
--- a/src/lib/elm_calendar.c
+++ b/src/lib/elm_calendar.c
@@ -681,9 +681,9 @@ _update_data(Evas_Object *obj, Eina_Bool month,
           sd->selected_time.tm_mday = maxdays;
 
         _fix_selected_time(sd);
-        evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
+        eo_do(obj, eo_event_callback_call(ELM_CALENDAR_EVENT_CHANGED, NULL));
      }
-   evas_object_smart_callback_call(obj, SIG_DISPLAY_CHANGED, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_CALENDAR_EVENT_DISPLAY_CHANGED, 
NULL));
 
    return EINA_TRUE;
 }
@@ -841,7 +841,7 @@ _update_sel_it(Evas_Object *obj,
    sd->selected_time.tm_mday = day;
    _fix_selected_time(sd);
    _select(obj, sel_it);
-   evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_CALENDAR_EVENT_CHANGED, NULL));
 }
 
 static void
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index e105da4..f8da6fa 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -875,7 +875,7 @@ elm_widget_access(Evas_Object *obj,
      }
 
    eo_do(obj, elm_obj_widget_access(is_access));
-   evas_object_smart_callback_call(obj, SIG_WIDGET_ACCESS_CHANGED, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_ACCESS_CHANGED, NULL));
 
    return ret;
 }
@@ -3462,7 +3462,7 @@ _elm_widget_translate(Eo *obj EINA_UNUSED, 
Elm_Widget_Smart_Data *_pd EINA_UNUSE
         sd->on_translate = EINA_FALSE;
      }
 #endif
-   evas_object_smart_callback_call(obj, SIG_WIDGET_LANG_CHANGED, NULL);
+   eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_LANGUAGE_CHANGED, NULL));
    return EINA_TRUE;
 }
 
@@ -5547,7 +5547,8 @@ _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd)
           {
              if (!sd->resize_obj)
                evas_object_focus_set(obj, EINA_TRUE);
-             evas_object_smart_callback_call(obj, SIG_WIDGET_FOCUSED, NULL);
+              eo_do(obj, eo_event_callback_call
+               (ELM_WIDGET_EVENT_FOCUSED, NULL));
              if (_elm_config->atspi_mode && 
!elm_widget_child_can_focus_get(obj))
                elm_interface_atspi_accessible_state_changed_signal_emit(obj, 
ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
           }
@@ -5555,10 +5556,11 @@ _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd)
           {
              if (!sd->resize_obj)
                evas_object_focus_set(obj, EINA_FALSE);
-             evas_object_smart_callback_call(obj, SIG_WIDGET_UNFOCUSED, NULL);
+             eo_do(obj, eo_event_callback_call
+               (ELM_WIDGET_EVENT_UNFOCUSED, NULL));
              if (_elm_config->atspi_mode && 
!elm_widget_child_can_focus_get(obj))
                elm_interface_atspi_accessible_state_changed_signal_emit(obj, 
ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
-          }
+    }
      }
    else
      return EINA_FALSE;
diff --git a/src/lib/elm_widget.eo b/src/lib/elm_widget.eo
index e45bd5f..090cc79 100644
--- a/src/lib/elm_widget.eo
+++ b/src/lib/elm_widget.eo
@@ -840,5 +840,9 @@ abstract Elm.Widget (Evas.Object_Smart, 
Elm_Interface_Atspi_Accessible, Elm_Inte
    }
    events {
       moved;
+      focused;
+      unfocused;
+      language,changed;
+      access,changed;
    }
 }

-- 


Reply via email to