From 97be76ca619635c63ce442e90acd0d14a3f9255c Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Thu, 2 Jan 2014 09:23:03 +0900 Subject: [PATCH] layout: Moved internal smart data member to a correct place. can_access is used only by layout. --- legacy/elementary/src/lib/elm_layout.c | 15 +++++++-------- legacy/elementary/src/lib/elm_widget.h | 1 - legacy/elementary/src/lib/elm_widget_layout.h | 1 + 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/legacy/elementary/src/lib/elm_layout.c b/legacy/elementary/src/lib/elm_layout.c index 9a83f50..56b78b9 100644 --- a/legacy/elementary/src/lib/elm_layout.c +++ b/legacy/elementary/src/lib/elm_layout.c @@ -1266,7 +1266,7 @@ _elm_layout_smart_text_set(Eo *obj, void *_pd, va_list *list) eo_do(obj, elm_obj_layout_sizing_eval()); if (_elm_config->access_mode == ELM_ACCESS_MODE_ON && - wd->can_access && !(sub_d->obj)) + sd->can_access && !(sub_d->obj)) sub_d->obj = _elm_access_edje_object_part_object_register (obj, elm_layout_edje_get(obj), part); @@ -2168,15 +2168,14 @@ elm_layout_edje_object_can_access_set(Evas_Object *obj, } static void -_elm_layout_smart_edje_object_can_access_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) +_elm_layout_smart_edje_object_can_access_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) { + Elm_Layout_Smart_Data *sd = _pd; Eina_Bool can_access = va_arg(*list, int); Eina_Bool *ret = va_arg(*list, Eina_Bool *); if (ret) *ret = EINA_FALSE; - ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); - - wd->can_access = !!can_access; + sd->can_access = !!can_access; if (ret) *ret = EINA_TRUE; } @@ -2190,12 +2189,12 @@ elm_layout_edje_object_can_access_get(Evas_Object *obj) } static void -_elm_layout_smart_edje_object_can_access_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list) +_elm_layout_smart_edje_object_can_access_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) { + Elm_Layout_Smart_Data *sd = _pd; Eina_Bool *ret = va_arg(*list, Eina_Bool *); - ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); - *ret = wd->can_access; + *ret = sd->can_access; } static void diff --git a/legacy/elementary/src/lib/elm_widget.h b/legacy/elementary/src/lib/elm_widget.h index 28d1077..f7170f6 100644 --- a/legacy/elementary/src/lib/elm_widget.h +++ b/legacy/elementary/src/lib/elm_widget.h @@ -431,7 +431,6 @@ typedef struct _Elm_Widget_Smart_Data * TRUE by * default */ Eina_Bool still_in : 1; - Eina_Bool can_access : 1; Eina_Bool highlighted : 1; Eina_Bool highlight_root : 1; Eina_Bool on_translate : 1; /*<< This is true when any types of elm translate function is being called. */ diff --git a/legacy/elementary/src/lib/elm_widget_layout.h b/legacy/elementary/src/lib/elm_widget_layout.h index 40b0933..b9c8cf7 100644 --- a/legacy/elementary/src/lib/elm_widget_layout.h +++ b/legacy/elementary/src/lib/elm_widget_layout.h @@ -86,6 +86,7 @@ typedef struct _Elm_Layout_Smart_Data Eina_Bool needs_size_calc : 1; Eina_Bool restricted_calc_w : 1; Eina_Bool restricted_calc_h : 1; + Eina_Bool can_access : 1; /**< This is true when all text(including textblock) parts can be accessible by accessibility. */ } Elm_Layout_Smart_Data; /** -- 2.7.4