forked from enlightenment/efl
widget: Rename hook "disable" (EO)
Renamed to on_disabled_update. Also passed in the new state of disabled. It's more convenient this way, than having the subclasses call disabled_get. Also simplify some code... Ref T5363
This commit is contained in:
parent
6e5e8e567b
commit
6aa309ffb8
|
@ -530,19 +530,18 @@ _efl_ui_clock_elm_widget_on_focus(Eo *obj, Efl_Ui_Clock_Data *sd, Elm_Object_Ite
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_clock_elm_widget_disable(Eo *obj, Efl_Ui_Clock_Data *sd)
|
||||
_efl_ui_clock_elm_widget_on_disabled_update(Eo *obj, Efl_Ui_Clock_Data *sd, Eina_Bool disabled)
|
||||
{
|
||||
Clock_Field *field;
|
||||
unsigned int idx = 0;
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
int_ret = elm_obj_widget_disable(efl_super(obj, MY_CLASS));
|
||||
if (!int_ret) return EINA_FALSE;
|
||||
if (!elm_obj_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
|
||||
return EINA_FALSE;
|
||||
|
||||
for (idx = 0; idx < EFL_UI_CLOCK_TYPE_COUNT; idx++)
|
||||
{
|
||||
field = sd->field_list + idx;
|
||||
elm_object_disabled_set(field->item_obj, elm_object_disabled_get(obj));
|
||||
elm_object_disabled_set(field->item_obj, disabled);
|
||||
}
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ class Efl.Ui.Clock (Efl.Ui.Layout)
|
|||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.on_focus;
|
||||
Elm.Widget.translate;
|
||||
}
|
||||
|
|
|
@ -327,7 +327,7 @@ _visuals_refresh(Evas_Object *obj,
|
|||
|
||||
_efl_ui_layout_highlight_in_theme(obj);
|
||||
|
||||
ret = elm_obj_widget_disable(obj);
|
||||
ret = elm_obj_widget_on_disabled_update(obj, elm_widget_disabled_get(obj));
|
||||
|
||||
elm_layout_sizing_eval(obj);
|
||||
|
||||
|
@ -335,11 +335,13 @@ _visuals_refresh(Evas_Object *obj,
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_layout_elm_widget_disable(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_UNUSED)
|
||||
_efl_ui_layout_elm_widget_on_disabled_update(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_UNUSED, Eina_Bool disabled)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
||||
|
||||
if (elm_object_disabled_get(obj))
|
||||
// Not calling efl_super here: Elm.Widget simply returns false.
|
||||
|
||||
if (disabled)
|
||||
edje_object_signal_emit
|
||||
(wd->resize_obj, "elm,state,disabled", "elm");
|
||||
else
|
||||
|
|
|
@ -64,7 +64,7 @@ class Efl.Ui.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
|
|||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.on_focus;
|
||||
Efl.Container.content_count;
|
||||
|
|
|
@ -843,32 +843,27 @@ _get_drop_format(Evas_Object *obj)
|
|||
|
||||
/* we can't reuse layout's here, because it's on entry_edje only */
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_text_elm_widget_disable(Eo *obj, Efl_Ui_Text_Data *sd)
|
||||
_efl_ui_text_elm_widget_on_disabled_update(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Bool disabled)
|
||||
{
|
||||
const char *emission ;
|
||||
|
||||
elm_drop_target_del(obj, sd->drop_format,
|
||||
_dnd_enter_cb, NULL,
|
||||
_dnd_leave_cb, NULL,
|
||||
_dnd_pos_cb, NULL,
|
||||
_dnd_drop_cb, NULL);
|
||||
if (elm_object_disabled_get(obj))
|
||||
|
||||
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->entry_edje, "elm,state,disabled", "elm");
|
||||
if (sd->scroll)
|
||||
{
|
||||
edje_object_signal_emit(sd->scr_edje, "elm,state,disabled", "elm");
|
||||
elm_interface_scrollable_freeze_set(obj, EINA_TRUE);
|
||||
}
|
||||
sd->disabled = EINA_TRUE;
|
||||
edje_object_signal_emit(sd->scr_edje, emission, "elm");
|
||||
elm_interface_scrollable_freeze_set(obj, disabled);
|
||||
}
|
||||
else
|
||||
sd->disabled = disabled;
|
||||
|
||||
if (!disabled)
|
||||
{
|
||||
edje_object_signal_emit(sd->entry_edje, "elm,state,enabled", "elm");
|
||||
if (sd->scroll)
|
||||
{
|
||||
edje_object_signal_emit(sd->scr_edje, "elm,state,enabled", "elm");
|
||||
elm_interface_scrollable_freeze_set(obj, EINA_FALSE);
|
||||
}
|
||||
sd->disabled = EINA_FALSE;
|
||||
sd->drop_format = _get_drop_format(obj);
|
||||
elm_drop_target_add(obj, sd->drop_format,
|
||||
_dnd_enter_cb, NULL,
|
||||
|
|
|
@ -412,7 +412,7 @@ class Efl.Ui.Text (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
|
|||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.on_focus;
|
||||
Elm.Widget.on_focus_region;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Interface_Scrollable.policy { set; }
|
||||
|
|
|
@ -6313,7 +6313,7 @@ _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd)
|
|||
efl_ui_scale_get(obj) * elm_config_scale_get());
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_UI_WIN_EVENT_THEME_CHANGED, NULL);
|
||||
ret = elm_obj_widget_disable(obj);
|
||||
ret = elm_obj_widget_on_disabled_update(obj, elm_widget_disabled_get(obj));
|
||||
|
||||
if (!ret) int_ret = EFL_UI_THEME_APPLY_FAILED;
|
||||
|
||||
|
|
|
@ -1091,16 +1091,12 @@ _elm_ctxpopup_item_efl_object_destructor(Eo *eo_ctxpopup_it,
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_ctxpopup_elm_widget_disable(Eo *obj, Elm_Ctxpopup_Data *sd)
|
||||
_elm_ctxpopup_elm_widget_on_disabled_update(Eo *obj, Elm_Ctxpopup_Data *sd, Eina_Bool disabled)
|
||||
{
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
if (!elm_obj_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
|
||||
return EINA_FALSE;
|
||||
|
||||
int_ret = elm_obj_widget_disable(efl_super(obj, MY_CLASS));
|
||||
if (!int_ret) return EINA_FALSE;
|
||||
if (sd->list)
|
||||
elm_object_disabled_set(sd->list, elm_widget_disabled_get(obj));
|
||||
else if (sd->content)
|
||||
elm_object_disabled_set(sd->content, elm_widget_disabled_get(obj));
|
||||
elm_object_disabled_set(sd->list ?: sd->content, disabled);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -239,18 +239,13 @@ _elm_fileselector_entry_elm_widget_theme_apply(Eo *obj, Elm_Fileselector_Entry_D
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_fileselector_entry_elm_widget_disable(Eo *obj, Elm_Fileselector_Entry_Data *sd)
|
||||
_elm_fileselector_entry_elm_widget_on_disabled_update(Eo *obj, Elm_Fileselector_Entry_Data *sd, Eina_Bool disabled)
|
||||
{
|
||||
Eina_Bool val;
|
||||
if (!elm_obj_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
|
||||
return EINA_FALSE;
|
||||
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
int_ret = elm_obj_widget_disable(efl_super(obj, MY_CLASS));
|
||||
if (!int_ret) return EINA_FALSE;
|
||||
|
||||
val = elm_widget_disabled_get(obj);
|
||||
|
||||
elm_widget_disabled_set(sd->button, val);
|
||||
elm_widget_disabled_set(sd->entry, val);
|
||||
elm_widget_disabled_set(sd->button, disabled);
|
||||
elm_widget_disabled_set(sd->entry, disabled);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ class Elm.Ctxpopup (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action,
|
|||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.widget_sub_object_add;
|
||||
Elm.Widget.translate;
|
||||
Elm.Widget.theme_apply;
|
||||
|
|
|
@ -791,32 +791,27 @@ _get_drop_format(Evas_Object *obj)
|
|||
|
||||
/* we can't reuse layout's here, because it's on entry_edje only */
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_entry_elm_widget_disable(Eo *obj, Elm_Entry_Data *sd)
|
||||
_elm_entry_elm_widget_on_disabled_update(Eo *obj, Elm_Entry_Data *sd, Eina_Bool disabled)
|
||||
{
|
||||
const char *emission;
|
||||
|
||||
elm_drop_target_del(obj, sd->drop_format,
|
||||
_dnd_enter_cb, NULL,
|
||||
_dnd_leave_cb, NULL,
|
||||
_dnd_pos_cb, NULL,
|
||||
_dnd_drop_cb, NULL);
|
||||
if (elm_object_disabled_get(obj))
|
||||
|
||||
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->entry_edje, "elm,state,disabled", "elm");
|
||||
if (sd->scroll)
|
||||
{
|
||||
edje_object_signal_emit(sd->scr_edje, "elm,state,disabled", "elm");
|
||||
elm_interface_scrollable_freeze_set(obj, EINA_TRUE);
|
||||
}
|
||||
sd->disabled = EINA_TRUE;
|
||||
edje_object_signal_emit(sd->scr_edje, emission, "elm");
|
||||
elm_interface_scrollable_freeze_set(obj, disabled);
|
||||
}
|
||||
else
|
||||
sd->disabled = disabled;
|
||||
|
||||
if (!disabled)
|
||||
{
|
||||
edje_object_signal_emit(sd->entry_edje, "elm,state,enabled", "elm");
|
||||
if (sd->scroll)
|
||||
{
|
||||
edje_object_signal_emit(sd->scr_edje, "elm,state,enabled", "elm");
|
||||
elm_interface_scrollable_freeze_set(obj, EINA_FALSE);
|
||||
}
|
||||
sd->disabled = EINA_FALSE;
|
||||
sd->drop_format = _get_drop_format(obj);
|
||||
elm_drop_target_add(obj, sd->drop_format,
|
||||
_dnd_enter_cb, NULL,
|
||||
|
|
|
@ -962,7 +962,7 @@ class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
|
|||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.on_focus;
|
||||
Elm.Widget.on_focus_region;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Interface_Scrollable.policy { set; }
|
||||
|
|
|
@ -9,7 +9,7 @@ class Elm.Fileselector_Entry (Efl.Ui.Layout, Elm.Interface.Fileselector,
|
|||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Interface.Fileselector.selected_model_get;
|
||||
Elm.Interface.Fileselector.selected_model_set;
|
||||
|
|
|
@ -3739,9 +3739,9 @@ _rotate_test(Evas_Object *obj,
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_gesture_layer_elm_widget_disable(Eo *obj, Elm_Gesture_Layer_Data *_pd EINA_UNUSED)
|
||||
_elm_gesture_layer_elm_widget_on_disabled_update(Eo *obj, Elm_Gesture_Layer_Data *_pd EINA_UNUSED, Eina_Bool disabled)
|
||||
{
|
||||
if (elm_widget_disabled_get(obj))
|
||||
if (disabled)
|
||||
_callbacks_unregister(obj);
|
||||
else
|
||||
_callbacks_register(obj);
|
||||
|
|
|
@ -162,6 +162,6 @@ class Elm.Gesture_Layer (Elm.Widget)
|
|||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1033,13 +1033,12 @@ _show_region_hook(void *data EINA_UNUSED, Evas_Object *obj, Eina_Rectangle r)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_list_elm_widget_disable(Eo *obj, Elm_List_Data *sd)
|
||||
_elm_list_elm_widget_on_disabled_update(Eo *obj, Elm_List_Data *sd, Eina_Bool disabled)
|
||||
{
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
int_ret = elm_obj_widget_disable(efl_super(obj, MY_CLASS));
|
||||
if (!int_ret) return EINA_FALSE;
|
||||
if (!elm_obj_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
|
||||
return EINA_FALSE;
|
||||
|
||||
if (elm_widget_disabled_get(obj))
|
||||
if (disabled)
|
||||
{
|
||||
elm_widget_scroll_freeze_push(obj);
|
||||
elm_widget_scroll_hold_push(obj);
|
||||
|
|
|
@ -439,7 +439,7 @@ class Elm.List (Efl.Ui.Layout, Elm.Interface_Scrollable,
|
|||
Elm.Widget.access;
|
||||
Elm.Widget.focus_highlight_geometry_get;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.on_focus;
|
||||
Elm.Widget.translate;
|
||||
Elm.Widget.widget_sub_object_del;
|
||||
|
|
|
@ -1276,15 +1276,14 @@ _scroll_cb(Evas_Object *obj, void *data EINA_UNUSED)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_panel_elm_widget_disable(Eo *obj, Elm_Panel_Data *sd)
|
||||
_elm_panel_elm_widget_on_disabled_update(Eo *obj, Elm_Panel_Data *sd, Eina_Bool disabled)
|
||||
{
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
int_ret = elm_obj_widget_disable(efl_super(obj, MY_CLASS));
|
||||
if (!int_ret) return EINA_FALSE;
|
||||
if (!elm_obj_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
|
||||
return EINA_FALSE;
|
||||
|
||||
if (sd->scrollable)
|
||||
{
|
||||
if (elm_widget_disabled_get(obj))
|
||||
if (disabled)
|
||||
{
|
||||
evas_object_event_callback_del(obj, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_on_mouse_down);
|
||||
|
|
|
@ -82,7 +82,7 @@ class Elm.Panel (Efl.Ui.Layout, Elm.Interface_Scrollable,
|
|||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus_next_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.access;
|
||||
Elm.Widget.widget_event;
|
||||
Elm.Widget.on_focus_region;
|
||||
|
|
|
@ -245,11 +245,10 @@ _elm_segment_control_elm_widget_theme_apply(Eo *obj, Elm_Segment_Control_Data *s
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_segment_control_elm_widget_disable(Eo *obj, Elm_Segment_Control_Data *sd)
|
||||
_elm_segment_control_elm_widget_on_disabled_update(Eo *obj, Elm_Segment_Control_Data *sd, Eina_Bool disabled)
|
||||
{
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
int_ret = elm_obj_widget_disable(efl_super(obj, MY_CLASS));
|
||||
if (!int_ret) return EINA_FALSE;
|
||||
if (!elm_obj_widget_on_disabled_update(efl_super(obj, MY_CLASS), disabled))
|
||||
return EINA_FALSE;
|
||||
|
||||
_update_list(sd);
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ class Elm.Segment_Control (Efl.Ui.Layout)
|
|||
Elm.Widget.focus_next;
|
||||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.access;
|
||||
Elm.Widget.disable;
|
||||
Elm.Widget.on_disabled_update;
|
||||
Elm.Widget.translate;
|
||||
}
|
||||
events {
|
||||
|
|
|
@ -1433,7 +1433,7 @@ _elm_widget_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Objec
|
|||
if (!sdc->disabled && (elm_widget_disabled_get(obj)))
|
||||
{
|
||||
elm_widget_focus_disabled_handle(sobj);
|
||||
elm_obj_widget_disable(sobj);
|
||||
elm_obj_widget_on_disabled_update(sobj, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3358,53 +3358,26 @@ _elm_widget_disabled_eval(const Evas_Object *obj, Eina_Bool disabled)
|
|||
Evas_Object *child;
|
||||
ELM_WIDGET_DATA_GET(obj, sd);
|
||||
|
||||
if (disabled)
|
||||
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||
{
|
||||
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||
if (elm_widget_is(child))
|
||||
{
|
||||
if (elm_widget_is(child))
|
||||
{
|
||||
elm_widget_focus_disabled_handle(child);
|
||||
elm_obj_widget_disable(child);
|
||||
_elm_widget_disabled_eval(child, EINA_TRUE);
|
||||
}
|
||||
elm_widget_focus_disabled_handle(child);
|
||||
elm_obj_widget_on_disabled_update(child, disabled);
|
||||
_elm_widget_disabled_eval(child, disabled);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||
if (elm_widget_is(child))
|
||||
{
|
||||
ELM_WIDGET_DATA_GET(child, sdc);
|
||||
if (!sdc->disabled)
|
||||
{
|
||||
elm_widget_focus_disabled_handle(child);
|
||||
elm_obj_widget_disable(child);
|
||||
_elm_widget_disabled_eval(child, EINA_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
elm_widget_disabled_internal(Eo *obj, Eina_Bool disabled)
|
||||
{
|
||||
Eina_Bool parent_state = EINA_FALSE;
|
||||
if (!disabled && elm_widget_disabled_get(elm_widget_parent_get(obj)))
|
||||
return;
|
||||
|
||||
if (disabled)
|
||||
{
|
||||
elm_widget_focus_disabled_handle(obj);
|
||||
elm_obj_widget_disable(obj);
|
||||
_elm_widget_disabled_eval(obj, EINA_TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
parent_state = elm_widget_disabled_get(elm_widget_parent_get(obj));
|
||||
if (parent_state) return;
|
||||
elm_widget_focus_disabled_handle(obj);
|
||||
elm_obj_widget_disable(obj);
|
||||
_elm_widget_disabled_eval(obj, EINA_FALSE);
|
||||
}
|
||||
elm_widget_focus_disabled_handle(obj);
|
||||
elm_obj_widget_on_disabled_update(obj, disabled);
|
||||
_elm_widget_disabled_eval(obj, disabled);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -3422,11 +3395,8 @@ _elm_widget_disabled_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool disabled)
|
|||
EOLIAN static Eina_Bool
|
||||
_elm_widget_disabled_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
|
||||
{
|
||||
Eina_Bool disabled = EINA_FALSE;
|
||||
|
||||
if (sd->disabled) disabled = EINA_TRUE;
|
||||
else disabled = elm_widget_disabled_get(elm_widget_parent_get(obj));
|
||||
return disabled;
|
||||
if (sd->disabled) return EINA_TRUE;
|
||||
return elm_widget_disabled_get(elm_widget_parent_get(obj));
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -6245,7 +6215,7 @@ _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item *item E
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_widget_disable(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
|
||||
_elm_widget_on_disabled_update(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Eina_Bool disabled EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,21 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
|
|||
disabled widgets shall not respond to any input events. This is
|
||||
$false by default, meaning the widget is enabled.
|
||||
]]
|
||||
set {
|
||||
[[Enables or disables this widget.
|
||||
|
||||
Disabling a widget will disable all its children recursively,
|
||||
but only this widget will be marked as disabled internally.
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Returns whether the widget is disabled.
|
||||
|
||||
This will return $true if any widget in the parent hierarchy
|
||||
is disabled. Re-enabling that parent may in turn change the
|
||||
disabled state of this widget.
|
||||
]]
|
||||
}
|
||||
values {
|
||||
disabled: bool(false); [[$true if the widget is disabled.]]
|
||||
}
|
||||
|
@ -362,6 +377,9 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
|
|||
will emit the signal "elm,state,orient,$R" will be emitted (where $R
|
||||
is the rotation angle in degrees).
|
||||
|
||||
Note: This function may be called even if the orientation has not
|
||||
actually changed, like when a widget needs to be reconfigured.
|
||||
|
||||
See also @Efl.Orientation.orientation.set.
|
||||
]]
|
||||
params {
|
||||
|
@ -369,9 +387,16 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
|
|||
@.orientation_mode_disabled is $true.]]
|
||||
}
|
||||
}
|
||||
disable {
|
||||
[['Virtual' function on the widget being disabled.]]
|
||||
return: bool; [[$true on success, $false otherwise]]
|
||||
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 {
|
||||
[['Virtual' function on the widget being re-themed.]]
|
||||
|
|
Loading…
Reference in New Issue