summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShilpa Singh <shilpa.singh@samsung.com>2019-03-25 10:11:39 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2019-03-25 10:11:39 +0900
commited511508539ad3cc43b3a20bd588bf9acffdc97a (patch)
treedbbdd52840b2668bab936e9f27ce49966f5990d6
parente6d8ac512d2117d585c6e5705983ffb8c39758fb (diff)
efl_access: if 0 is set as reading_info_type, remove existing reading_info
Summary: if 0 is set as reading_info_type, remove existing reading_info and allow default reading info types (name, role, state and description) to be read. Do not set reading info again in reading_info_type_set API if new value matches the old value. Test Plan: If application does not set reading_info_type or set 0 reading_info_type, All four reading info types of an accessible object should be read on highlight. Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com> Reviewers: kimcinoo, jsuya, bu5hm4n, lukasz.stanislawski Subscribers: prasoonsingh16, rajeev.jnnce, #reviewers, cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8435
-rw-r--r--src/lib/elementary/efl_access_object.c7
-rw-r--r--src/lib/elementary/efl_access_object.eo8
2 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_access_object.c b/src/lib/elementary/efl_access_object.c
index fa206449ae..6bb3b2e882 100644
--- a/src/lib/elementary/efl_access_object.c
+++ b/src/lib/elementary/efl_access_object.c
@@ -272,7 +272,14 @@ EOLIAN static void
272_efl_access_object_reading_info_type_set(Eo *obj, Efl_Access_Object_Data *pd, Efl_Access_Reading_Info_Type reading_info) 272_efl_access_object_reading_info_type_set(Eo *obj, Efl_Access_Object_Data *pd, Efl_Access_Reading_Info_Type reading_info)
273{ 273{
274 Eina_Strbuf *buf = NULL; 274 Eina_Strbuf *buf = NULL;
275 if (reading_info == pd->reading_info)
276 return;
275 pd->reading_info = reading_info; 277 pd->reading_info = reading_info;
278 if (!pd->reading_info)
279 {
280 efl_access_object_attribute_del(obj, "reading_info_type");
281 return;
282 }
276 buf = eina_strbuf_new(); 283 buf = eina_strbuf_new();
277 eina_strbuf_reset(buf); 284 eina_strbuf_reset(buf);
278 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_NAME)) 285 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_NAME))
diff --git a/src/lib/elementary/efl_access_object.eo b/src/lib/elementary/efl_access_object.eo
index 451856f97d..37b021e0ca 100644
--- a/src/lib/elementary/efl_access_object.eo
+++ b/src/lib/elementary/efl_access_object.eo
@@ -319,10 +319,14 @@ mixin @beta Efl.Access.Object requires Efl.Object
319 } 319 }
320 @property reading_info_type @protected { 320 @property reading_info_type @protected {
321 get { 321 get {
322 [[Gets reading information types of an accessible object.]] 322 [[Gets reading information types of an accessible object. if no reading information
323 is set, 0 is returned which means all four reading information types will be read on
324 object highlight]]
323 } 325 }
324 set { 326 set {
325 [[Sets reading information of an accessible object.]] 327 [[Sets reading information of an accessible object. If set as 0, existing
328 reading info will be deleted and by default all four reading information types
329 like name, role, state and description will be read on object highlight]]
326 } 330 }
327 values { 331 values {
328 reading_info: Efl.Access.Reading.Info.Type; [[Reading information types]] 332 reading_info: Efl.Access.Reading.Info.Type; [[Reading information types]]