summaryrefslogtreecommitdiff
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
parent43f5d109ca917239cc60d593e798c7f1af7a5372 (diff)
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
145 Eo *chld, *parent = NULL; 145 Eo *chld, *parent = NULL;
146 int ret = 0; 146 int ret = 0;
147 147
148 parent = efl_provider_find(efl_parent_get(obj), EFL_ACCESS_OBJECT_MIXIN); 148 parent = efl_access_object_access_parent_get(obj);
149 if (!parent) return -1; 149 if (!parent) return -1;
150 150
151 children = efl_access_object_access_children_get(parent); 151 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
168 168
169 169
170EOLIAN static Efl_Object * 170EOLIAN static Efl_Object *
171_efl_access_object_efl_object_provider_find(const Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED, const Efl_Object *klass) 171_efl_access_object_access_parent_get(const Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED)
172{ 172{
173 if (efl_isa(obj, klass)) 173 Eo *parent = (Eo*)obj;
174 { 174
175 return (Eo*)obj; 175 do {
176 } 176 parent = efl_parent_get(parent);
177 return efl_provider_find(efl_super(obj, EFL_ACCESS_OBJECT_MIXIN), klass); 177 if (efl_isa(parent, EFL_ACCESS_OBJECT_MIXIN))
178 return parent;
179 } while (parent);
180
181 return NULL;
182}
183
184EOLIAN static void
185_efl_access_object_access_parent_set(Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED, Efl_Access_Object *parent EINA_UNUSED)
186{
187 WRN("The %s object does not implement the \"accessible_parent_set\" function.",
188 efl_class_name_get(efl_class_get(obj)));
178} 189}
179 190
180EOLIAN Eina_List* 191EOLIAN 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)
269 role: Efl.Access.Role; [[Accessible role]] 269 role: Efl.Access.Role; [[Accessible role]]
270 } 270 }
271 } 271 }
272 @property access_parent @protected @beta {
273 [[Gets object's accessible parent.]]
274 get {
275 }
276 set {
277 }
278 values {
279 parent: Efl.Access.Object; [[Accessible parent]]
280 }
281 }
272 @property access_children @protected @beta { 282 @property access_children @protected @beta {
273 [[Gets object's accessible children.]] 283 [[Gets object's accessible children.]]
274 get { 284 get {
@@ -433,7 +443,6 @@ mixin Efl.Access.Object (Efl.Interface, Efl.Object)
433 implements { 443 implements {
434 Efl.Object.destructor; 444 Efl.Object.destructor;
435 Efl.Object.invalidate; 445 Efl.Object.invalidate;
436 Efl.Object.provider_find;
437 } 446 }
438 events { 447 events {
439 property,changed: string; [[Called when property has changed]] 448 property,changed: string; [[Called when property has changed]]