widget: Remove widget_callback_add/del from EO
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 17 May 2017 01:52:26 +0000 (10:52 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 17 May 2017 06:32:03 +0000 (15:32 +0900)
Those APIs are not bindable with EO since they pass in a function
pointer. Luckily they are barely used.

Ref T5329

src/lib/elementary/elm_general.eot
src/lib/elementary/elm_widget.c
src/lib/elementary/elm_widget.eo

index 059c775..f1302bb 100644 (file)
@@ -15,7 +15,6 @@ type Elm_Gen_Item_Filter_Get_Cb: __undefined_type; [[Elementary genlist/gengrid
 type Elm_Gen_Item_Reusable_Content_Get_Cb: __undefined_type; [[Elementary genlist/gengrid item reusable content callback type]]
 type Elm_Tooltip_Item_Content_Cb: __undefined_type; [[Elementary tooltip item content callback type]]
 type Elm_Object_Item_Signal_Cb: __undefined_type; [[Elementary object item signal callback type]]
-type Elm_Event_Cb: __undefined_type; [[Elementary event callback type]]
 type Evas_Smart_Cb: __undefined_type; [[Evas smart callback type]]
 type Eina_Compare_Cb: __undefined_type; [[Eina compare callback type]]
 
@@ -285,4 +284,4 @@ enum Elm.Icon.Type
    none, [[Icon has no type set]]
    file, [[Icon is of type file]]
    standard [[Icon is of type standard]]
-}
\ No newline at end of file
+}
index 304a4e8..77e02ed 100644 (file)
@@ -1941,9 +1941,10 @@ _elm_widget_parent2_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Evas_Obj
    sd->parent2 = parent;
 }
 
-EOLIAN static void
-_elm_widget_widget_event_callback_add(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Event_Cb func, const void *data)
+EAPI void
+elm_widget_event_callback_add(Eo *obj, Elm_Event_Cb func, const void *data)
 {
+   API_ENTRY return;
    EINA_SAFETY_ON_NULL_RETURN(func);
 
    Elm_Event_Cb_Data *ecb = ELM_NEW(Elm_Event_Cb_Data);
@@ -1957,12 +1958,14 @@ _elm_widget_widget_event_callback_add(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data
    sd->event_cb = eina_list_append(sd->event_cb, ecb);
 }
 
-EOLIAN static void*
-_elm_widget_widget_event_callback_del(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Event_Cb func, const void *data)
+EAPI void *
+elm_widget_event_callback_del(Eo *obj, Elm_Event_Cb func, const void *data)
 {
+   API_ENTRY return NULL;
    EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL);
    Eina_List *l;
    Elm_Event_Cb_Data *ecd;
+
    EINA_LIST_FOREACH(sd->event_cb, l, ecd)
      if ((ecd->func == func) && (ecd->data == data))
        {
index 133d980..f569109 100644 (file)
@@ -523,14 +523,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, Elm.Inter
          }
          return: bool; [[$true on success, $false otherwise]]
       }
-      widget_event_callback_add {
-         [[Add event callback]]
-         legacy: elm_widget_event_callback_add;
-         params {
-            @in func: Elm_Event_Cb; [[Callback function]]
-            @in data: const(void_ptr) @optional; [[Data pointer]]
-         }
-      }
       access {
          [['Virtual' function on the widget being set access.]]
          params {
@@ -544,15 +536,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, Elm.Inter
             @in cur: ptr(Elm.Cursor); [[Cursor to be deleted]]
          }
       }
-      widget_event_callback_del {
-         [[Delete event callback handler]]
-         legacy: elm_widget_event_callback_del;
-         return: void_ptr; [[Handle to deleted callback]]
-         params {
-            @in func: Elm_Event_Cb; [[Callback handler]]
-            @in data: const(void_ptr) @nullable; [[data pointer]]
-         }
-      }
       on_focus {
          [['Virtual' function handling focus in/out events on the widget]]
          params {