diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index d895b595cb..6554b4af83 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -3132,53 +3132,6 @@ _elm_widget_parent_highlight_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool h sd->highlighted = highlighted; } -EOLIAN static void -_elm_widget_signal_emit(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const char *emission, const char *source) -{ - if (evas_object_smart_type_check(obj, "elm_layout")) - elm_layout_signal_emit(obj, emission, source); - else if (evas_object_smart_type_check(obj, "elm_icon")) - { - WRN("Deprecated function. This functionality on icon objects" - " will be dropped on a next release."); - _elm_icon_signal_emit(obj, emission, source); - } -} - -EOLIAN static void -_elm_widget_signal_callback_add(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const char *emission, const char *source, Edje_Signal_Cb func, void *data) -{ - EINA_SAFETY_ON_NULL_RETURN(func); - - if (evas_object_smart_type_check(obj, "elm_layout")) - elm_layout_signal_callback_add(obj, emission, source, func, data); - else if (evas_object_smart_type_check(obj, "elm_icon")) - { - WRN("Deprecated function. This functionality on icon objects" - " will be dropped on a next release."); - - _elm_icon_signal_callback_add(obj, emission, source, func, data); - } -} - -EOLIAN static void* -_elm_widget_signal_callback_del(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const char *emission, const char *source, Edje_Signal_Cb func) -{ - void *data = NULL; - - if (evas_object_smart_type_check(obj, "elm_layout")) - data = elm_layout_signal_callback_del(obj, emission, source, func); - else if (evas_object_smart_type_check(obj, "elm_icon")) - { - WRN("Deprecated function. This functionality on icon objects" - " will be dropped on a next release."); - - data = _elm_icon_signal_callback_del(obj, emission, source, func); - } - - return data; -} - EOLIAN static void _elm_widget_focus_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool focus) { @@ -4123,7 +4076,7 @@ _elm_widget_theme_object_set(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *ed { char buf[128]; snprintf(buf, sizeof(buf), "elm,state,orient,%d", sd->orient_mode); - elm_obj_widget_signal_emit(obj, buf, "elm"); + elm_widget_signal_emit(obj, buf, "elm"); } return ret; @@ -4702,7 +4655,7 @@ _elm_widget_orientation_set(Eo *obj, Elm_Widget_Smart_Data *sd, int orient_mode) { char buf[128]; snprintf(buf, sizeof(buf), "elm,state,orient,%d", orient_mode); - elm_obj_widget_signal_emit(obj, buf, "elm"); + elm_widget_signal_emit(obj, buf, "elm"); } } @@ -6587,6 +6540,56 @@ elm_widget_content_part_unset(Evas_Object *obj, return efl_content_unset(efl_part(obj, part)); } +EAPI void +elm_widget_signal_emit(Eo *obj, const char *emission, const char *source) +{ + ELM_WIDGET_CHECK(obj); + if (evas_object_smart_type_check(obj, "elm_layout")) + elm_layout_signal_emit(obj, emission, source); + else if (evas_object_smart_type_check(obj, "elm_icon")) + { + WRN("Deprecated function. This functionality on icon objects" + " will be dropped on a next release."); + _elm_icon_signal_emit(obj, emission, source); + } +} + +EAPI void +elm_widget_signal_callback_add(Eo *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) +{ + ELM_WIDGET_CHECK(obj); + EINA_SAFETY_ON_NULL_RETURN(func); + if (evas_object_smart_type_check(obj, "elm_layout")) + elm_layout_signal_callback_add(obj, emission, source, func, data); + else if (evas_object_smart_type_check(obj, "elm_icon")) + { + WRN("Deprecated function. This functionality on icon objects" + " will be dropped on a next release."); + + _elm_icon_signal_callback_add(obj, emission, source, func, data); + } +} + +EAPI void * +elm_widget_signal_callback_del(Eo *obj, const char *emission, const char *source, Edje_Signal_Cb func) +{ + void *data = NULL; + + ELM_WIDGET_CHECK(obj) NULL; + EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL); + if (evas_object_smart_type_check(obj, "elm_layout")) + data = elm_layout_signal_callback_del(obj, emission, source, func); + else if (evas_object_smart_type_check(obj, "elm_icon")) + { + WRN("Deprecated function. This functionality on icon objects" + " will be dropped on a next release."); + + data = _elm_icon_signal_callback_del(obj, emission, source, func); + } + + return data; +} + /* Internal EO APIs and hidden overrides */ diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index a9867c8a0a..cb7e25b8f8 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -534,15 +534,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, } return: bool; [[$true on success, $false otherwise]] } - signal_callback_add { - [[Add signal callback]] - params { - @in emission: string; [[Signal emission]] - @in source: string; [[Signal source]] - @in func: Edje.Signal_Cb; [[Signal callback]] - @in data: void_ptr; [[Data pointer]] - } - } focus_next_manager_is { [['Virtual' function which checks if handling of passing focus to sub-objects is supported by widget.]] return: bool; [[$true on success, $false otherwise]] @@ -693,22 +684,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, @out weight: double; [[Weight]] } } - signal_callback_del { - [[Delete signal callback]] - return: void_ptr; [[Handle to deleted callback]] - params { - @in emission: string; [[Signal emission]] - @in source: string; [[Signal source]] - @in func: Edje.Signal_Cb; [[Callback function]] - } - } - signal_emit { - [[Emit signal on widget]] - params { - @in emission: string; [[Signal string]] - @in source: string; [[Signal source]] - } - } disable { [['Virtual' function on the widget being disabled.]] return: bool; [[$true on success, $false otherwise]]