summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-06-14 20:17:29 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-06-15 09:48:33 +0900
commitece89aaaa80e52cc5a8a0445d80aaf6a7a88ab1b (patch)
tree9777555bdd99475c30dd62cf052bbc7e16c61fbc
parent19b704b70068cf340a148442441514ba16447d83 (diff)
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.
-rw-r--r--src/lib/elementary/elm_widget.c14
-rw-r--r--src/lib/elementary/elm_widget.eo13
-rw-r--r--src/lib/elementary/elm_widget.h3
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
4030 sd->tooltips = eina_list_remove(sd->tooltips, tt); 4030 sd->tooltips = eina_list_remove(sd->tooltips, tt);
4031} 4031}
4032 4032
4033EOLIAN static void 4033EAPI void
4034_elm_widget_cursor_add(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Cursor *cur) 4034elm_widget_cursor_add(Eo *obj, Elm_Cursor *cur)
4035{ 4035{
4036 Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
4037 if (!sd) return;
4038
4036 sd->cursors = eina_list_append(sd->cursors, cur); 4039 sd->cursors = eina_list_append(sd->cursors, cur);
4037} 4040}
4038 4041
4039EOLIAN static void 4042EAPI void
4040_elm_widget_cursor_del(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Cursor *cur) 4043elm_widget_cursor_del(Eo *obj, Elm_Cursor *cur)
4041{ 4044{
4045 Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
4046 if (!sd) return;
4047
4042 sd->cursors = eina_list_remove(sd->cursors, cur); 4048 sd->cursors = eina_list_remove(sd->cursors, cur);
4043} 4049}
4044 4050
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
27} 27}
28 28
29struct Elm.Tooltip; [[Elementary tooltip]] 29struct Elm.Tooltip; [[Elementary tooltip]]
30struct Elm.Cursor; [[Elementary cursor]]
31struct @extern Elm.Theme; [[Elementary theme]] 30struct @extern Elm.Theme; [[Elementary theme]]
32 31
33abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, 32abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
@@ -401,12 +400,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
401 scroll_hold_push { 400 scroll_hold_push {
402 [[Push scroll hold]] 401 [[Push scroll hold]]
403 } 402 }
404 cursor_add {
405 [[Add cursor]]
406 params {
407 @in cur: ptr(Elm.Cursor); [[Cursor to be added]]
408 }
409 }
410 focus_next_object_set { 403 focus_next_object_set {
411 [[Set the next object with specific focus direction. 404 [[Set the next object with specific focus direction.
412 405
@@ -512,12 +505,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
512 } 505 }
513 legacy: null; 506 legacy: null;
514 } 507 }
515 cursor_del {
516 [[Delete cursor]]
517 params {
518 @in cur: ptr(Elm.Cursor); [[Cursor to be deleted]]
519 }
520 }
521 on_focus { 508 on_focus {
522 [['Virtual' function handling focus in/out events on the widget]] 509 [['Virtual' function handling focus in/out events on the widget]]
523 params { 510 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;
487 487
488typedef struct _Elm_Action Elm_Action; 488typedef struct _Elm_Action Elm_Action;
489 489
490/** Internal type for mouse cursors */
491typedef struct _Elm_Cursor Elm_Cursor;
492
490#define ELM_ACCESS_DONE -1 /* sentence done - send done event here */ 493#define ELM_ACCESS_DONE -1 /* sentence done - send done event here */
491#define ELM_ACCESS_CANCEL -2 /* stop reading immediately */ 494#define ELM_ACCESS_CANCEL -2 /* stop reading immediately */
492 495