elm_widget_access_highlight_in_theme_set(obj, EINA_FALSE);
}
+static void
+_flush_mirrored_state(Eo *obj)
+{
+ char prefix[4], state[10], signal[100];
+
+ if (efl_ui_widget_disabled_get(obj))
+ snprintf(state, sizeof(state), "disabled");
+ else
+ snprintf(state, sizeof(state), "enabled");
+
+ if (!elm_widget_is_legacy(obj))
+ snprintf(prefix, sizeof(prefix), "efl");
+ else
+ snprintf(prefix, sizeof(prefix), "elm");
+
+ snprintf(signal, sizeof(signal), "%s,state,%s", prefix, state);
+ efl_layout_signal_emit(obj, signal, prefix);
+}
+
static Eina_Bool
_visuals_refresh(Evas_Object *obj,
Efl_Ui_Layout_Data *sd)
{
- Eina_Bool ret = EINA_FALSE;
-
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
/* TIZEN_ONLY(20180420): Do text/content set when new theme is applied */
efl_gfx_entity_scale_get(obj) * elm_config_scale_get());
_efl_ui_layout_highlight_in_theme(obj);
-
- ret = efl_ui_widget_on_disabled_update(obj, elm_widget_disabled_get(obj));
+ _flush_mirrored_state(obj);
elm_layout_sizing_eval(obj);
- return ret;
+ return EINA_TRUE;
}
-EOLIAN static Eina_Bool
-_efl_ui_layout_base_efl_ui_widget_on_disabled_update(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_UNUSED, Eina_Bool disabled)
+EOLIAN static void
+_efl_ui_layout_base_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_UNUSED, Eina_Bool disabled)
{
- ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
-
- // Not calling efl_super here: Elm.Widget simply returns false.
-
- if (elm_widget_is_legacy(obj))
- {
- if (disabled)
- edje_object_signal_emit
- (wd->resize_obj, "elm,state,disabled", "elm");
- else
- edje_object_signal_emit
- (wd->resize_obj, "elm,state,enabled", "elm");
- }
- else
- {
- if (disabled)
- edje_object_signal_emit
- (wd->resize_obj, "efl,state,disabled", "efl");
- else
- edje_object_signal_emit
- (wd->resize_obj, "efl,state,enabled", "efl");
- }
-
- return EINA_TRUE;
+ efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
+ _flush_mirrored_state(obj);
}
static Efl_Ui_Theme_Apply_Result
Efl.Layout.Group.part_exist { get; }
Efl.Ui.Widget.widget_sub_object_add;
Efl.Ui.Widget.theme_apply;
- Efl.Ui.Widget.on_disabled_update;
+ Efl.Ui.Widget.disabled {set;}
Efl.Ui.Widget.widget_sub_object_del;
Efl.Ui.Focus.Object.on_focus_update;
Efl.Container.content_count;
(obj, EFL_UI_EVENT_SCROLL, (void *) &event);
}
-EOLIAN static Eina_Bool
-_efl_ui_panel_efl_ui_widget_on_disabled_update(Eo *obj, Efl_Ui_Panel_Data *sd, Eina_Bool disabled)
+EOLIAN static void
+_efl_ui_panel_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Panel_Data *sd, Eina_Bool disabled)
{
- if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
- return EINA_FALSE;
+ efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
if (sd->scrollable)
{
sd->callback_added = EINA_TRUE;
}
}
-
- return EINA_TRUE;
}
EOLIAN static double
Efl.Gfx.Entity.size { set; }
Efl.Canvas.Group.group_member_add;
Efl.Ui.Widget.theme_apply;
- Efl.Ui.Widget.on_disabled_update;
+ Efl.Ui.Widget.disabled {set;}
Efl.Ui.Widget.on_access_update;
Efl.Ui.Widget.widget_event;
Efl.Ui.Widget.interest_region { get; }
}
/* we can't reuse layout's here, because it's on entry_edje only */
-EOLIAN static Eina_Bool
-_efl_ui_text_efl_ui_widget_on_disabled_update(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Bool disabled)
+EOLIAN static void
+_efl_ui_text_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Bool disabled)
{
- const char *emission ;
+ const char *emission;
+
+ efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
elm_drop_target_del(obj, sd->drop_format,
_dnd_enter_cb, NULL,
_dnd_pos_cb, NULL,
_dnd_drop_cb, NULL);
- emission = disabled ? "efl,state,disabled" : "efl,state,enabled";
+ emission = efl_ui_widget_disabled_get(obj) ? "efl,state,disabled" : "efl,state,enabled";
edje_object_signal_emit(sd->entry_edje, emission, "efl");
if (sd->scroll)
{
edje_object_signal_emit(sd->scr_edje, emission, "efl");
- //elm_interface_scrollable_freeze_set(obj, disabled);
+ elm_interface_scrollable_freeze_set(obj, efl_ui_widget_disabled_get(obj));
}
- sd->disabled = disabled;
+ sd->disabled = efl_ui_widget_disabled_get(obj);
- if (!disabled)
+ if (!efl_ui_widget_disabled_get(obj))
{
sd->drop_format = _get_drop_format(obj);
elm_drop_target_add(obj, sd->drop_format,
_dnd_pos_cb, NULL,
_dnd_drop_cb, NULL);
}
-
- return EINA_TRUE;
}
/* we can't issue the layout's theming code here, cause it assumes an
/**
* @internal
* Updates the text properties of the object from the theme.
- *
+ *
* This update functions skips any property that was already set,
* to allow users to override the theme during the construction of the widget.
*/
static Anchor *
_anchor_get(Eo *obj, Efl_Ui_Text_Data *sd, Efl_Text_Annotate_Annotation *an)
{
- Anchor *anc;
+ Anchor *anc;
Eina_List *i;
const char *str;
Efl.Ui.Widget.theme_apply;
Efl.Ui.Focus.Object.on_focus_update;
Efl.Ui.Widget.interest_region { get; }
- Efl.Ui.Widget.on_disabled_update;
+ Efl.Ui.Widget.disabled {set;}
//Efl.Ui.Widget.widget_sub_object_del;
//Elm.Interface_Scrollable.policy { set; }
//Elm.Interface_Scrollable.bounce_allow { set; }
static void _efl_ui_widget_efl_canvas_object_paragraph_direction_set_internal(Eo *obj EINA_UNUSED, Efl_Ui_Widget_Data *sd, Evas_BiDi_Direction dir); // TIZEN_ONLY(20180117): Override Paragraph Direction APIs
static void _if_focused_revert(Evas_Object *obj, Eina_Bool can_focus_only); //TIZEN_ONLY(20180607): Restore legacy focus
-static void elm_widget_disabled_internal(Eo *obj, Eina_Bool disabled);
static void _on_sub_obj_hide(void *data, const Efl_Event *event);
static inline Eina_Bool _elm_widget_focus_chain_manager_is(const Evas_Object *obj);
efl_isa(obj, EFL_UI_SCROLLABLE_INTERACTIVE_INTERFACE);
}
-static void _on_sub_obj_del(void *data, const Efl_Event *event);
+static void
+_on_sub_obj_del(void *data, const Efl_Event *event);
static void _propagate_event(void *data, const Efl_Event *eo_event);
static void _elm_widget_focus_tree_unfocusable_handle(Eo *obj);
static void _elm_widget_shadow_update(Efl_Ui_Widget *obj);
_efl_ui_widget_theme_apply(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
{
_elm_widget_mirrored_reload(obj);
- if (elm_widget_disabled_get(obj))
- elm_widget_disabled_internal(obj, elm_widget_disabled_get(obj));
return EFL_UI_THEME_APPLY_RESULT_SUCCESS;
}
if (elm_widget_is_legacy(sobj))
efl_ui_widget_focus_disabled_handle(sobj);
//
- efl_ui_widget_on_disabled_update(sobj, EINA_TRUE);
}
}
+ efl_ui_widget_disabled_set(sobj, efl_ui_widget_disabled_get(obj));
_elm_widget_top_win_focused_set(sobj, sd->top_win_focused);
}
EOLIAN static void
-_efl_ui_widget_disabled_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool disabled)
+_efl_ui_widget_disabled_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina_Bool disabled)
{
- if (sd->disabled == disabled) return;
- sd->disabled = !!disabled;
+ Efl_Ui_Widget *subs;
+ Eina_List *n;
+
+ if (disabled)
+ pd->disabled ++;
+ else
+ pd->disabled = MAX(pd->disabled - 1 ,0);
- elm_widget_disabled_internal(obj, disabled);
+ EINA_LIST_FOREACH(pd->subobjs, n, subs)
+ {
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is(subs))
+ {
+ if (elm_widget_is_legacy(subs))
+ efl_ui_widget_focus_disabled_handle((Evas_Object *)subs);
+ }
+ //
+ if (efl_isa(subs, EFL_UI_WIDGET_CLASS))
+ efl_ui_widget_disabled_set(subs, efl_ui_widget_disabled_get(obj));
+ }
if (efl_finalized_get(obj))
- _elm_widget_full_eval_children(obj, sd);
+ _elm_widget_full_eval_children(obj, pd);
}
EOLIAN static Eina_Bool
-_efl_ui_widget_disabled_get(const Eo *obj, Elm_Widget_Smart_Data *sd)
+_efl_ui_widget_disabled_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd)
{
- Eo *parent;
-
- if (sd->disabled) return EINA_TRUE;
- if ((parent = elm_widget_parent_get(obj)) != NULL)
- return elm_widget_disabled_get(parent);
- return EINA_FALSE;
+ return pd->disabled > 0;
}
/**
}
EOLIAN static Eina_Bool
-_efl_ui_widget_on_disabled_update(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Eina_Bool disabled EINA_UNUSED)
-{
- return EINA_FALSE;
-}
-
-EOLIAN static Eina_Bool
_efl_ui_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *source EINA_UNUSED)
{
return EINA_FALSE;
//END
-static void
-_elm_widget_disabled_eval(const Evas_Object *obj, Eina_Bool disabled)
-{
- const Eina_List *l;
- Evas_Object *child;
- ELM_WIDGET_DATA_GET(obj, sd);
-
- EINA_LIST_FOREACH(sd->subobjs, l, child)
- {
- if (elm_widget_is(child))
- {
- //TIZEN_ONLY(20180607): Restore legacy focus
- if (elm_widget_is_legacy(obj))
- efl_ui_widget_focus_disabled_handle((Evas_Object *)obj);
- //
- efl_ui_widget_on_disabled_update(child, disabled);
- _elm_widget_disabled_eval(child, disabled);
- }
- }
-}
-
-static void
-elm_widget_disabled_internal(Eo *obj, Eina_Bool disabled)
-{
- if (!disabled && elm_widget_disabled_get(elm_widget_parent_get(obj)))
- return;
- //TIZEN_ONLY(20180607): Restore legacy focus
- if (elm_widget_is_legacy(obj))
- efl_ui_widget_focus_disabled_handle(obj);
- //
- efl_ui_widget_on_disabled_update(obj, disabled);
- _elm_widget_disabled_eval(obj, disabled);
-}
-
-
EOLIAN static void
_efl_ui_widget_show_region_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Rect sr, Eina_Bool forceshow)
{
@property disabled {
[[Whether the widget is enabled (accepts and reacts to user inputs).
+ The property works counted, this means, whenever n-caller set the value to $true, n-caller have to set it to $false in order to get it out of the disabled state again.
+
Each widget may handle the disabled state differently, but overall
disabled widgets shall not respond to any input events. This is
$false by default, meaning the widget is enabled.
@.orientation_mode is $disabled.]]
}
}
- on_disabled_update @protected {
- [[Virtual function called when the widget becomes disabled.
-
- This may be triggered even if this widget is not disabled, as the
- parent widget could be disabled and propagate its state.
- ]]
- params {
- disabled: bool; [[The new value of @.disabled.]]
- }
- return: bool; [[Indicates if the operation succeeded.]]
- }
theme_apply @protected {
[[Virtual function called when the widget needs to re-apply its theme.
_elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd)
{
Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
- Eina_Bool ret = EINA_FALSE, prev_alpha;
+ Eina_Bool prev_alpha;
const char *s;
int_ret = elm_widget_theme_object_set(obj, sd->legacy.edje, "win", "base",
efl_gfx_entity_scale_get(obj) * elm_config_scale_get());
efl_event_callback_legacy_call(obj, EFL_UI_WIN_EVENT_THEME_CHANGED, NULL);
- ret = efl_ui_widget_on_disabled_update(obj, elm_widget_disabled_get(obj));
-
- if (!ret) int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL;
prev_alpha = sd->theme_alpha;
s = edje_object_data_get(sd->legacy.edje, "alpha");
return ELM_SEL_FORMAT_MARKUP;
}
-/* we can't reuse layout's here, because it's on entry_edje only */
-EOLIAN static Eina_Bool
-_elm_entry_efl_ui_widget_on_disabled_update(Eo *obj, Elm_Entry_Data *sd, Eina_Bool disabled)
+static void
+_flush_disabled_state(Eo *obj, Elm_Entry_Data *sd)
{
const char *emission;
+ emission = efl_ui_widget_disabled_get(obj) ? "elm,state,disabled" : "elm,state,enabled";
+ edje_object_signal_emit(sd->entry_edje, emission, "elm");
+ if (sd->scroll)
+ {
+ edje_object_signal_emit(sd->scr_edje, emission, "elm");
+ elm_interface_scrollable_freeze_set(obj, efl_ui_widget_disabled_get(obj));
+ }
+}
+
+/* we can't reuse layout's here, because it's on entry_edje only */
+EOLIAN static void
+_elm_entry_efl_ui_widget_disabled_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool disabled)
+{
+
+ efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
elm_drop_target_del(obj, sd->drop_format,
_dnd_enter_cb, NULL,
_dnd_pos_cb, NULL,
_dnd_drop_cb, NULL);
- emission = disabled ? "elm,state,disabled" : "elm,state,enabled";
- edje_object_signal_emit(sd->entry_edje, emission, "elm");
- if (sd->scroll)
- {
- edje_object_signal_emit(sd->scr_edje, emission, "elm");
- elm_interface_scrollable_freeze_set(obj, disabled);
- }
- sd->disabled = disabled;
+ _flush_disabled_state(obj, sd);
+ sd->disabled = efl_ui_widget_disabled_get(obj);
- if (!disabled)
+ if (!efl_ui_widget_disabled_get(obj))
{
sd->drop_format = _get_drop_format(obj);
elm_drop_target_add(obj, sd->drop_format,
_dnd_pos_cb, NULL,
_dnd_drop_cb, NULL);
}
-
- return EINA_TRUE;
}
/* It gets the background object from from_edje object and
evas_object_unref(obj);
+ _flush_disabled_state(obj, sd);
+
return theme_apply;
}
Efl.Ui.Widget_Focus_Manager.focus_manager_create;
Efl.Ui.Focus.Object.on_focus_update;
Efl.Ui.Widget.interest_region { get; }
- Efl.Ui.Widget.on_disabled_update;
+ Efl.Ui.Widget.disabled {set;}
Efl.Ui.Widget.widget_sub_object_del;
Elm.Interface_Scrollable.policy { set; }
Elm.Interface_Scrollable.bounce_allow { set; }
}
}
-EOLIAN static Eina_Bool
-_elm_gesture_layer_efl_ui_widget_on_disabled_update(Eo *obj, Elm_Gesture_Layer_Data *_pd EINA_UNUSED, Eina_Bool disabled)
+EOLIAN static void
+_elm_gesture_layer_efl_ui_widget_disabled_set(Eo *obj, Elm_Gesture_Layer_Data *_pd EINA_UNUSED, Eina_Bool disabled)
{
- if (disabled)
+ efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
+
+ if (efl_ui_widget_disabled_get(obj))
_callbacks_unregister(obj);
else
_callbacks_register(obj);
-
- return EINA_TRUE;
}
EOLIAN static void
implements {
class.constructor;
Efl.Object.constructor;
- Efl.Ui.Widget.on_disabled_update;
+ Efl.Ui.Widget.disabled {set;}
}
}
elm_interface_scrollable_content_region_set(obj, r.x, r.y, r.w, r.h);
}
-EOLIAN static Eina_Bool
-_elm_list_efl_ui_widget_on_disabled_update(Eo *obj, Elm_List_Data *sd, Eina_Bool disabled)
+EOLIAN static void
+_elm_list_efl_ui_widget_disabled_set(Eo *obj, Elm_List_Data *sd, Eina_Bool disabled)
{
- if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
- return EINA_FALSE;
+ efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
- if (disabled)
+ if (efl_ui_widget_disabled_get(obj))
{
elm_widget_scroll_freeze_push(obj);
elm_widget_scroll_hold_push(obj);
elm_widget_scroll_freeze_pop(obj);
elm_widget_scroll_hold_pop(obj);
}
-
- return EINA_TRUE;
}
static void
Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.on_access_update;
Efl.Ui.Widget.focus_highlight_geometry { get; }
- Efl.Ui.Widget.on_disabled_update;
+ Efl.Ui.Widget.disabled {set;}
Efl.Ui.Focus.Object.on_focus_update;
Efl.Ui.L10n.translation_update;
Efl.Ui.Widget.widget_sub_object_del;
Eina_Bool disabled)
{
EINA_SAFETY_ON_NULL_RETURN(obj);
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, pd);
+ ELM_WIDGET_DATA_GET_OR_RETURN(efl_ui_widget_parent_get(obj), ppd);
+ if (disabled)
+ {
+ //we aim here for the disabled count of parent + 1
+ if (pd->disabled == ppd->disabled + 1) return;
+ pd->disabled = ppd->disabled;
+ }
+ else
+ {
+ //we aim for the same disabled count as the parent here
+ if (pd->disabled == ppd->disabled) return;
+ pd->disabled = ppd->disabled + 1;
+ }
elm_widget_disabled_set(obj, disabled);
}
(obj, EFL_UI_EVENT_SCROLL, (void *) &event);
}
-EOLIAN static Eina_Bool
-_elm_panel_efl_ui_widget_on_disabled_update(Eo *obj, Elm_Panel_Data *sd, Eina_Bool disabled)
+EOLIAN static void
+_elm_panel_efl_ui_widget_disabled_set(Eo *obj, Elm_Panel_Data *sd, Eina_Bool disabled)
{
- if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
- return EINA_FALSE;
+ efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
if (sd->scrollable)
{
- if (disabled && sd->callback_added)
+ if (efl_ui_widget_disabled_get(obj) && sd->callback_added)
{
evas_object_event_callback_del(obj, EVAS_CALLBACK_MOUSE_DOWN,
_on_mouse_down);
sd->callback_added = EINA_FALSE;
}
- else if (!disabled && !sd->callback_added)
+ else if (!efl_ui_widget_disabled_get(obj) && !sd->callback_added)
{
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_DOWN,
_on_mouse_down, sd);
sd->callback_added = EINA_TRUE;
}
}
-
- return EINA_TRUE;
}
EOLIAN static double
Efl.Gfx.Entity.size { set; }
Efl.Canvas.Group.group_member_add;
Efl.Ui.Widget.theme_apply;
- Efl.Ui.Widget.on_disabled_update;
+ Efl.Ui.Widget.disabled {set;}
Efl.Ui.Widget.on_access_update;
Efl.Ui.Widget.widget_event;
Efl.Ui.Widget.interest_region { get; }
return int_ret;
}
-EOLIAN static Eina_Bool
-_elm_segment_control_efl_ui_widget_on_disabled_update(Eo *obj, Elm_Segment_Control_Data *sd, Eina_Bool disabled)
-{
- if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
- return EINA_FALSE;
+EOLIAN static void
+_elm_segment_control_efl_ui_widget_disabled_set(Eo *obj, Elm_Segment_Control_Data *sd, Eina_Bool disabled)
+{
+ efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
_update_list(sd);
-
- return EINA_TRUE;
}
// TODO: elm_widget_focus_list_next_get supports only Elm_widget list,
Efl.Object.constructor;
Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.on_access_update;
- Efl.Ui.Widget.on_disabled_update;
+ Efl.Ui.Widget.disabled {set;}
Efl.Ui.L10n.translation_update;
}
events {
//
//TIZEN_ONLY(20170419): fix slider indicator behavior
-EOLIAN static Eina_Bool
-_elm_slider_efl_ui_widget_on_disabled_update(Eo *obj, Elm_Slider_Data *sd, Eina_Bool disabled)
+EOLIAN static void
+_elm_slider_efl_ui_widget_disabled_set(Eo *obj, Elm_Slider_Data *sd, Eina_Bool disabled)
{
- if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
- return EINA_FALSE;
+ efl_ui_widget_disabled_set(efl_super(obj, MY_CLASS), disabled);
if (sd->popup)
{
else
edje_object_signal_emit(sd->popup2, "elm,state,enabled", "elm");
}
-
- return EINA_TRUE;
}
//
Efl.Part.part_get;
//TIZEN_ONLY(20170419): fix slider indicator behavior
- Efl.Ui.Widget.on_disabled_update;
+ Efl.Ui.Widget.disabled {set;}
//
//TIZEN_ONLY(20161115): apply UI Mirroring for Tizen 3.0 UX
int child_drag_x_locked;
int child_drag_y_locked;
+ int disabled;
Eina_Inlist *translate_strings;
Eina_List *focus_chain;
Eina_Bool highlight_ignore : 1;
Eina_Bool highlight_in_theme : 1;
Eina_Bool access_highlight_in_theme : 1;
- Eina_Bool disabled : 1;
Eina_Bool is_mirrored : 1;
Eina_Bool mirrored_auto_mode : 1; /* This is TRUE by default */
Eina_Bool still_in : 1;
elm_ctxpopup_horizontal_set(obj, sd->horizontal);
}
-EOLIAN static Eina_Bool
-_elm_ctxpopup_efl_ui_widget_on_disabled_update(Eo *obj, Elm_Ctxpopup_Data *sd, Eina_Bool disabled)
-{
- Eina_List *l;
- Elm_Ctxpopup_Item_Data *it;
-
- if (!efl_ui_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
- return EINA_FALSE;
-
- EINA_LIST_FOREACH(sd->items, l, it)
- elm_object_disabled_set(EO_OBJ(it), disabled);
-
- return EINA_TRUE;
-}
-
EOLIAN static void
_elm_ctxpopup_efl_canvas_group_group_add(Eo *obj, Elm_Ctxpopup_Data *priv)
{
}
EFL_END_TEST
+EFL_START_TEST(elm_box_disabled_test)
+{
+ Evas_Object *win, *box, *o;
+ Efl_Access_Role role;
+
+ win = win_add(NULL, "box", ELM_WIN_BASIC);
+
+ box = elm_box_add(win);
+ elm_win_resize_object_add(box, win);
+ role = efl_access_object_role_get(box);
+
+ for (int i = 0; i < 3; ++i)
+ {
+ o = elm_button_add(box);
+ elm_box_pack_end(box, o);
+ }
+
+ elm_object_disabled_set(box, EINA_TRUE);
+ elm_object_disabled_set(box, EINA_TRUE);
+ ck_assert_int_eq(elm_object_disabled_get(box), EINA_TRUE);
+ ck_assert_int_eq(elm_object_disabled_get(o), EINA_TRUE);
+ elm_object_disabled_set(box, EINA_FALSE);
+ ck_assert_int_eq(elm_object_disabled_get(box), EINA_FALSE);
+ ck_assert_int_eq(elm_object_disabled_get(o), EINA_FALSE);
+ elm_object_disabled_set(box, EINA_TRUE);
+ elm_object_disabled_set(o, EINA_TRUE);
+ ck_assert_int_eq(elm_object_disabled_get(box), EINA_TRUE);
+ ck_assert_int_eq(elm_object_disabled_get(o), EINA_TRUE);
+ elm_object_disabled_set(box, EINA_FALSE);
+ ck_assert_int_eq(elm_object_disabled_get(box), EINA_FALSE);
+ ck_assert_int_eq(elm_object_disabled_get(o), EINA_TRUE);
+
+ ck_assert(role == EFL_ACCESS_ROLE_FILLER);
+
+}
+EFL_END_TEST
+
void elm_test_box(TCase *tc)
{
tcase_add_test(tc, elm_box_legacy_type_check);
tcase_add_test(tc, elm_atspi_role_get);
+ tcase_add_test(tc, elm_box_disabled_test);
}