jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ece89aaaa80e52cc5a8a0445d80aaf6a7a88ab1b

commit ece89aaaa80e52cc5a8a0445d80aaf6a7a88ab1b
Author: Jean-Philippe Andre <[email protected]>
Date:   Wed Jun 14 20:17:29 2017 +0900

    widget: Make cursor_add/del internal
    
    This API is meant to be used internally to elm, not from outside.
    The public API only exposes part_cursor_set on layout, and a series
    of cursor EAPIs.
---
 src/lib/elementary/elm_widget.c  | 14 ++++++++++----
 src/lib/elementary/elm_widget.eo | 13 -------------
 src/lib/elementary/elm_widget.h  |  3 +++
 3 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index f0a932469d..b3b88d23c7 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -4030,15 +4030,21 @@ _elm_widget_tooltip_del(Eo *obj EINA_UNUSED, 
Elm_Widget_Smart_Data *sd, Elm_Tool
    sd->tooltips = eina_list_remove(sd->tooltips, tt);
 }
 
-EOLIAN static void
-_elm_widget_cursor_add(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, 
Elm_Cursor *cur)
+EAPI void
+elm_widget_cursor_add(Eo *obj, Elm_Cursor *cur)
 {
+   Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+   if (!sd) return;
+
    sd->cursors = eina_list_append(sd->cursors, cur);
 }
 
-EOLIAN static void
-_elm_widget_cursor_del(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, 
Elm_Cursor *cur)
+EAPI void
+elm_widget_cursor_del(Eo *obj, Elm_Cursor *cur)
 {
+   Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+   if (!sd) return;
+
    sd->cursors = eina_list_remove(sd->cursors, cur);
 }
 
diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo
index 1b0674f4dd..c1348c35bc 100644
--- a/src/lib/elementary/elm_widget.eo
+++ b/src/lib/elementary/elm_widget.eo
@@ -27,7 +27,6 @@ enum Elm.Theme.Apply
 }
 
 struct Elm.Tooltip; [[Elementary tooltip]]
-struct Elm.Cursor; [[Elementary cursor]]
 struct @extern Elm.Theme; [[Elementary theme]]
 
 abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
@@ -401,12 +400,6 @@ abstract Elm.Widget (Efl.Canvas.Group, 
Elm.Interface.Atspi_Accessible,
       scroll_hold_push {
          [[Push scroll hold]]
       }
-      cursor_add {
-        [[Add cursor]]
-         params {
-            @in cur: ptr(Elm.Cursor); [[Cursor to be added]]
-         }
-      }
       focus_next_object_set {
          [[Set the next object with specific focus direction.
 
@@ -512,12 +505,6 @@ abstract Elm.Widget (Efl.Canvas.Group, 
Elm.Interface.Atspi_Accessible,
          }
          legacy: null;
       }
-      cursor_del {
-        [[Delete cursor]]
-         params {
-            @in cur: ptr(Elm.Cursor); [[Cursor to be deleted]]
-         }
-      }
       on_focus {
          [['Virtual' function handling focus in/out events on the widget]]
          params {
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index b4c38e1371..953718508d 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -487,6 +487,9 @@ typedef struct _Elm_Access_Item Elm_Access_Item;
 
 typedef struct _Elm_Action Elm_Action;
 
+/** Internal type for mouse cursors */
+typedef struct _Elm_Cursor Elm_Cursor;
+
 #define ELM_ACCESS_DONE          -1   /* sentence done - send done event here 
*/
 #define ELM_ACCESS_CANCEL        -2   /* stop reading immediately */
 

-- 


Reply via email to