Elm widget: rename parent to widget_parent and mark as protected.
authorTom Hacohen <tom@stosb.com>
Mon, 11 Apr 2016 16:51:15 +0000 (17:51 +0100)
committerTom Hacohen <tom@stosb.com>
Mon, 18 Apr 2016 09:10:23 +0000 (10:10 +0100)
This removes the conflicts between the different parents and also
indicates that this is to be used internally by widgets and should
not be confused with the normal user visible parent.

It is an internal attribute that should not be used by people
not implementing widgets. Marking it as protected signifies it
as such.

18 files changed:
src/lib/elementary/elc_ctxpopup.c
src/lib/elementary/elc_hoversel.c
src/lib/elementary/elc_popup.c
src/lib/elementary/elm_conform.c
src/lib/elementary/elm_conformant.eo
src/lib/elementary/elm_ctxpopup.eo
src/lib/elementary/elm_hover.c
src/lib/elementary/elm_hover.eo
src/lib/elementary/elm_hoversel.eo
src/lib/elementary/elm_inwin.c
src/lib/elementary/elm_inwin.eo
src/lib/elementary/elm_menu.c
src/lib/elementary/elm_menu.eo
src/lib/elementary/elm_notify.c
src/lib/elementary/elm_notify.eo
src/lib/elementary/elm_popup.eo
src/lib/elementary/elm_widget.c
src/lib/elementary/elm_widget.eo

index 07964f1cd5e00b0a2503322adf10038cf5c3753b..0a4e370f0735147d321e49f18b3b44f4b23a83a9 100644 (file)
@@ -5,7 +5,9 @@
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_WIDGET_ITEM_PROTECTED
+
 #include <Elementary.h>
 
 #include "elm_priv.h"
@@ -1158,7 +1160,7 @@ _elm_ctxpopup_evas_object_smart_del(Eo *obj, Elm_Ctxpopup_Data *sd)
 }
 
 EOLIAN static void
-_elm_ctxpopup_elm_widget_parent_set(Eo *obj, Elm_Ctxpopup_Data *_pd EINA_UNUSED, Evas_Object *parent)
+_elm_ctxpopup_elm_widget_widget_parent_set(Eo *obj, Elm_Ctxpopup_Data *_pd EINA_UNUSED, Evas_Object *parent)
 {
    //default parent is to be hover parent
    elm_ctxpopup_hover_parent_set(obj, parent);
index e14e0e6d053a0438eb770cbccde7b9004c3098b6..fcf52d3b3e8564480fd6014b138b216c8b855ffb 100644 (file)
@@ -5,6 +5,7 @@
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_WIDGET_ITEM_PROTECTED
 #include <Elementary.h>
 #include "elm_priv.h"
@@ -596,7 +597,7 @@ _elm_hoversel_evas_object_smart_hide(Eo *obj, Elm_Hoversel_Data *sd)
 }
 
 EOLIAN static void
-_elm_hoversel_elm_widget_parent_set(Eo *obj, Elm_Hoversel_Data *_pd EINA_UNUSED, Evas_Object *parent)
+_elm_hoversel_elm_widget_widget_parent_set(Eo *obj, Elm_Hoversel_Data *_pd EINA_UNUSED, Evas_Object *parent)
 {
    elm_hoversel_hover_parent_set(obj, parent);
 }
index 88b81673eddfcc12946a988a7293c04b50e13138..9f1e029b1ea7d34b0e914ab559bed77ab28f26f0 100644 (file)
@@ -4,6 +4,7 @@
 
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
+#define ELM_WIDGET_PROTECTED
 #define ELM_WIDGET_ITEM_PROTECTED
 
 #include <Elementary.h>
@@ -1572,7 +1573,7 @@ _parent_geom_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_i
 }
 
 EOLIAN static void
-_elm_popup_elm_widget_parent_set(Eo *obj, Elm_Popup_Data *sd, Evas_Object *parent)
+_elm_popup_elm_widget_widget_parent_set(Eo *obj, Elm_Popup_Data *sd, Evas_Object *parent)
 {
    Evas_Coord x, y, w, h;
    evas_object_geometry_get(parent, &x, &y, &w, &h);
index 529c8e976de30e1c6c5964bcf12d05819a6ba566..2d434ecf862aeeb719dcdc7c51d5459d999e783b 100644 (file)
@@ -2,6 +2,7 @@
 # include "elementary_config.h"
 #endif
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 
 #include <Elementary.h>
@@ -954,7 +955,7 @@ _elm_conformant_evas_object_smart_del(Eo *obj, Elm_Conformant_Data *sd)
 }
 
 EOLIAN static void
