forked from enlightenment/efl
efl_ui_widget: remove focused_item
focused_item is only used in item containers. This API is now moved into a widget item container, which *can* have a focused item. ref T7553 Reviewed-by: WooHyun Jung <woohyun0705@gmail.com> Differential Revision: https://phab.enlightenment.org/D8013
This commit is contained in:
parent
ddb3bd7d21
commit
5235f1da85
|
@ -158,6 +158,7 @@ elm_public_eolian_files += \
|
||||||
lib/elementary/elm_view_form.eo \
|
lib/elementary/elm_view_form.eo \
|
||||||
lib/elementary/elm_web.eo \
|
lib/elementary/elm_web.eo \
|
||||||
lib/elementary/elm_widget_item.eo \
|
lib/elementary/elm_widget_item.eo \
|
||||||
|
lib/elementary/elm_widget_item_container.eo \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
# Private classes (not exposed or shipped)
|
# Private classes (not exposed or shipped)
|
||||||
|
|
|
@ -3539,12 +3539,6 @@ _efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Widget_Smart_Data
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Elm_Object_Item*
|
|
||||||
_efl_ui_widget_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_efl_ui_widget_interest_region_mode_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd, Elm_Focus_Region_Show_Mode mode)
|
_efl_ui_widget_interest_region_mode_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd, Elm_Focus_Region_Show_Mode mode)
|
||||||
{
|
{
|
||||||
|
@ -6156,6 +6150,7 @@ ELM_PART_TEXT_DEFAULT_GET(efl_ui_widget, NULL)
|
||||||
EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_ui_widget_efl_object_dbg_info_get)
|
EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_ui_widget_efl_object_dbg_info_get)
|
||||||
|
|
||||||
#include "elm_widget_item.eo.c"
|
#include "elm_widget_item.eo.c"
|
||||||
|
#include "elm_widget_item_container.eo.c"
|
||||||
#include "efl_ui_widget.eo.c"
|
#include "efl_ui_widget.eo.c"
|
||||||
|
|
||||||
/* Others */
|
/* Others */
|
||||||
|
|
|
@ -583,15 +583,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
|
||||||
$false otherwise]]
|
$false otherwise]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: No more items in EO API */
|
|
||||||
@property focused_item @beta {
|
|
||||||
get {
|
|
||||||
[[Get the focused widget item.]]
|
|
||||||
return: Elm.Widget.Item; [[Focused item]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Focus Manager API */
|
/* Focus Manager API */
|
||||||
focus_state_apply @protected {
|
focus_state_apply @protected {
|
||||||
[[Register focus with the given configuration.
|
[[Register focus with the given configuration.
|
||||||
|
|
|
@ -1399,7 +1399,7 @@ _elm_ctxpopup_selected_item_get(const Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Elm_Object_Item*
|
EOLIAN static Elm_Object_Item*
|
||||||
_elm_ctxpopup_efl_ui_widget_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd)
|
_elm_ctxpopup_elm_widget_item_container_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd)
|
||||||
{
|
{
|
||||||
if (!sd->list) return NULL;
|
if (!sd->list) return NULL;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ enum Elm.Ctxpopup.Direction
|
||||||
unknown [[Ctxpopup does not determine it's direction yet.]]
|
unknown [[Ctxpopup does not determine it's direction yet.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
class Elm.Ctxpopup extends Efl.Ui.Layout implements Efl.Ui.Focus.Layer, Efl.Access.Widget.Action, Efl.Ui.Legacy
|
class Elm.Ctxpopup extends Efl.Ui.Layout implements Efl.Ui.Focus.Layer, Efl.Access.Widget.Action, Efl.Ui.Legacy, Elm.Widget_Item_Container
|
||||||
{
|
{
|
||||||
[[Elementary context popup class]]
|
[[Elementary context popup class]]
|
||||||
legacy_prefix: elm_ctxpopup;
|
legacy_prefix: elm_ctxpopup;
|
||||||
|
@ -237,7 +237,7 @@ class Elm.Ctxpopup extends Efl.Ui.Layout implements Efl.Ui.Focus.Layer, Efl.Acce
|
||||||
Efl.Ui.L10n.translation_update;
|
Efl.Ui.L10n.translation_update;
|
||||||
Efl.Ui.Widget.theme_apply;
|
Efl.Ui.Widget.theme_apply;
|
||||||
Efl.Ui.Widget.widget_event;
|
Efl.Ui.Widget.widget_event;
|
||||||
Efl.Ui.Widget.focused_item { get; }
|
Elm.Widget_Item_Container.focused_item { get; }
|
||||||
Efl.Access.Widget.Action.elm_actions { get; }
|
Efl.Access.Widget.Action.elm_actions { get; }
|
||||||
Efl.Access.Object.state_set { get; }
|
Efl.Access.Object.state_set { get; }
|
||||||
Efl.Part.part_get;
|
Efl.Part.part_get;
|
||||||
|
|
|
@ -5606,7 +5606,7 @@ _elm_gengrid_efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Gengr
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Elm_Object_Item *
|
EOLIAN static Elm_Object_Item *
|
||||||
_elm_gengrid_efl_ui_widget_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd)
|
_elm_gengrid_elm_widget_item_container_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd)
|
||||||
{
|
{
|
||||||
return sd->focused_item;
|
return sd->focused_item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ enum Elm.Gengrid.Reorder_Type
|
||||||
|
|
||||||
class Elm.Gengrid extends Efl.Ui.Layout implements Efl.Ui.Focus.Composition, Elm.Interface_Scrollable,
|
class Elm.Gengrid extends Efl.Ui.Layout implements Efl.Ui.Focus.Composition, Elm.Interface_Scrollable,
|
||||||
Efl.Ui.Clickable, Efl.Access.Widget.Action,
|
Efl.Ui.Clickable, Efl.Access.Widget.Action,
|
||||||
Efl.Access.Selection, Efl.Ui.Legacy
|
Efl.Access.Selection, Efl.Ui.Legacy, Elm.Widget_Item_Container
|
||||||
{
|
{
|
||||||
[[Elementary gengrid class]]
|
[[Elementary gengrid class]]
|
||||||
legacy_prefix: elm_gengrid;
|
legacy_prefix: elm_gengrid;
|
||||||
|
@ -510,7 +510,7 @@ class Elm.Gengrid extends Efl.Ui.Layout implements Efl.Ui.Focus.Composition, Elm
|
||||||
Efl.Ui.Widget.interest_region { get; }
|
Efl.Ui.Widget.interest_region { get; }
|
||||||
Efl.Ui.Widget.widget_event;
|
Efl.Ui.Widget.widget_event;
|
||||||
Efl.Ui.Widget.focus_highlight_geometry { get; }
|
Efl.Ui.Widget.focus_highlight_geometry { get; }
|
||||||
Efl.Ui.Widget.focused_item { get; }
|
Elm.Widget_Item_Container.focused_item { get; }
|
||||||
Elm.Interface_Scrollable.item_loop_enabled { get; set; }
|
Elm.Interface_Scrollable.item_loop_enabled { get; set; }
|
||||||
Elm.Interface_Scrollable.bounce_allow { set; }
|
Elm.Interface_Scrollable.bounce_allow { set; }
|
||||||
Elm.Interface_Scrollable.policy { get; set; }
|
Elm.Interface_Scrollable.policy { get; set; }
|
||||||
|
|
|
@ -8721,7 +8721,7 @@ _elm_genlist_search_by_text_item_get(Eo *obj EINA_UNUSED,
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Elm_Object_Item*
|
EOLIAN static Elm_Object_Item*
|
||||||
_elm_genlist_efl_ui_widget_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
|
_elm_genlist_elm_widget_item_container_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
|
||||||
{
|
{
|
||||||
return sd->focused_item;
|
return sd->focused_item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import elm_general;
|
||||||
|
|
||||||
class Elm.Genlist extends Efl.Ui.Layout implements Elm.Interface_Scrollable, Efl.Ui.Clickable,
|
class Elm.Genlist extends Efl.Ui.Layout implements Elm.Interface_Scrollable, Efl.Ui.Clickable,
|
||||||
Efl.Access.Widget.Action, Efl.Access.Selection,
|
Efl.Access.Widget.Action, Efl.Access.Selection,
|
||||||
Efl.Ui.Selectable, Efl.Ui.Legacy
|
Efl.Ui.Selectable, Efl.Ui.Legacy, Elm.Widget_Item_Container
|
||||||
{
|
{
|
||||||
[[Elementary genlist class]]
|
[[Elementary genlist class]]
|
||||||
legacy_prefix: elm_genlist;
|
legacy_prefix: elm_genlist;
|
||||||
|
@ -538,7 +538,7 @@ class Elm.Genlist extends Efl.Ui.Layout implements Elm.Interface_Scrollable, Efl
|
||||||
Efl.Ui.Focus.Object.on_focus_update;
|
Efl.Ui.Focus.Object.on_focus_update;
|
||||||
Efl.Ui.Widget.widget_sub_object_del;
|
Efl.Ui.Widget.widget_sub_object_del;
|
||||||
Efl.Ui.Widget.widget_event;
|
Efl.Ui.Widget.widget_event;
|
||||||
Efl.Ui.Widget.focused_item { get; }
|
Elm.Widget_Item_Container.focused_item { get; }
|
||||||
Elm.Interface_Scrollable.item_loop_enabled { get; set; }
|
Elm.Interface_Scrollable.item_loop_enabled { get; set; }
|
||||||
Elm.Interface_Scrollable.bounce_allow { get; set; }
|
Elm.Interface_Scrollable.bounce_allow { get; set; }
|
||||||
Elm.Interface_Scrollable.policy { get; set; }
|
Elm.Interface_Scrollable.policy { get; set; }
|
||||||
|
|
|
@ -296,7 +296,7 @@ _elm_list_item_content_focus_set(Elm_List_Item_Data *it, Elm_Focus_Direction dir
|
||||||
Evas_Object *focus_chain[2];
|
Evas_Object *focus_chain[2];
|
||||||
Evas_Object *focused = NULL;
|
Evas_Object *focused = NULL;
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
if (it->icon && elm_object_widget_check(it->icon) && elm_object_focus_allow_get(it->icon))
|
if (it->icon && elm_object_widget_check(it->icon) && elm_object_focus_allow_get(it->icon))
|
||||||
focus_chain[focus_objs++] = it->icon;
|
focus_chain[focus_objs++] = it->icon;
|
||||||
if (it->end && elm_object_widget_check(it->end) && elm_object_focus_allow_get(it->end))
|
if (it->end && elm_object_widget_check(it->end) && elm_object_focus_allow_get(it->end))
|
||||||
|
@ -3052,7 +3052,7 @@ _elm_list_efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_List_Dat
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Elm_Object_Item*
|
EOLIAN static Elm_Object_Item*
|
||||||
_elm_list_efl_ui_widget_focused_item_get(const Eo *obj EINA_UNUSED, Elm_List_Data *sd)
|
_elm_list_elm_widget_item_container_focused_item_get(const Eo *obj EINA_UNUSED, Elm_List_Data *sd)
|
||||||
{
|
{
|
||||||
return sd->focused_item;
|
return sd->focused_item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import elm_general;
|
||||||
|
|
||||||
class Elm.List extends Efl.Ui.Layout implements Elm.Interface_Scrollable,
|
class Elm.List extends Efl.Ui.Layout implements Elm.Interface_Scrollable,
|
||||||
Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Access.Object,
|
Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Access.Object,
|
||||||
Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy
|
Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy, Elm.Widget_Item_Container
|
||||||
{
|
{
|
||||||
[[Elementary list class]]
|
[[Elementary list class]]
|
||||||
legacy_prefix: elm_list;
|
legacy_prefix: elm_list;
|
||||||
|
@ -405,7 +405,7 @@ class Elm.List extends Efl.Ui.Layout implements Elm.Interface_Scrollable,
|
||||||
Efl.Ui.L10n.translation_update;
|
Efl.Ui.L10n.translation_update;
|
||||||
Efl.Ui.Widget.widget_sub_object_del;
|
Efl.Ui.Widget.widget_sub_object_del;
|
||||||
Efl.Ui.Widget.widget_event;
|
Efl.Ui.Widget.widget_event;
|
||||||
Efl.Ui.Widget.focused_item { get; }
|
Elm.Widget_Item_Container.focused_item { get; }
|
||||||
Efl.Ui.Widget.focus_state_apply;
|
Efl.Ui.Widget.focus_state_apply;
|
||||||
Elm.Interface_Scrollable.item_loop_enabled { get; set; }
|
Elm.Interface_Scrollable.item_loop_enabled { get; set; }
|
||||||
Elm.Interface_Scrollable.policy { set; }
|
Elm.Interface_Scrollable.policy { set; }
|
||||||
|
|
|
@ -1928,7 +1928,9 @@ EAPI Elm_Object_Item *
|
||||||
elm_object_focused_item_get(const Evas_Object *obj)
|
elm_object_focused_item_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
||||||
return efl_ui_widget_focused_item_get(obj);
|
if (!efl_isa(obj, ELM_WIDGET_ITEM_CONTAINER_INTERFACE))
|
||||||
|
return NULL;
|
||||||
|
return elm_widget_item_container_focused_item_get(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
|
|
@ -3871,7 +3871,7 @@ _elm_toolbar_item_efl_access_object_state_set_get(const Eo *eo_it, Elm_Toolbar_I
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Elm_Object_Item *
|
EOLIAN static Elm_Object_Item *
|
||||||
_elm_toolbar_efl_ui_widget_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
|
_elm_toolbar_elm_widget_item_container_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
|
||||||
{
|
{
|
||||||
return sd->focused_item;
|
return sd->focused_item;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ enum Elm.Toolbar_Shrink_Mode
|
||||||
|
|
||||||
class Elm.Toolbar extends Efl.Ui.Widget implements Efl.Ui.Focus.Composition, Elm.Interface_Scrollable, Efl.Ui.Direction,
|
class Elm.Toolbar extends Efl.Ui.Widget implements Efl.Ui.Focus.Composition, Elm.Interface_Scrollable, Efl.Ui.Direction,
|
||||||
Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Access.Object,
|
Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Access.Object,
|
||||||
Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy
|
Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy, Elm.Widget_Item_Container
|
||||||
{
|
{
|
||||||
[[Elementary toolbar class]]
|
[[Elementary toolbar class]]
|
||||||
legacy_prefix: elm_toolbar;
|
legacy_prefix: elm_toolbar;
|
||||||
|
@ -356,7 +356,7 @@ class Elm.Toolbar extends Efl.Ui.Widget implements Efl.Ui.Focus.Composition, Elm
|
||||||
Efl.Ui.L10n.translation_update;
|
Efl.Ui.L10n.translation_update;
|
||||||
Efl.Ui.Widget.widget_event;
|
Efl.Ui.Widget.widget_event;
|
||||||
Efl.Ui.Widget.focus_highlight_geometry { get; }
|
Efl.Ui.Widget.focus_highlight_geometry { get; }
|
||||||
Efl.Ui.Widget.focused_item { get; }
|
Elm.Widget_Item_Container.focused_item { get; }
|
||||||
Efl.Ui.Direction.direction { get; set; [[Only supports $vertical and $horizontal. Default is $horizontal.]] }
|
Efl.Ui.Direction.direction { get; set; [[Only supports $vertical and $horizontal. Default is $horizontal.]] }
|
||||||
Efl.Ui.Widget.focus_state_apply;
|
Efl.Ui.Widget.focus_state_apply;
|
||||||
Efl.Access.Widget.Action.elm_actions { get; }
|
Efl.Access.Widget.Action.elm_actions { get; }
|
||||||
|
|
|
@ -305,6 +305,7 @@ typedef void (*Elm_Widget_Item_Signal_Cb)(void *data, Elm_Objec
|
||||||
typedef void (*Elm_Access_On_Highlight_Cb)(void *data);
|
typedef void (*Elm_Access_On_Highlight_Cb)(void *data);
|
||||||
|
|
||||||
#include "efl_ui_widget.eo.h"
|
#include "efl_ui_widget.eo.h"
|
||||||
|
#include "elm_widget_item_container.eo.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup Widget
|
* @addtogroup Widget
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
interface Elm.Widget_Item_Container {
|
||||||
|
methods {
|
||||||
|
@property focused_item {
|
||||||
|
get {
|
||||||
|
[[Get the focused widget item.]]
|
||||||
|
return: Elm.Widget.Item; [[Focused item]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -258,6 +258,7 @@ pub_eo_files = [
|
||||||
'efl_ui_radio_legacy_part.eo',
|
'efl_ui_radio_legacy_part.eo',
|
||||||
'efl_ui_check_legacy_part.eo',
|
'efl_ui_check_legacy_part.eo',
|
||||||
'efl_ui_progressbar_legacy_part.eo',
|
'efl_ui_progressbar_legacy_part.eo',
|
||||||
|
'elm_widget_item_container.eo',
|
||||||
'elm_spinner.eo',
|
'elm_spinner.eo',
|
||||||
'elm_multibuttonentry.eo',
|
'elm_multibuttonentry.eo',
|
||||||
'elm_multibuttonentry_item.eo',
|
'elm_multibuttonentry_item.eo',
|
||||||
|
|
Loading…
Reference in New Issue