diff options
author | Amitesh Singh <amitesh.sh@samsung.com> | 2016-11-30 16:18:46 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-11-30 17:59:56 +0900 |
commit | a58e2e1a790732428fa09d479fec63d433931f06 (patch) | |
tree | 81d1d75af4995c0d00f18c2d9d7e59c22d742a8e | |
parent | 496f2ed4277dbc03740494a7185a67060f7b2198 (diff) | |
download | efl-a58e2e1a790732428fa09d479fec63d433931f06.tar.gz |
Menu,Item Interface: Common interface for menu, toolbar and ctxpopup
Summary:
efl_ui_menu interface provides common functions of menu, toolbar and ctxpopup.
efl_ui_item interface provides common functions of menu_item, toolbar_item and ctxpopup_item.
Also implemented some missing functions like selected_item set/get in ctxpopup.
efl_ui_item interface should be used for other widget items as well.
Test Plan: elementary_test
Reviewers: jpeg, felipealmeida, raster, SanghyeonLee, cedric, yashu21985
Subscribers: bu5hm4n
Differential Revision: https://phab.enlightenment.org/D3897
-rw-r--r-- | src/Makefile_Efl.am | 2 | ||||
-rw-r--r-- | src/bin/elementary/test_ctxpopup.c | 9 | ||||
-rw-r--r-- | src/lib/efl/Efl.h | 2 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_interfaces_main.c | 2 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_ui_item.eo | 49 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_ui_menu.eo | 29 | ||||
-rw-r--r-- | src/lib/elementary/elc_ctxpopup.c | 109 | ||||
-rw-r--r-- | src/lib/elementary/elc_ctxpopup_legacy.h | 77 | ||||
-rw-r--r-- | src/lib/elementary/elm_ctxpopup.eo | 58 | ||||
-rw-r--r-- | src/lib/elementary/elm_ctxpopup_item.eo | 33 | ||||
-rw-r--r-- | src/lib/elementary/elm_dbus_menu.c | 4 | ||||
-rw-r--r-- | src/lib/elementary/elm_menu.c | 78 | ||||
-rw-r--r-- | src/lib/elementary/elm_menu.eo | 31 | ||||
-rw-r--r-- | src/lib/elementary/elm_menu_item.eo | 25 | ||||
-rw-r--r-- | src/lib/elementary/elm_menu_legacy.h | 57 | ||||
-rw-r--r-- | src/lib/elementary/elm_toolbar.c | 64 | ||||
-rw-r--r-- | src/lib/elementary/elm_toolbar.eo | 35 | ||||
-rw-r--r-- | src/lib/elementary/elm_toolbar_item.eo | 50 | ||||
-rw-r--r-- | src/lib/elementary/elm_toolbar_legacy.h | 86 | ||||
-rw-r--r-- | src/lib/elementary/elm_widget_ctxpopup.h | 2 |
20 files changed, 570 insertions, 232 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index 1548bf32b1..79f46611d0 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -53,6 +53,8 @@ efl_eolian_files = \ lib/efl/interfaces/efl_io_queue.eo \ lib/efl/interfaces/efl_observer.eo \ lib/efl/interfaces/efl_observable.eo \ + lib/efl/interfaces/efl_ui_item.eo \ + lib/efl/interfaces/efl_ui_menu.eo \ $(efl_eolian_legacy_files) \ $(NULL) diff --git a/src/bin/elementary/test_ctxpopup.c b/src/bin/elementary/test_ctxpopup.c index 187dba84e0..0c1141211b 100644 --- a/src/bin/elementary/test_ctxpopup.c +++ b/src/bin/elementary/test_ctxpopup.c @@ -46,10 +46,12 @@ _btn_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, } static void -_ctxpopup_item_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) +_ctxpopup_item_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info) { + printf("Item selected status: %d\n", efl_ui_item_selected_get(event_info)); + printf("ctxpopup item selected: %s\n", - elm_object_item_text_get(event_info)); + elm_object_item_text_get(efl_ui_menu_selected_item_get(obj))); elm_ctxpopup_dismiss(obj); } @@ -94,7 +96,8 @@ _list_item_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UN _ctxpopup_item_new(ctxpopup, "Go to home folder", "home"); _ctxpopup_item_new(ctxpopup, "Save file", "file"); - _ctxpopup_item_new(ctxpopup, "Delete file", "delete"); + it = _ctxpopup_item_new(ctxpopup, "Delete file", "delete"); + efl_ui_item_selected_set(it, EINA_TRUE); it = _ctxpopup_item_new(ctxpopup, "Navigate to folder", "folder"); elm_object_item_disabled_set(it, EINA_TRUE); _ctxpopup_item_new(ctxpopup, "Edit entry", "edit"); diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 13e91f9a5e..0aac8377e5 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -86,6 +86,8 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #include "interfaces/efl_flipable.eo.h" #include "interfaces/efl_ui_spin.eo.h" #include "interfaces/efl_ui_progress.eo.h" +#include "interfaces/efl_ui_item.eo.h" +#include "interfaces/efl_ui_menu.eo.h" #include "interfaces/efl_screen.eo.h" diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index c16c8dbc93..4251ea3fe5 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -53,6 +53,8 @@ EAPI const Efl_Event_Description _EFL_GFX_PATH_CHANGED = #include "interfaces/efl_flipable.eo.c" #include "interfaces/efl_ui_spin.eo.c" #include "interfaces/efl_ui_progress.eo.c" +#include "interfaces/efl_ui_menu.eo.c" +#include "interfaces/efl_ui_item.eo.c" EAPI void __efl_internal_init(void) diff --git a/src/lib/efl/interfaces/efl_ui_item.eo b/src/lib/efl/interfaces/efl_ui_item.eo new file mode 100644 index 0000000000..8b5710d755 --- /dev/null +++ b/src/lib/efl/interfaces/efl_ui_item.eo @@ -0,0 +1,49 @@ +interface Efl.Ui.Item { + legacy_prefix: null; + methods { + @property prev { + get { + [[Get the item before $ it in the widget's internal list of + items. + + See also \@ref efl_ui_item_next_get. + ]] + } + values { + item: Efl.Ui.Item; [[The item before the object in its parent's list. If there is no previous item for $ it or there's an error, $null is returned.]] + } + } + @property next { + get { + [[Get the item after $ it in the widget's + internal list of items. + + See also \@ref efl_ui_item_prev_get. + ]] + } + values { + item: Efl.Ui.Item; [[The item after the object in its parent's list. If there is no previous item for $ it or there's an error, $null is returned.]] + } + } + @property selected { + get { + [[Get the selected state of $item.]] + } + set { + [[Set the selected state of $item. + This sets the selected state of the given item $it. + $true for selected, $false for not selected. + + If a new item is selected the previously selected will + be unselected. Previously selected item can be get with + function @Efl.Ui.Menu.selected_item.get. + + Selected items will be highlighted. + ]] + } + values { + selected: bool; [[The selection state.]] + } + } + } +} diff --git a/src/lib/efl/interfaces/efl_ui_menu.eo b/src/lib/efl/interfaces/efl_ui_menu.eo new file mode 100644 index 0000000000..3d61de1118 --- /dev/null +++ b/src/lib/efl/interfaces/efl_ui_menu.eo @@ -0,0 +1,29 @@ +interface Efl.Ui.Menu { + legacy_prefix: null; + methods { + @property selected_item { + get { + [[Get the selected item in the widget.]] + return: Efl.Ui.Item; [[The selected item or $null.]] + } + } + @property first_item { + get { + [[Get the first item in the widget.]] + return: Efl.Ui.Item; + } + } + @property last_item { + get { + [[Get the last item in the widget.]] + return: Efl.Ui.Item; + } + } + @property items { + get { + [[Returns a list of the widget item.]] + return: free(own(iterator<Efl.Ui.Item>), eina_iterator_free) @warn_unused; + } + } + } +} diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c index f1c72e1fc7..aeba54f7b8 100644 --- a/src/lib/elementary/elc_ctxpopup.c +++ b/src/lib/elementary/elc_ctxpopup.c @@ -1237,10 +1237,61 @@ elm_ctxpopup_horizontal_get(const Evas_Object *obj) return sd->orient == EFL_ORIENT_HORIZONTAL ? EINA_TRUE : EINA_FALSE; } +EAPI const Eina_List * +elm_ctxpopup_items_get(const Evas_Object *obj) +{ + Eina_List *lst = NULL; + Eina_Iterator *it; + void *item_data; + + it = efl_ui_menu_items_get(obj); + EINA_ITERATOR_FOREACH(it, item_data) + { + lst = eina_list_append(lst, item_data); + } + eina_iterator_free(it); + return lst; +} + +EAPI Elm_Widget_Item * +elm_ctxpopup_first_item_get(const Evas_Object *obj) +{ + return efl_ui_menu_first_item_get(obj); +} + +EAPI Elm_Widget_Item * +elm_ctxpopup_last_item_get(const Evas_Object *obj) +{ + return efl_ui_menu_last_item_get(obj); +} + +EAPI Elm_Widget_Item * +elm_ctxpopup_item_prev_get(const Evas_Object *obj) +{ + return efl_ui_item_prev_get(obj); +} + +EAPI Elm_Widget_Item * +elm_ctxpopup_item_next_get(const Evas_Object *obj) +{ + return efl_ui_item_next_get(obj); +} + static void _item_wrap_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Elm_Ctxpopup_Item_Data *item = data; + Eina_List *l; + Elm_Object_Item *eo_item; + + ELM_CTXPOPUP_DATA_GET_OR_RETURN(item->wcb.cobj, sd); + EINA_LIST_FOREACH(sd->items, l, eo_item) + { + ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item); + item->selected = EINA_FALSE; + } + item->selected = EINA_TRUE; + if (!item->wcb.org_func_cb) return; item->wcb.org_func_cb((void *)item->wcb.org_data, item->wcb.cobj, EO_OBJ(item)); } @@ -1325,14 +1376,14 @@ _elm_ctxpopup_class_constructor(Efl_Class *klass) evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); } -EOLIAN static const Eina_List* -_elm_ctxpopup_items_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) +EOLIAN static Eina_Iterator* +_elm_ctxpopup_efl_ui_menu_items_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) { - return sd->items; + return eina_list_iterator_new(sd->items); } EOLIAN static Elm_Object_Item* -_elm_ctxpopup_first_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) +_elm_ctxpopup_efl_ui_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) { if (!sd->items) return NULL; @@ -1340,7 +1391,7 @@ _elm_ctxpopup_first_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) } EOLIAN static Elm_Object_Item* -_elm_ctxpopup_last_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) +_elm_ctxpopup_efl_ui_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) { if (!sd->items) return NULL; @@ -1348,6 +1399,21 @@ _elm_ctxpopup_last_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) } EOLIAN static Elm_Object_Item* +_elm_ctxpopup_efl_ui_menu_selected_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) +{ + Eina_List *l; + Elm_Object_Item *eo_item; + + EINA_LIST_FOREACH(sd->items, l, eo_item) + { + ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item); + if (item->selected) return eo_item; + } + + return NULL; +} + +EOLIAN static Elm_Object_Item* _elm_ctxpopup_item_prepend(Eo *obj, Elm_Ctxpopup_Data *sd, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) { Eo *eo_item; @@ -1368,7 +1434,7 @@ _elm_ctxpopup_item_prepend(Eo *obj, Elm_Ctxpopup_Data *sd, const char *label, Ev } EOLIAN static Elm_Object_Item * -_elm_ctxpopup_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item) +_elm_ctxpopup_item_efl_ui_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item) { Eina_List *l; @@ -1383,7 +1449,7 @@ _elm_ctxpopup_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *ite } EOLIAN static Elm_Object_Item * -_elm_ctxpopup_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item) +_elm_ctxpopup_item_efl_ui_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item) { Eina_List *l; @@ -1398,6 +1464,35 @@ _elm_ctxpopup_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *ite } EOLIAN static void +_elm_ctxpopup_item_efl_ui_item_selected_set(Eo *eo_item EINA_UNUSED, + Elm_Ctxpopup_Item_Data *item, + Eina_Bool selected) +{ + Eina_List *l; + Elm_Object_Item *temp_item; + + if (selected == item->selected) return; + + if (selected) + { + ELM_CTXPOPUP_DATA_GET_OR_RETURN(item->wcb.cobj, sd); + EINA_LIST_FOREACH(sd->items, l, temp_item) + { + ELM_CTXPOPUP_ITEM_DATA_GET(temp_item, item); + item->selected = EINA_FALSE; + } + } + elm_list_item_selected_set(item->list_item, selected); + item->selected = selected; +} + +EOLIAN static Eina_Bool +_elm_ctxpopup_item_efl_ui_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item) +{ + return item->selected; +} + +EOLIAN static void _elm_ctxpopup_item_init(Eo *eo_item, Elm_Ctxpopup_Item_Data *item, Evas_Smart_Cb func, diff --git a/src/lib/elementary/elc_ctxpopup_legacy.h b/src/lib/elementary/elc_ctxpopup_legacy.h index 2dbc1d35d1..629401f8c0 100644 --- a/src/lib/elementary/elc_ctxpopup_legacy.h +++ b/src/lib/elementary/elc_ctxpopup_legacy.h @@ -29,5 +29,82 @@ EAPI void elm_ctxpopup_horizontal_set(Evas_Object *obj, */ EAPI Eina_Bool elm_ctxpopup_horizontal_get(const Evas_Object *obj); +/** + * @brief Get the internal list of items in a given ctxpopup widget. + * + * This list is not to be modified in any way and must not be freed. Use the + * list members with functions like @ref elm_object_item_text_set, @ref + * elm_object_item_text_get, @ref elm_object_item_del. + * + * @warning This list is only valid until @c obj object's internal items list + * is changed. It should be fetched again with another call to this function + * when changes happen. + * + * @return The list of items or @c null on errors. + * + * @since 1.11 + * + * @ingroup Elm_Ctxpopup + */ +EAPI const Eina_List *elm_ctxpopup_items_get(const Evas_Object *obj); + +/** + * @brief Get the first item in the given ctxpopup widget's list of items. + * + * See also @ref elm_obj_ctxpopup_item_append, + * @ref elm_obj_ctxpopup_last_item_get. + * + * @return The first item or @c null, if it has no items (and on errors). + * + * @since 1.11 + * + * @ingroup Elm_Ctxpopup + */ +EAPI Elm_Widget_Item *elm_ctxpopup_first_item_get(const Evas_Object *obj); + +/** + * @brief Get the last item in the given ctxpopup widget's list of items. + * + * See also @ref elm_obj_ctxpopup_item_prepend, + * @ref elm_obj_ctxpopup_first_item_get. + * + * @return The last item or @c null, if it has no items (and on errors). + * + * @since 1.1 + * + * @ingroup Elm_Ctxpopup + */ +EAPI Elm_Widget_Item *elm_ctxpopup_last_item_get(const Evas_Object *obj); + +/** + * @brief Get the item before $ it in a ctxpopup widget's internal list of + * items. + * + * See also @ref elm_ctxpopup_item_next_get. + * + * @return The item before the object in its parent's list. If there is no + * previous item for $ it or there's an error, @c null is returned. + * + * @since 1.11 + * + * @ingroup Elm_Ctxpopup_Item + */ +EAPI Elm_Widget_Item *elm_ctxpopup_item_prev_get(const Evas_Object *obj); + +/** + * @brief Get the item after $ it in a ctxpopup widget's internal list of + * items. + * + * See also @ref elm_ctxpopup_item_prev_get. + * + * @return The item after the object in its parent's list. If there is no + * previous item for $ it or there's an error, @c null is returned. + * + * @since 1.11 + * + * @ingroup Elm_Ctxpopup_Item + */ +EAPI Elm_Widget_Item *elm_ctxpopup_item_next_get(const Evas_Object *obj); + #include "elm_ctxpopup_item.eo.legacy.h" #include "elm_ctxpopup.eo.legacy.h" diff --git a/src/lib/elementary/elm_ctxpopup.eo b/src/lib/elementary/elm_ctxpopup.eo index 0acf178086..926a0fe01f 100644 --- a/src/lib/elementary/elm_ctxpopup.eo +++ b/src/lib/elementary/elm_ctxpopup.eo @@ -8,7 +8,8 @@ enum Elm.Ctxpopup.Direction unknown [[Ctxpopup does not determine it's direction yet.]] } -class Elm.Ctxpopup (Elm.Layout, Elm.Interface.Atspi_Widget_Action, Efl.Orientation) +class Elm.Ctxpopup (Elm.Layout, Elm.Interface.Atspi_Widget_Action, + Efl.Orientation, Efl.Ui.Menu) { [[Elementary context popup class]] legacy_prefix: elm_ctxpopup; @@ -101,57 +102,6 @@ class Elm.Ctxpopup (Elm.Layout, Elm.Interface.Atspi_Widget_Action, Efl.Orientati return: Elm.Ctxpopup.Direction(Elm.Ctxpopup.Direction.unknown); [[Direction]] } } - @property items { - get { - [[Get the internal list of items in a given ctxpopup widget. - - This list is not to be modified in any way and must not be - freed. Use the list members with functions like - \@ref elm_object_item_text_set, - \@ref elm_object_item_text_get, - \@ref elm_object_item_del. - - Warning: This list is only valid until $obj object's internal - items list is changed. It should be fetched again with another - call to this function when changes happen. - - @since 1.11 - ]] - return: const(list<Elm.Widget.Item>); [[The list of items or - $null on errors.]] - - } - } - @property first_item { - get { - [[Get the first item in the given ctxpopup widget's list of - items. - - See also @.item_append, - @.last_item.get. - - @since 1.11 - ]] - return: Elm.Widget.Item; [[The first item or $null, if it has no items (and on - errors).]] - - } - } - @property last_item { - get { - [[Get the last item in the given ctxpopup widget's list of - items. - - See also @.item_prepend, - @.first_item.get. - - @since 1.1 - ]] - return: Elm.Widget.Item; [[The last item or $null, if it has no items (and on - errors).]] - - } - } dismiss { [[Dismiss a ctxpopup object @@ -215,6 +165,10 @@ class Elm.Ctxpopup (Elm.Layout, Elm.Interface.Atspi_Widget_Action, Efl.Orientati Elm.Widget.translate; Elm.Widget.theme_apply; Elm.Widget.event; + Efl.Ui.Menu.selected_item.get; + Efl.Ui.Menu.first_item.get; + Efl.Ui.Menu.last_item.get; + Efl.Ui.Menu.items.get; Elm.Layout.sub_object_add_enable; Elm.Layout.sizing_eval; Elm.Interface.Atspi_Widget_Action.elm_actions.get; diff --git a/src/lib/elementary/elm_ctxpopup_item.eo b/src/lib/elementary/elm_ctxpopup_item.eo index 717c5736f6..1b4d81b6f8 100644 --- a/src/lib/elementary/elm_ctxpopup_item.eo +++ b/src/lib/elementary/elm_ctxpopup_item.eo @@ -1,37 +1,9 @@ -class Elm.Ctxpopup.Item(Elm.Widget.Item) +class Elm.Ctxpopup.Item(Elm.Widget.Item, Efl.Ui.Item) { [[Elementary context popup item class]] legacy_prefix: elm_ctxpopup_item; eo_prefix: elm_obj_ctxpopup_item; methods { - @property prev { - get { - [[Get the item before $ it in a ctxpopup widget's internal list of - items. - - See also \@ref elm_ctxpopup_item_next_get. - - @since 1.11 - ]] - } - values { - item: Elm.Widget.Item; [[The item before the object in its parent's list. If there is no previous item for $ it or there's an error, $null is returned.]] - } - } - @property next { - get { - [[Get the item after $ it in a ctxpopup widget's - internal list of items. - - See also \@ref elm_ctxpopup_item_prev_get. - - @since 1.11 - ]] - } - values { - item: Elm.Widget.Item; [[The item after the object in its parent's list. If there is no previous item for $ it or there's an error, $null is returned.]] - } - } init { [[Init context popup item]] params { @@ -51,5 +23,8 @@ class Elm.Ctxpopup.Item(Elm.Widget.Item) Elm.Widget.Item.part_content.set; Elm.Widget.Item.focus.set; Elm.Widget.Item.focus.get; + Efl.Ui.Item.selected; + Efl.Ui.Item.prev.get; + Efl.Ui.Item.next.get; } } diff --git a/src/lib/elementary/elm_dbus_menu.c b/src/lib/elementary/elm_dbus_menu.c index 61b8fd504f..44f04ef02a 100644 --- a/src/lib/elementary/elm_dbus_menu.c +++ b/src/lib/elementary/elm_dbus_menu.c @@ -361,7 +361,7 @@ _root_layout_build(Elm_DBus_Menu *dbus_menu, Eina_List *property_list, if (recursion_depth > 0) { - ret = elm_obj_menu_items_get(dbus_menu->menu); + ret = efl_ui_menu_items_get(dbus_menu->menu); items = (Eina_List *)ret; EINA_LIST_FOREACH (items, l, obj_item) { @@ -445,7 +445,7 @@ _elm_dbus_menu_add(Eo *menu) dbus_menu->menu = menu; - ret = elm_obj_menu_items_get(menu); + ret = efl_ui_menu_items_get(menu); items = (Eina_List *)ret; EINA_LIST_FOREACH (items, l, obj_item) { diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c index 949e8f06f0..73ad903536 100644 --- a/src/lib/elementary/elm_menu.c +++ b/src/lib/elementary/elm_menu.c @@ -890,6 +890,64 @@ elm_menu_parent_get(const Evas_Object *obj) return elm_obj_widget_parent_get(obj); } +EAPI Elm_Widget_Item * +elm_menu_selected_item_get(const Evas_Object *obj) +{ + return efl_ui_menu_selected_item_get(obj); +} + +EAPI const Eina_List * +elm_menu_items_get(const Evas_Object *obj) +{ + Eina_List *lst = NULL; + Eina_Iterator *it; + void *item_data; + + it = efl_ui_menu_items_get(obj); + EINA_ITERATOR_FOREACH(it, item_data) + { + lst = eina_list_append(lst, item_data); + } + eina_iterator_free(it); + return lst; +} + +EAPI Elm_Widget_Item * +elm_menu_first_item_get(const Evas_Object *obj) +{ + return efl_ui_menu_first_item_get(obj); +} + +EAPI Elm_Widget_Item * +elm_menu_last_item_get(const Evas_Object *obj) +{ + return efl_ui_menu_last_item_get(obj); +} + +EAPI void +elm_menu_item_selected_set(Evas_Object *obj, Eina_Bool selected) +{ + efl_ui_item_selected_set(obj, selected); +} + +EAPI Eina_Bool +elm_menu_item_selected_get(const Evas_Object *obj) +{ + return efl_ui_item_selected_get(obj); +} + +EAPI Elm_Widget_Item * +elm_menu_item_prev_get(const Evas_Object *obj) +{ + return efl_ui_item_prev_get(obj); +} + +EAPI Elm_Widget_Item * +elm_menu_item_next_get(const Evas_Object *obj) +{ + return efl_ui_item_next_get(obj); +} + EOLIAN static Evas_Object* _elm_menu_elm_widget_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) { @@ -1175,14 +1233,14 @@ _elm_menu_item_subitems_clear(Eo *eo_item EINA_UNUSED, Elm_Menu_Item_Data *it) elm_wdg_item_del(sub_it); } -EOLIAN static const Eina_List* -_elm_menu_items_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) +EOLIAN static Eina_Iterator* +_elm_menu_efl_ui_menu_items_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) { - return sd->items; + return eina_list_iterator_new(sd->items); } EOLIAN static void -_elm_menu_item_selected_set(Eo *eo_item EINA_UNUSED, +_elm_menu_item_efl_ui_item_selected_set(Eo *eo_item EINA_UNUSED, Elm_Menu_Item_Data *item, Eina_Bool selected) { @@ -1202,13 +1260,13 @@ _elm_menu_item_selected_set(Eo *eo_item EINA_UNUSED, } EOLIAN static Eina_Bool -_elm_menu_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Menu_Item_Data *item) +_elm_menu_item_efl_ui_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Menu_Item_Data *item) { return item->selected; } EOLIAN static Elm_Object_Item * -_elm_menu_item_prev_get(const Eo *eo_item, Elm_Menu_Item_Data *item) +_elm_menu_item_efl_ui_item_prev_get(Eo *eo_item, Elm_Menu_Item_Data *item) { if (item->parent) { @@ -1232,7 +1290,7 @@ _elm_menu_item_prev_get(const Eo *eo_item, Elm_Menu_Item_Data *item) } EOLIAN static Elm_Object_Item * -_elm_menu_item_next_get(const Eo *eo_item, Elm_Menu_Item_Data *item) +_elm_menu_item_efl_ui_item_next_get(Eo *eo_item, Elm_Menu_Item_Data *item) { if (item->parent) { @@ -1256,20 +1314,20 @@ _elm_menu_item_next_get(const Eo *eo_item, Elm_Menu_Item_Data *item) } EOLIAN static Elm_Object_Item* -_elm_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) +_elm_menu_efl_ui_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) { return (sd->items ? sd->items->data : NULL); } EOLIAN static Elm_Object_Item* -_elm_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) +_elm_menu_efl_ui_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) { Eina_List *l = eina_list_last(sd->items); return (l ? l->data : NULL); } EOLIAN static Elm_Object_Item* -_elm_menu_selected_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) +_elm_menu_efl_ui_menu_selected_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) { Eina_List *l; Elm_Object_Item *eo_item; diff --git a/src/lib/elementary/elm_menu.eo b/src/lib/elementary/elm_menu.eo index 87a79836db..1d593fc04f 100644 --- a/src/lib/elementary/elm_menu.eo +++ b/src/lib/elementary/elm_menu.eo @@ -1,34 +1,11 @@ -class Elm.Menu (Elm.Widget, Efl.Ui.Clickable, Elm.Interface.Atspi.Selection) +class Elm.Menu (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Menu, + Elm.Interface.Atspi.Selection) { [[Elementary menu class]] legacy_prefix: elm_menu; eo_prefix: elm_obj_menu; event_prefix: elm_menu; methods { - @property selected_item { - get { - [[Get the selected item in the menu.]] - return: Elm.Widget.Item; [[The selected item or $null.]] - } - } - @property items { - get { - [[Returns a list of the item's items.]] - return: const(list<Elm.Widget.Item>); [[List of menu items]] - } - } - @property first_item { - get { - [[Get the first item in the menu.]] - return: Elm.Widget.Item; [[First item in menu]] - } - } - @property last_item { - get { - [[Get the last item in the menu.]] - return: Elm.Widget.Item; [[Last item in menu]] - } - } move { [[Move the menu to a new position @@ -82,6 +59,10 @@ class Elm.Menu (Elm.Widget, Efl.Ui.Clickable, Elm.Interface.Atspi.Selection) Elm.Interface.Atspi_Accessible.children.get; Elm.Interface.Atspi.Selection.selected_children_count.get; Elm.Interface.Atspi.Selection.selected_child.get; + Efl.Ui.Menu.selected_item.get; + Efl.Ui.Menu.first_item.get; + Efl.Ui.Menu.last_item.get; + Efl.Ui.Menu.items.get; } events { dismissed; [[Called when menu widget was dismissed]] diff --git a/src/lib/elementary/elm_menu_item.eo b/src/lib/elementary/elm_menu_item.eo index be56cfcab6..1cf548ffb3 100644 --- a/src/lib/elementary/elm_menu_item.eo +++ b/src/lib/elementary/elm_menu_item.eo @@ -1,4 +1,5 @@ -class Elm.Menu.Item(Elm.Widget.Item, Elm.Interface.Atspi.Selection) +class Elm.Menu.Item(Elm.Widget.Item, Elm.Interface.Atspi.Selection, + Efl.Ui.Item) { [[Elementary menu item class]] legacy_prefix: elm_menu_item; @@ -24,25 +25,6 @@ class Elm.Menu.Item(Elm.Widget.Item, Elm.Interface.Atspi.Selection) icon: string; [[The name of icon object.]] } } - @property selected { - get { - [[Get the selected state of $item.]] - } - set { - [[Set the selected state of $item.]] - } - values { - selected: bool; [[The selection state.]] - } - } - prev_get @const { - [[Get the previous item in the menu.]] - return: Elm.Widget.Item; [[Item object]] - } - next_get @const { - [[Get the next item in the menu.]] - return: Elm.Widget.Item; [[Item object]] - } index_get @const { [[Get the item index]] return: uint; [[Item index]] @@ -90,5 +72,8 @@ class Elm.Menu.Item(Elm.Widget.Item, Elm.Interface.Atspi.Selection) Elm.Interface.Atspi_Accessible.state_set.get; Elm.Interface.Atspi.Selection.selected_children_count.get; Elm.Interface.Atspi.Selection.selected_child.get; + Efl.Ui.Item.selected; + Efl.Ui.Item.prev.get; + Efl.Ui.Item.next.get; } } diff --git a/src/lib/elementary/elm_menu_legacy.h b/src/lib/elementary/elm_menu_legacy.h index 9c86efc722..8903190ce9 100644 --- a/src/lib/elementary/elm_menu_legacy.h +++ b/src/lib/elementary/elm_menu_legacy.h @@ -30,5 +30,62 @@ EAPI void elm_menu_parent_set(Evas_Object *obj, Evas_Obj */ EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj); +/** + * @brief Get the selected item in the menu. + * + * @return The selected item or @c null. + * + * @ingroup Elm_Menu + */ +EAPI Elm_Widget_Item *elm_menu_selected_item_get(const Evas_Object *obj); + +/** Returns a list of the item's items. + * + * @ingroup Elm_Menu + */ +EAPI const Eina_List *elm_menu_items_get(const Evas_Object *obj); + +/** Get the first item in the menu. + * + * @ingroup Elm_Menu + */ +EAPI Elm_Widget_Item *elm_menu_first_item_get(const Evas_Object *obj); + +/** Get the last item in the menu. + * + * @ingroup Elm_Menu + */ +EAPI Elm_Widget_Item *elm_menu_last_item_get(const Evas_Object *obj); + +/** + * @brief Set the selected state of @c item. + * + * @param[in] selected The selection state. + * + * @ingroup Elm_Menu_Item + */ +EAPI void elm_menu_item_selected_set(Evas_Object *obj, Eina_Bool selected); + +/** + * @brief Get the selected state of @c item. + * + * @return The selection state. + * + * @ingroup Elm_Menu_Item + */ +EAPI Eina_Bool elm_menu_item_selected_get(const Evas_Object *obj); + +/** Get the previous item in the menu. + * + * @ingroup Elm_Menu_Item + */ +EAPI Elm_Widget_Item *elm_menu_item_prev_get(const Evas_Object *obj); + +/** Get the next item in the menu. + * + * @ingroup Elm_Menu_Item + */ +EAPI Elm_Widget_Item *elm_menu_item_next_get(const Evas_Object *obj); + #include "elm_menu_item.eo.legacy.h" #include "elm_menu.eo.legacy.h" diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 44dd5215e8..9052c290ec 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -3233,7 +3233,7 @@ _elm_toolbar_item_insert_after(Eo *obj, Elm_Toolbar_Data *sd, Elm_Object_Item *e } EOLIAN static Elm_Object_Item* -_elm_toolbar_first_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) +_elm_toolbar_efl_ui_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) { if (!sd->items) return NULL; Elm_Toolbar_Item_Data *it = ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items); @@ -3242,7 +3242,7 @@ _elm_toolbar_first_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) } EOLIAN static Elm_Object_Item* -_elm_toolbar_last_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) +_elm_toolbar_efl_ui_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) { if (!sd->items) return NULL; @@ -3251,8 +3251,14 @@ _elm_toolbar_last_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) return NULL; } +EOLIAN static Eina_Iterator* +_elm_toolbar_efl_ui_menu_items_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) +{ + return eina_list_iterator_new(sd->items); +} + EOLIAN static Elm_Object_Item * -_elm_toolbar_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *it) +_elm_toolbar_item_efl_ui_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *it) { ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it, NULL); @@ -3263,7 +3269,7 @@ _elm_toolbar_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *it) } EOLIAN static Elm_Object_Item * -_elm_toolbar_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *it) +_elm_toolbar_item_efl_ui_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *it) { ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it, NULL); @@ -3301,7 +3307,7 @@ _elm_toolbar_item_find_by_label(const Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, } EOLIAN static void -_elm_toolbar_item_selected_set(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item, Eina_Bool selected) +_elm_toolbar_item_efl_ui_item_selected_set(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item, Eina_Bool selected) { if (item->selected == selected) return; if (selected) _item_select(item); @@ -3309,13 +3315,13 @@ _elm_toolbar_item_selected_set(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *i } EOLIAN static Eina_Bool -_elm_toolbar_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item) +_elm_toolbar_item_efl_ui_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item) { return item->selected; } EOLIAN static Elm_Object_Item* -_elm_toolbar_selected_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) +_elm_toolbar_efl_ui_menu_selected_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) { return sd->selected_item; } @@ -3548,6 +3554,48 @@ elm_toolbar_transverse_expanded_get(const Evas_Object *obj) return sd->transverse_expanded; } +EAPI Elm_Widget_Item * +elm_toolbar_selected_item_get(const Evas_Object *obj) +{ + return efl_ui_menu_selected_item_get(obj); +} + +EAPI Elm_Widget_Item * +elm_toolbar_first_item_get(const Evas_Object *obj) +{ + return efl_ui_menu_first_item_get(obj); +} + +EAPI Elm_Widget_Item * +elm_toolbar_last_item_get(const Evas_Object *obj) +{ + return efl_ui_menu_last_item_get(obj); +} + +EAPI void +elm_toolbar_item_selected_set(Evas_Object *obj, Eina_Bool selected) +{ + efl_ui_item_selected_set(obj, selected); +} + +EAPI Eina_Bool +elm_toolbar_item_selected_get(const Evas_Object *obj) +{ + return efl_ui_item_selected_get(obj); +} + +EAPI Elm_Widget_Item * +elm_toolbar_item_prev_get(const Evas_Object *obj) +{ + return efl_ui_item_prev_get(obj); +} + +EAPI Elm_Widget_Item * +elm_toolbar_item_next_get(const Evas_Object *obj) +{ + return efl_ui_item_next_get(obj); +} + EOLIAN static void _elm_toolbar_homogeneous_set(Eo *obj, Elm_Toolbar_Data *sd, Eina_Bool homogeneous) { @@ -3969,7 +4017,7 @@ _elm_toolbar_item_elm_interface_atspi_accessible_state_set_get(Eo *eo_it, Elm_To ret = elm_interface_atspi_accessible_state_set_get(efl_super(eo_it, ELM_TOOLBAR_ITEM_CLASS)); - sel = elm_obj_toolbar_item_selected_get(eo_it); + sel = efl_ui_item_selected_get(eo_it); STATE_TYPE_SET(ret, ELM_ATSPI_STATE_SELECTABLE); diff --git a/src/lib/elementary/elm_toolbar.eo b/src/lib/elementary/elm_toolbar.eo index bcaa0c2587..ba9fede090 100644 --- a/src/lib/elementary/elm_toolbar.eo +++ b/src/lib/elementary/elm_toolbar.eo @@ -26,7 +26,7 @@ enum Elm.Toolbar.Shrink_Mode class Elm.Toolbar (Elm.Widget, Elm.Interface_Scrollable, Efl.Orientation, Elm.Interface.Atspi_Widget_Action, Elm.Interface.Atspi.Selection, - Efl.Ui.Clickable, Efl.Ui.Selectable) + Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Menu) { [[Elementary toolbar class]] legacy_prefix: elm_toolbar; @@ -155,27 +155,6 @@ class Elm.Toolbar (Elm.Widget, Elm.Interface_Scrollable, Efl.Orientation, priority: int; [[The standard_priority of visible items]] } } - @property selected_item { - get { - [[Get the selected item. - - The selected item can be unselected with function - elm_toolbar_item_selected_set(). - - The selected item always will be highlighted on toolbar.]] - - return: Elm.Widget.Item; [[The selected toolbar item.]] - } - } - @property first_item { - get { - [[Get the first item in the given toolbar widget's list of items. - - See: @.item_append and @.last_item]] - - return: Elm.Widget.Item; [[The first item or $NULL, if it has no items (and on errors)]] - } - } @property more_item { get { [[Get the more item which is auto-generated by toolbar. @@ -188,14 +167,6 @@ class Elm.Toolbar (Elm.Widget, Elm.Interface_Scrollable, Efl.Orientation, return: Elm.Widget.Item; [[The toolbar more item.]] } } - @property last_item { - get { - [[Get the last item in the given toolbar widget's list of items. - - See: @.item_prepend and @.first_item]] - return: Elm.Widget.Item; [[The last item or $NULL, if it has no items (and on errors)]] - } - } item_insert_before { [[Insert a new item into the toolbar object before item $before. @@ -373,6 +344,10 @@ class Elm.Toolbar (Elm.Widget, Elm.Interface_Scrollable, Efl.Orientation, Elm.Interface.Atspi.Selection.is_child_selected; Elm.Interface.Atspi.Selection.all_children_select; Elm.Interface.Atspi.Selection.clear; + Efl.Ui.Menu.selected_item.get; + Efl.Ui.Menu.first_item.get; + Efl.Ui.Menu.last_item.get; + Efl.Ui.Menu.items.get; } events { item,focused; [[Called when toolbar item got focus]] diff --git a/src/lib/elementary/elm_toolbar_item.eo b/src/lib/elementary/elm_toolbar_item.eo index a98e1ee5e1..254a1c6432 100644 --- a/src/lib/elementary/elm_toolbar_item.eo +++ b/src/lib/elementary/elm_toolbar_item.eo @@ -23,36 +23,12 @@ struct Elm.Toolbar.Item.State data: const(void_ptr); [[Item data]] } -class Elm.Toolbar.Item(Elm.Widget.Item) +class Elm.Toolbar.Item(Elm.Widget.Item, Efl.Ui.Item) { [[Elementary toolbar item class]] legacy_prefix: elm_toolbar_item; eo_prefix: elm_obj_toolbar_item; methods { - @property prev { - get { - [[Get the item before $item in toolbar. - - Note: If it is the first item, $null will be returned. - ]] - } - values { - item: Elm.Widget.Item; [[The item before $item, or $null - if none or on failure.]] - } - } - @property next { - get { - [[Get the item after $item in toolbar. - - Note: If it is the last item, $null will be returned. - ]] - } - values { - item: Elm.Widget.Item; [[The item after $item, or $null - if none or on failure.]] - } - } @property priority { get { [[Get the priority of a toolbar item.]] @@ -74,27 +50,6 @@ class Elm.Toolbar.Item(Elm.Widget.Item) for set and 0 is returned on failure.]] } } - @property selected { - get { - [[Get whether the $item is selected or not.]] - } - set { - [[Set the selected state of an item. - - This sets the selected state of the given item $it. - $true for selected, $false for not selected. - - If a new item is selected the previously selected will - be unselected. Previously selected item can be get with - function @Elm.Toolbar.selected_item.get. - - Selected items will be highlighted. - ]] - } - values { - selected: bool; [[The selected state.]] - } - } @property icon { get { [[Get the string used to set the icon of $item.]] @@ -321,5 +276,8 @@ class Elm.Toolbar.Item(Elm.Widget.Item) Elm.Widget.Item.part_content_unset; Elm.Interface.Atspi_Accessible.name.get; Elm.Interface.Atspi_Accessible.state_set.get; + Efl.Ui.Item.selected; + Efl.Ui.Item.prev.get; + Efl.Ui.Item.next.get; } } diff --git a/src/lib/elementary/elm_toolbar_legacy.h b/src/lib/elementary/elm_toolbar_legacy.h index 9d0fe5b007..6268d541e8 100644 --- a/src/lib/elementary/elm_toolbar_legacy.h +++ b/src/lib/elementary/elm_toolbar_legacy.h @@ -109,5 +109,91 @@ EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal); */ EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj); +/** + * @brief Get the selected item. + * + * The selected item can be unselected with function + * elm_toolbar_item_selected_set(). + * + * The selected item always will be highlighted on toolbar. + * + * @return The selected toolbar item. + * + * @ingroup Elm_Toolbar + */ +EAPI Elm_Widget_Item *elm_toolbar_selected_item_get(const Evas_Object *obj); + +/** + * @brief Get the first item in the given toolbar widget's list of items. + * + * See: @ref elm_obj_toolbar_item_append and @ref elm_obj_toolbar_last_item_get + * + * @return The first item or @c NULL, if it has no items (and on errors) + * + * @ingroup Elm_Toolbar + */ +EAPI Elm_Widget_Item *elm_toolbar_first_item_get(const Evas_Object *obj); + +/** + * @brief Get the last item in the given toolbar widget's list of items. + * + * See: @ref elm_obj_toolbar_item_prepend and + * @ref elm_obj_toolbar_first_item_get + * + * @return The last item or @c NULL, if it has no items (and on errors) + * + * @ingroup Elm_Toolbar + */ +EAPI Elm_Widget_Item *elm_toolbar_last_item_get(const Evas_Object *obj); + +/** + * @brief Get the item before @c item in toolbar. + * + * @note If it is the first item, @c null will be returned. + * + * @return The item before @c item, or @c null if none or on failure. + * + * @ingroup Elm_Toolbar_Item + */ +EAPI Elm_Widget_Item *elm_toolbar_item_prev_get(const Evas_Object *obj); + +/** + * @brief Get the item after @c item in toolbar. + * + * @note If it is the last item, @c null will be returned. + * + * @return The item after @c item, or @c null if none or on failure. + * + * @ingroup Elm_Toolbar_Item + */ +EAPI Elm_Widget_Item *elm_toolbar_item_next_get(const Evas_Object *obj); + +/** + * @brief Set the selected state of an item. + * + * This sets the selected state of the given item @c it. @c true for selected, + * @c false for not selected. + * + * If a new item is selected the previously selected will be unselected. + * Previously selected item can be get with function + * @ref efl_ui_menu_selected_item_get. + * + * Selected items will be highlighted. + * + * @param[in] selected The selected state. + * + * @ingroup Elm_Toolbar_Item + */ +EAPI void elm_toolbar_item_selected_set(Evas_Object *obj, Eina_Bool selected); + +/** + * @brief Get whether the @c item is selected or not. + * + * @return The selected state. + * + * @ingroup Elm_Toolbar_Item + */ +EAPI Eina_Bool elm_toolbar_item_selected_get(const Evas_Object *obj); + #include "elm_toolbar_item.eo.legacy.h" #include "elm_toolbar.eo.legacy.h" diff --git a/src/lib/elementary/elm_widget_ctxpopup.h b/src/lib/elementary/elm_widget_ctxpopup.h index e82144b636..b9342e1264 100644 --- a/src/lib/elementary/elm_widget_ctxpopup.h +++ b/src/lib/elementary/elm_widget_ctxpopup.h @@ -38,6 +38,8 @@ struct _Elm_Ctxpopup_Item_Data const void *org_data; Evas_Object *cobj; } wcb; + + Eina_Bool selected : 1; }; struct _Elm_Ctxpopup_Data |