-_elm_conformant_elm_widget_parent_set(Eo *obj, Elm_Conformant_Data *sd, Evas_Object *parent)
+_elm_conformant_elm_widget_widget_parent_set(Eo *obj, Elm_Conformant_Data *sd, Evas_Object *parent)
 {
 #ifdef HAVE_ELEMENTARY_X
    Evas_Object *top = elm_widget_top_get(parent);
index 98023c77cc529b5354d4b328d618823df40969b8..c719c21adb8bfbea83151890c1325069eb715a15 100644 (file)
@@ -6,7 +6,7 @@ class Elm.Conformant (Elm.Layout)
       Eo.Base.constructor;
       Evas.Object_Smart.add;
       Evas.Object_Smart.del;
-      Elm.Widget.parent.set;
+      Elm.Widget.widget_parent.set;
       Elm.Widget.theme_apply;
       Elm.Layout.content_aliases.get;
    }
index d04e9e806b0148263e85770aedf244b4da2251be..41d5cff059d315e2bfcac81c787d0fd2d9e30a61 100644 (file)
@@ -203,7 +203,7 @@ class Elm.Ctxpopup (Elm.Layout, Elm.Interface_Atspi_Widget_Action, Efl.Orientati
       Eo.Base.constructor;
       Evas.Object_Smart.del;
       Evas.Object_Smart.add;
-      Elm.Widget.parent.set;
+      Elm.Widget.widget_parent.set;
       Elm.Widget.focus_direction;
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.focus_next_manager_is;
index 22b7e3d529e875a5299a00f95979a5c039c187e1..26e8d738b4d506d427491bce1b856ffde5f7e8d7 100644 (file)
@@ -2,6 +2,7 @@
 # include "elementary_config.h"
 #endif
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
 
@@ -719,7 +720,7 @@ elm_hover_parent_set(Evas_Object *obj,
 }
 
 EOLIAN static void
-_elm_hover_elm_widget_parent_set(Eo *obj, Elm_Hover_Data *sd, Evas_Object *parent)
+_elm_hover_elm_widget_widget_parent_set(Eo *obj, Elm_Hover_Data *sd, Evas_Object *parent)
 {
    _elm_hover_parent_detach(obj);
 
@@ -757,7 +758,7 @@ elm_hover_parent_get(const Evas_Object *obj)
 }
 
 EOLIAN static Evas_Object*
-_elm_hover_elm_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Hover_Data *sd)
+_elm_hover_elm_widget_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Hover_Data *sd)
 {
    return sd->parent;
 }
index bf6071ae44ba1c218f87a502ef736fb5cd568ddf..2959366becd080936568d168d796394e7d53016e 100644 (file)
@@ -66,7 +66,7 @@ class Elm.Hover (Elm.Layout, Evas.Clickable_Interface, Elm.Interface_Atspi_Widge
       Evas.Object_Smart.resize;
       Elm.Widget.theme_apply;
       Elm.Widget.sub_object_add;
-      Elm.Widget.parent;
+      Elm.Widget.widget_parent;
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.focus_next_manager_is;
       Elm.Widget.sub_object_del;
index 88b21e716449f3fd52de940e83ff583f3540a9d9..405d37d3ac015cc7ee7b099d5feb1b2f21f32395 100644 (file)
@@ -94,7 +94,7 @@ class Elm.Hoversel (Elm.Button, Evas.Selectable_Interface,
       Evas.Object_Smart.show;
       Evas.Object_Smart.add;
       Evas.Object_Smart.del;
-      Elm.Widget.parent.set;
+      Elm.Widget.widget_parent.set;
       Elm.Widget.theme_apply;
       Elm.Widget.translate;
       Elm.Widget.event;
index 1c673b77965827bdfb6415d9bf85e330a67f53c3..6f1171c98ad0fa35902f19ee88bbe05ff1067f2e 100644 (file)
@@ -2,6 +2,7 @@
 # include "elementary_config.h"
 #endif
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 
 #include <Elementary.h>
@@ -79,7 +80,7 @@ _elm_inwin_evas_object_smart_add(Eo *obj, void *_pd EINA_UNUSED)
 }
 
 EOLIAN static void
-_elm_inwin_elm_widget_parent_set(Eo *obj, void *_pd EINA_UNUSED, Evas_Object *parent)
+_elm_inwin_elm_widget_widget_parent_set(Eo *obj, void *_pd EINA_UNUSED, Evas_Object *parent)
 {
    elm_win_resize_object_add(parent, obj);
 
index 74ea2214c47bb1be7e0d13692e07ed4547e4bb0c..38e9929d2d273836c70d474a0776676e5783a070 100644 (file)
@@ -21,7 +21,7 @@ class Elm.Inwin (Elm.Layout)
       class.constructor;
       Eo.Base.constructor;
       Evas.Object_Smart.add;
-      Elm.Widget.parent.set;
+      Elm.Widget.widget_parent.set;
       Elm.Widget.focus_next_manager_is;
       Elm.Widget.focus_next;
       Elm.Layout.content_aliases.get;
index 652f9b86d2110678ec08a5ec19584924ccac46d1..372d67692ec6561f1913059813fa401f94921fd0 100644 (file)
@@ -2,6 +2,7 @@
 # include "elementary_config.h"
 #endif
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 #define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED
 
@@ -831,7 +832,7 @@ elm_menu_parent_set(Evas_Object *obj,
 }
 
 EOLIAN static void
-_elm_menu_elm_widget_parent_set(Eo *obj, Elm_Menu_Data *sd, Evas_Object *parent)
+_elm_menu_elm_widget_widget_parent_set(Eo *obj, Elm_Menu_Data *sd, Evas_Object *parent)
 {
    Eina_List *l, *_l, *_ll, *ll = NULL;
    Elm_Object_Item *eo_item;
@@ -883,7 +884,7 @@ elm_menu_parent_get(const Evas_Object *obj)
 }
 
 EOLIAN static Evas_Object*
-_elm_menu_elm_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd)
+_elm_menu_elm_widget_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd)
 {
    return sd->parent;
 }
