widget: Remove tooltip_add/del from EO
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 23 Aug 2017 07:04:49 +0000 (16:04 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 23 Aug 2017 10:20:47 +0000 (19:20 +0900)
It's pretty much an internal function.
NOTE: Tooltip API is not bound to EO (yet).

Ref T5363

src/lib/elementary/elm_code_widget_private.h
src/lib/elementary/elm_widget.c
src/lib/elementary/elm_widget.eo
src/lib/elementary/elm_widget.h

index ebedec3..d9e071c 100644 (file)
@@ -61,8 +61,6 @@ void _elm_code_widget_delete(Elm_Code_Widget *widget);
 
 void _elm_code_widget_tooltip_text_set(Evas_Object *widget, const char *text);
 
-void _elm_code_widget_tooltip_add(Evas_Object *widget);
-
 EAPI Elm_Code_Widget_Selection_Data *elm_code_widget_selection_normalized_get(Evas_Object *widget);
 
 void _elm_code_widget_selection_delete_no_undo(Elm_Code_Widget *widget);
index bfd0094..eb3fc6d 100644 (file)
@@ -3929,15 +3929,21 @@ _elm_widget_style_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
    return ret;
 }
 
-EOLIAN static void
-_elm_widget_tooltip_add(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Tooltip *tt)
+EAPI void
+elm_widget_tooltip_add(Eo *obj, Elm_Tooltip *tt)
 {
+   Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+   if (!sd) return;
+
    sd->tooltips = eina_list_append(sd->tooltips, tt);
 }
 
-EOLIAN static void
-_elm_widget_tooltip_del(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Tooltip *tt)
+EAPI void
+elm_widget_tooltip_del(Eo *obj, Elm_Tooltip *tt)
 {
+   Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+   if (!sd) return;
+
    sd->tooltips = eina_list_remove(sd->tooltips, tt);
 }
 
index b01005a..02e0f9e 100644 (file)
@@ -23,7 +23,6 @@ enum Elm.Activate
    back, [[Activate back]]
 }
 
-struct Elm.Tooltip; [[Elementary tooltip]]
 struct @extern Elm.Theme; [[Elementary theme]]
 
 abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
@@ -635,12 +634,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
       scroll_freeze_pop {
          [[Pop scroller freeze]]
       }
-      tooltip_del {
-        [[Delet widget tooltip]]
-         params {
-            @in tt: ptr(Elm.Tooltip); [[Tooltip to be deleted]]
-         }
-      }
       focus_next_get @const {
         [[Get next focus item]]
          return: bool; [[$true on success, $false otherwise]]
index 05f2102..2b15359 100644 (file)
@@ -489,6 +489,9 @@ typedef struct _Elm_Action Elm_Action;
 /** Internal type for mouse cursors */
 typedef struct _Elm_Cursor Elm_Cursor;
 
+/** Internal type for tooltips */
+typedef struct _Elm_Tooltip Elm_Tooltip;
+
 #define ELM_ACCESS_DONE          -1   /* sentence done - send done event here */
 #define ELM_ACCESS_CANCEL        -2   /* stop reading immediately */