aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Stanislawski <lukasz.stanislawski@gmail.com>2018-10-15 00:41:01 +0200
committerLukasz Stanislawski <lukasz.stanislawski@gmail.com>2018-10-15 00:41:01 +0200
commit2346f333316cf84691be49624bea08d1a9052293 (patch)
tree9ebe0f4daaf4c3b9a5f3d108d76c87bc0350dcb9
parentaccess: remove type get/set api. (diff)
downloadefl-devs/stanluk/fix.tar.gz
access: add access_parent propertydevs/stanluk/fix
-rw-r--r--src/lib/elementary/efl_access_object.c25
-rw-r--r--src/lib/elementary/efl_access_object.eo11
2 files changed, 28 insertions, 8 deletions
diff --git a/src/lib/elementary/efl_access_object.c b/src/lib/elementary/efl_access_object.c
index 3fd3df4977..5aa7293790 100644
--- a/src/lib/elementary/efl_access_object.c
+++ b/src/lib/elementary/efl_access_object.c
@@ -145,7 +145,7 @@ _efl_access_object_index_in_parent_get(const Eo *obj, Efl_Access_Object_Data *pd
Eo *chld, *parent = NULL;
int ret = 0;
- parent = efl_provider_find(efl_parent_get(obj), EFL_ACCESS_OBJECT_MIXIN);
+ parent = efl_access_object_access_parent_get(obj);
if (!parent) return -1;
children = efl_access_object_access_children_get(parent);
@@ -168,13 +168,24 @@ _efl_access_object_index_in_parent_get(const Eo *obj, Efl_Access_Object_Data *pd
EOLIAN static Efl_Object *
-_efl_access_object_efl_object_provider_find(const Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED, const Efl_Object *klass)
+_efl_access_object_access_parent_get(const Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED)
{
- if (efl_isa(obj, klass))
- {
- return (Eo*)obj;
- }
- return efl_provider_find(efl_super(obj, EFL_ACCESS_OBJECT_MIXIN), klass);
+ Eo *parent = (Eo*)obj;
+
+ do {
+ parent = efl_parent_get(parent);
+ if (efl_isa(parent, EFL_ACCESS_OBJECT_MIXIN))
+ return parent;
+ } while (parent);
+
+ return NULL;
+}
+
+EOLIAN static void
+_efl_access_object_access_parent_set(Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED, Efl_Access_Object *parent EINA_UNUSED)
+{
+ WRN("The %s object does not implement the \"accessible_parent_set\" function.",
+ efl_class_name_get(efl_class_get(obj)));
}
EOLIAN Eina_List*
diff --git a/src/lib/elementary/efl_access_object.eo b/src/lib/elementary/efl_access_object.eo
index 89279eebff..419074b8fb 100644
--- a/src/lib/elementary/efl_access_object.eo
+++ b/src/lib/elementary/efl_access_object.eo
@@ -269,6 +269,16 @@ mixin Efl.Access.Object (Efl.Interface, Efl.Object)
role: Efl.Access.Role; [[Accessible role]]
}
}
+ @property access_parent @protected @beta {
+ [[Gets object's accessible parent.]]
+ get {
+ }
+ set {
+ }
+ values {
+ parent: Efl.Access.Object; [[Accessible parent]]
+ }
+ }
@property access_children @protected @beta {
[[Gets object's accessible children.]]
get {
@@ -433,7 +443,6 @@ mixin Efl.Access.Object (Efl.Interface, Efl.Object)
implements {
Efl.Object.destructor;
Efl.Object.invalidate;
- Efl.Object.provider_find;
}
events {
property,changed: string; [[Called when property has changed]]