index c77c1ca08bfc03541bf413e1c3257efaffe48fe5..2aa849f56521b8c6e7816f4f906b0a0addcc0468 100644 (file)
@@ -73,7 +73,7 @@ class Elm.Menu (Elm.Widget, Evas.Clickable_Interface, Elm.Interface_Atspi_Select
       Evas.Object_Smart.show;
       Evas.Object_Smart.add;
       Evas.Object_Smart.del;
-      Elm.Widget.parent;
+      Elm.Widget.widget_parent;
       Elm.Widget.theme_apply;
       Elm.Widget.translate;
       Elm.Interface_Atspi_Accessible.children.get;
index 4a2242572b4bc828769202c257d0abd15b0717ec..2504e58b9798026940ee093d61bcc781aec08508 100644 (file)
@@ -2,6 +2,7 @@
 # include "elementary_config.h"
 #endif
 
+#define ELM_WIDGET_PROTECTED
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 
 #include <Elementary.h>
@@ -487,7 +488,7 @@ elm_notify_parent_set(Evas_Object *obj,
 }
 
 EOLIAN static void
-_elm_notify_elm_widget_parent_set(Eo *obj, Elm_Notify_Data *sd, Evas_Object *parent)
+_elm_notify_elm_widget_widget_parent_set(Eo *obj, Elm_Notify_Data *sd, Evas_Object *parent)
 {
    if (sd->parent)
      {
@@ -534,7 +535,7 @@ elm_notify_parent_get(const Evas_Object *obj)
 }
 
 EOLIAN static Evas_Object*
-_elm_notify_elm_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd)
+_elm_notify_elm_widget_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd)
 {
    return sd->parent;
 }
index 0782bda8af048448ccc895465df7b4e6ce59ed8b..4530063ce184caada14ab2a913aed64a3b8f4e51 100644 (file)
@@ -84,7 +84,7 @@ class Elm.Notify (Elm.Container)
       Evas.Object_Smart.del;
       Evas.Object_Smart.resize;
       Elm.Widget.focus_direction;
-      Elm.Widget.parent;
+      Elm.Widget.widget_parent;
       Elm.Widget.theme_apply;
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.focus_next_manager_is;
index c24957559049743573d4568e5a326a8d6f3ef0cb..c302e9ea34314d4b28eed2404a46fda3d83537ae 100644 (file)
@@ -173,7 +173,7 @@ class Elm.Popup (Elm.Layout, Elm.Interface_Atspi_Widget_Action)
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.access;
       Elm.Widget.focus_next;
-      Elm.Widget.parent.set;
+      Elm.Widget.widget_parent.set;
       Elm.Widget.translate;
       Elm.Widget.sub_object_del;
       Elm.Widget.event;
index b3096c93f4021a4bddf3b3c02d04f83810a4eecb..354ca38d7d283f056fde6d7acfeb2e5be56738ff 100644 (file)
@@ -4,6 +4,7 @@
 
 #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
 #define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
+#define ELM_WIDGET_PROTECTED
 #define ELM_WIDGET_ITEM_PROTECTED
 #include <Elementary.h>
 
@@ -855,7 +856,7 @@ _elm_object_focus_chain_del_cb(void *data,
 }
 
 EOLIAN static void
-_elm_widget_parent_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Evas_Object *parent EINA_UNUSED)
+_elm_widget_widget_parent_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Evas_Object *parent EINA_UNUSED)
 {
 }
 
@@ -2913,7 +2914,7 @@ _elm_widget_focus_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool focus)
 }
 
 EOLIAN static Evas_Object*
-_elm_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
+_elm_widget_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
 {
    return sd->parent_obj;
 }
index 72c41c18319d1429a42ddb8fb0a6e29890edb3bb..eed8e02f7ef562cc08a6a11c18feb01533d1873a 100644 (file)
@@ -206,10 +206,13 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
             highlight: bool;
          }
       }
-      @property parent {
+      @property widget_parent @protected {
+         [[The internal widget parent]]
          set {
+            legacy: elm_widget_parent_set; /* Needed because we don't do duplication removal for legacy names. */
          }
          get {
+            legacy: elm_widget_parent_get; /* Needed because we don't do duplication removal for legacy names. */
          }
          values {
             parent: Evas.Object * @nullable;