summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-05 17:00:37 -0500
committerCedric BAIL <cedric.bail@free.fr>2019-03-07 14:15:48 -0800
commiteca53d9157fe6bbf15d5730febd04f159f8f6073 (patch)
tree70f2483ef6ab81ab456a06f772bd8db603dfbd36 /src
parente26db8dea5cd5a57945e03cb58c816dc0e9a9cb6 (diff)
elm_menu*: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in efl and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8184
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Elementary.am10
-rw-r--r--src/lib/elementary/elm_menu.c4
-rw-r--r--src/lib/elementary/elm_menu.eo106
-rw-r--r--src/lib/elementary/elm_menu_eo.c132
-rw-r--r--src/lib/elementary/elm_menu_eo.h158
-rw-r--r--src/lib/elementary/elm_menu_eo.legacy.c54
-rw-r--r--src/lib/elementary/elm_menu_eo.legacy.h127
-rw-r--r--src/lib/elementary/elm_menu_item.eo121
-rw-r--r--src/lib/elementary/elm_menu_item_eo.c205
-rw-r--r--src/lib/elementary/elm_menu_item_eo.h175
-rw-r--r--src/lib/elementary/elm_menu_item_eo.legacy.c66
-rw-r--r--src/lib/elementary/elm_menu_item_eo.legacy.h168
-rw-r--r--src/lib/elementary/elm_menu_legacy.h4
-rw-r--r--src/lib/elementary/elm_widget_menu.h4
-rw-r--r--src/lib/elementary/meson.build6
15 files changed, 1103 insertions, 237 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index ad60028..f3d6ff0 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -186,7 +186,6 @@ elm_private_eolian_files = \
186# Legacy classes - not part of public EO API 186# Legacy classes - not part of public EO API
187elm_legacy_eolian_files = \ 187elm_legacy_eolian_files = \
188 lib/elementary/efl_ui_clock_legacy.eo \ 188 lib/elementary/efl_ui_clock_legacy.eo \
189 lib/elementary/elm_menu.eo \
190 lib/elementary/elm_notify.eo \ 189 lib/elementary/elm_notify.eo \
191 lib/elementary/elm_panel.eo \ 190 lib/elementary/elm_panel.eo \
192 lib/elementary/elm_player.eo \ 191 lib/elementary/elm_player.eo \
@@ -198,7 +197,6 @@ elm_legacy_eolian_files = \
198 lib/elementary/elm_sys_notify.eo \ 197 lib/elementary/elm_sys_notify.eo \
199 lib/elementary/elm_sys_notify_dbus.eo \ 198 lib/elementary/elm_sys_notify_dbus.eo \
200 lib/elementary/elm_systray.eo \ 199 lib/elementary/elm_systray.eo \
201 lib/elementary/elm_menu_item.eo \
202 lib/elementary/elm_widget_item_static_focus.eo \ 200 lib/elementary/elm_widget_item_static_focus.eo \
203 lib/elementary/elm_popup_item.eo \ 201 lib/elementary/elm_popup_item.eo \
204 lib/elementary/elm_ctxpopup_part.eo \ 202 lib/elementary/elm_ctxpopup_part.eo \
@@ -368,6 +366,10 @@ lib/elementary/elm_mapbuf_eo.legacy.c \
368lib/elementary/elm_map_eo.c \ 366lib/elementary/elm_map_eo.c \
369lib/elementary/elm_map_eo.legacy.c \ 367lib/elementary/elm_map_eo.legacy.c \
370lib/elementary/elm_map_pan_eo.c \ 368lib/elementary/elm_map_pan_eo.c \
369lib/elementary/elm_menu_eo.c \
370lib/elementary/elm_menu_eo.legacy.c \
371lib/elementary/elm_menu_item_eo.c \
372lib/elementary/elm_menu_item_eo.legacy.c \
371$(NULL) 373$(NULL)
372 374
373elm_legacy_eo_headers = \ 375elm_legacy_eo_headers = \
@@ -509,6 +511,10 @@ lib/elementary/elm_map_eo.h \
509lib/elementary/elm_map_eo.legacy.h \ 511lib/elementary/elm_map_eo.legacy.h \
510lib/elementary/elm_map_pan_eo.h \ 512lib/elementary/elm_map_pan_eo.h \
511lib/elementary/elm_map_pan_eo.legacy.h \ 513lib/elementary/elm_map_pan_eo.legacy.h \
514lib/elementary/elm_menu_eo.h \
515lib/elementary/elm_menu_eo.legacy.h \
516lib/elementary/elm_menu_item_eo.h \
517lib/elementary/elm_menu_item_eo.legacy.h \
512$(NULL) 518$(NULL)
513 519
514 520
diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c
index 8c56dc9..aebcd7d 100644
--- a/src/lib/elementary/elm_menu.c
+++ b/src/lib/elementary/elm_menu.c
@@ -1461,5 +1461,5 @@ _elm_menu_efl_object_provider_find(const Eo *obj, Elm_Menu_Data *pd, const Efl_O
1461#define ELM_MENU_EXTRA_OPS \ 1461#define ELM_MENU_EXTRA_OPS \
1462 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_menu) 1462 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_menu)
1463 1463
1464#include "elm_menu_item.eo.c" 1464#include "elm_menu_item_eo.c"
1465#include "elm_menu.eo.c" 1465#include "elm_menu_eo.c"
diff --git a/src/lib/elementary/elm_menu.eo b/src/lib/elementary/elm_menu.eo
deleted file mode 100644
index ef0ccac..0000000
--- a/src/lib/elementary/elm_menu.eo
+++ /dev/null
@@ -1,106 +0,0 @@
1class Elm.Menu extends Efl.Ui.Widget implements Efl.Ui.Clickable,
2 Efl.Access.Selection, Efl.Ui.Widget_Focus_Manager, Efl.Ui.Legacy
3{
4 [[Elementary menu class]]
5 legacy_prefix: elm_menu;
6 eo_prefix: elm_obj_menu;
7 event_prefix: elm_menu;
8 methods {
9 @property selected_item {
10 get {
11 [[Get the selected item in the widget.]]
12 }
13 values {
14 item: Elm.Widget.Item; [[The selected item or $null.]]
15 }
16 }
17 @property first_item {
18 get {
19 [[Get the first item in the widget.]]
20 }
21 values {
22 item: Elm.Widget.Item; [[The first item or $null.]]
23 }
24 }
25 @property last_item {
26 get {
27 [[Get the last item in the widget.]]
28 }
29 values {
30 item: Elm.Widget.Item; [[The last item or $null.]]
31 }
32 }
33 @property items {
34 get {
35 [[Returns a list of the widget item.]]
36 return: const(list<Elm.Widget.Item>); [[const list to widget items]]
37 }
38 }
39 relative_move {
40 [[Move the menu to a new position
41
42 Sets the top-left position of the menu to ($x, $y).
43
44 Note: $x and $y coordinates are relative to parent.
45 ]]
46 legacy: elm_menu_move;
47 params {
48 @in x: int; [[The new X coordinate]]
49 @in y: int; [[The new Y coordinate]]
50 }
51 }
52 item_add {
53 [[Add an item at the end of the given menu widget.
54
55 Note: This function does not accept relative icon path.
56 ]]
57 return: Elm.Widget.Item; [[The new menu item.]]
58 params {
59 @in parent: Elm.Widget.Item @optional; [[The parent menu item (optional).]]
60 @in icon: string @optional; [[An icon display on the item. The icon will be destroyed by the menu.]]
61 @in label: string; [[The label of the item.]]
62 @in func: Evas_Smart_Cb @optional; [[Function called when the user select the item.]]
63 @in data: const(void_ptr) @optional; [[Data sent by the callback.]]
64 }
65 }
66 open {
67 [[Open a closed menu
68
69 Show the menu with no child sub-menus expanded..
70 ]]
71 }
72 close {
73 [[Close a opened menu
74
75 Hides the menu and all it's sub-menus.
76 ]]
77 }
78 item_separator_add {
79 [[Add a separator item to menu $obj under $parent.]]
80 return: Elm.Widget.Item; [[The created item or $null.]]
81 params {
82 @in parent: Elm.Widget.Item; [[The item to add the separator under.]]
83 }
84 }
85 }
86 implements {
87 class.constructor;
88 Efl.Object.constructor;
89 Efl.Object.destructor;
90 Efl.Gfx.Entity.visible { set; }
91 Efl.Ui.Widget.widget_parent { get; set; }
92 Efl.Ui.Widget.theme_apply;
93 Efl.Ui.L10n.translation_update;
94 Efl.Ui.Widget_Focus_Manager.focus_manager_create;
95 Efl.Access.Object.access_children { get; }
96 Efl.Access.Selection.selected_children_count { get; }
97 Efl.Access.Selection.selected_child { get; }
98 Efl.Object.provider_find;
99 }
100 events {
101 dismissed: void; [[Called when menu widget was dismissed]]
102 /* FIXME: Nobody is emitting this, but they are already in use */
103 elm,action,block_menu: void; [[Called when menu blocking have been enabled]]
104 elm,action,unblock_menu: void; [[Called when menu blocking has been disabled]]
105 }
106}
diff --git a/src/lib/elementary/elm_menu_eo.c b/src/lib/elementary/elm_menu_eo.c
new file mode 100644
index 0000000..e044040
--- /dev/null
+++ b/src/lib/elementary/elm_menu_eo.c
@@ -0,0 +1,132 @@
1EWAPI const Efl_Event_Description _ELM_MENU_EVENT_DISMISSED =
2 EFL_EVENT_DESCRIPTION("dismissed");
3EWAPI const Efl_Event_Description _ELM_MENU_EVENT_ELM_ACTION_BLOCK_MENU =
4 EFL_EVENT_DESCRIPTION("elm,action,block_menu");
5EWAPI const Efl_Event_Description _ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU =
6 EFL_EVENT_DESCRIPTION("elm,action,unblock_menu");
7
8Elm_Widget_Item *_elm_menu_selected_item_get(const Eo *obj, Elm_Menu_Data *pd);
9
10EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_selected_item_get, Elm_Widget_Item *, NULL);
11
12Elm_Widget_Item *_elm_menu_first_item_get(const Eo *obj, Elm_Menu_Data *pd);
13
14EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_first_item_get, Elm_Widget_Item *, NULL);
15
16Elm_Widget_Item *_elm_menu_last_item_get(const Eo *obj, Elm_Menu_Data *pd);
17
18EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_last_item_get, Elm_Widget_Item *, NULL);
19
20const Eina_List *_elm_menu_items_get(const Eo *obj, Elm_Menu_Data *pd);
21
22EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_items_get, const Eina_List *, NULL);
23
24void _elm_menu_relative_move(Eo *obj, Elm_Menu_Data *pd, int x, int y);
25
26EOAPI EFL_VOID_FUNC_BODYV(elm_obj_menu_relative_move, EFL_FUNC_CALL(x, y), int x, int y);
27
28Elm_Widget_Item *_elm_menu_item_add(Eo *obj, Elm_Menu_Data *pd, Elm_Widget_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
29
30EOAPI EFL_FUNC_BODYV(elm_obj_menu_item_add, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(parent, icon, label, func, data), Elm_Widget_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
31
32void _elm_menu_open(Eo *obj, Elm_Menu_Data *pd);
33
34EOAPI EFL_VOID_FUNC_BODY(elm_obj_menu_open);
35
36void _elm_menu_close(Eo *obj, Elm_Menu_Data *pd);
37
38EOAPI EFL_VOID_FUNC_BODY(elm_obj_menu_close);
39
40Elm_Widget_Item *_elm_menu_item_separator_add(Eo *obj, Elm_Menu_Data *pd, Elm_Widget_Item *parent);
41
42EOAPI EFL_FUNC_BODYV(elm_obj_menu_item_separator_add, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(parent), Elm_Widget_Item *parent);
43
44Efl_Object *_elm_menu_efl_object_constructor(Eo *obj, Elm_Menu_Data *pd);
45
46
47void _elm_menu_efl_object_destructor(Eo *obj, Elm_Menu_Data *pd);
48
49
50void _elm_menu_efl_gfx_entity_visible_set(Eo *obj, Elm_Menu_Data *pd, Eina_Bool v);
51
52
53void _elm_menu_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Menu_Data *pd, Efl_Ui_Widget *parent);
54
55
56Efl_Ui_Widget *_elm_menu_efl_ui_widget_widget_parent_get(const Eo *obj, Elm_Menu_Data *pd);
57
58
59Eina_Error _elm_menu_efl_ui_widget_theme_apply(Eo *obj, Elm_Menu_Data *pd);
60
61
62void _elm_menu_efl_ui_l10n_translation_update(Eo *obj, Elm_Menu_Data *pd);
63
64
65Efl_Ui_Focus_Manager *_elm_menu_efl_ui_widget_focus_manager_focus_manager_create(Eo *obj, Elm_Menu_Data *pd, Efl_Ui_Focus_Object *root);
66
67
68Eina_List *_elm_menu_efl_access_object_access_children_get(const Eo *obj, Elm_Menu_Data *pd);
69
70
71int _elm_menu_efl_access_selection_selected_children_count_get(const Eo *obj, Elm_Menu_Data *pd);
72
73
74Efl_Object *_elm_menu_efl_access_selection_selected_child_get(const Eo *obj, Elm_Menu_Data *pd, int selected_child_index);
75
76
77Efl_Object *_elm_menu_efl_object_provider_find(const Eo *obj, Elm_Menu_Data *pd, const Efl_Class *klass);
78
79
80static Eina_Bool
81_elm_menu_class_initializer(Efl_Class *klass)
82{
83 const Efl_Object_Ops *opsp = NULL;
84
85 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
86
87#ifndef ELM_MENU_EXTRA_OPS
88#define ELM_MENU_EXTRA_OPS
89#endif
90
91 EFL_OPS_DEFINE(ops,
92 EFL_OBJECT_OP_FUNC(elm_obj_menu_selected_item_get, _elm_menu_selected_item_get),
93 EFL_OBJECT_OP_FUNC(elm_obj_menu_first_item_get, _elm_menu_first_item_get),
94 EFL_OBJECT_OP_FUNC(elm_obj_menu_last_item_get, _elm_menu_last_item_get),
95 EFL_OBJECT_OP_FUNC(elm_obj_menu_items_get, _elm_menu_items_get),
96 EFL_OBJECT_OP_FUNC(elm_obj_menu_relative_move, _elm_menu_relative_move),
97 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_add, _elm_menu_item_add),
98 EFL_OBJECT_OP_FUNC(elm_obj_menu_open, _elm_menu_open),
99 EFL_OBJECT_OP_FUNC(elm_obj_menu_close, _elm_menu_close),
100 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_separator_add, _elm_menu_item_separator_add),
101 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_menu_efl_object_constructor),
102 EFL_OBJECT_OP_FUNC(efl_destructor, _elm_menu_efl_object_destructor),
103 EFL_OBJECT_OP_FUNC(efl_gfx_entity_visible_set, _elm_menu_efl_gfx_entity_visible_set),
104 EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_menu_efl_ui_widget_widget_parent_set),
105 EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_get, _elm_menu_efl_ui_widget_widget_parent_get),
106 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_menu_efl_ui_widget_theme_apply),
107 EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_menu_efl_ui_l10n_translation_update),
108 EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_manager_create, _elm_menu_efl_ui_widget_focus_manager_focus_manager_create),
109 EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_menu_efl_access_object_access_children_get),
110 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_children_count_get, _elm_menu_efl_access_selection_selected_children_count_get),
111 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_get, _elm_menu_efl_access_selection_selected_child_get),
112 EFL_OBJECT_OP_FUNC(efl_provider_find, _elm_menu_efl_object_provider_find),
113 ELM_MENU_EXTRA_OPS
114 );
115 opsp = &ops;
116
117 return efl_class_functions_set(klass, opsp, ropsp);
118}
119
120static const Efl_Class_Description _elm_menu_class_desc = {
121 EO_VERSION,
122 "Elm.Menu",
123 EFL_CLASS_TYPE_REGULAR,
124 sizeof(Elm_Menu_Data),
125 _elm_menu_class_initializer,
126 _elm_menu_class_constructor,
127 NULL
128};
129
130EFL_DEFINE_CLASS(elm_menu_class_get, &_elm_menu_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_CLICKABLE_INTERFACE, EFL_ACCESS_SELECTION_INTERFACE, EFL_UI_WIDGET_FOCUS_MANAGER_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL);
131
132#include "elm_menu_eo.legacy.c"
diff --git a/src/lib/elementary/elm_menu_eo.h b/src/lib/elementary/elm_menu_eo.h
new file mode 100644
index 0000000..1c4a811
--- /dev/null
+++ b/src/lib/elementary/elm_menu_eo.h
@@ -0,0 +1,158 @@
1#ifndef _ELM_MENU_EO_H_
2#define _ELM_MENU_EO_H_
3
4#ifndef _ELM_MENU_EO_CLASS_TYPE
5#define _ELM_MENU_EO_CLASS_TYPE
6
7typedef Eo Elm_Menu;
8
9#endif
10
11#ifndef _ELM_MENU_EO_TYPES
12#define _ELM_MENU_EO_TYPES
13
14
15#endif
16/** Elementary menu class
17 *
18 * @ingroup Elm_Menu
19 */
20#define ELM_MENU_CLASS elm_menu_class_get()
21
22EWAPI const Efl_Class *elm_menu_class_get(void);
23
24/**
25 * @brief Get the selected item in the widget.
26 *
27 * @param[in] obj The object.
28 *
29 * @return The selected item or @c null.
30 *
31 * @ingroup Elm_Menu
32 */
33EOAPI Elm_Widget_Item *elm_obj_menu_selected_item_get(const Eo *obj);
34
35/**
36 * @brief Get the first item in the widget.
37 *
38 * @param[in] obj The object.
39 *
40 * @return The first item or @c null.
41 *
42 * @ingroup Elm_Menu
43 */
44EOAPI Elm_Widget_Item *elm_obj_menu_first_item_get(const Eo *obj);
45
46/**
47 * @brief Get the last item in the widget.
48 *
49 * @param[in] obj The object.
50 *
51 * @return The last item or @c null.
52 *
53 * @ingroup Elm_Menu
54 */
55EOAPI Elm_Widget_Item *elm_obj_menu_last_item_get(const Eo *obj);
56
57/**
58 * @brief Returns a list of the widget item.
59 *
60 * @param[in] obj The object.
61 *
62 * @return const list to widget items
63 *
64 * @ingroup Elm_Menu
65 */
66EOAPI const Eina_List *elm_obj_menu_items_get(const Eo *obj);
67
68/**
69 * @brief Move the menu to a new position
70 *
71 * Sets the top-left position of the menu to ($x, @c y).
72 *
73 * @note @c x and @c y coordinates are relative to parent.
74 *
75 * @param[in] obj The object.
76 * @param[in] x The new X coordinate
77 * @param[in] y The new Y coordinate
78 *
79 * @ingroup Elm_Menu
80 */
81EOAPI void elm_obj_menu_relative_move(Eo *obj, int x, int y);
82
83/**
84 * @brief Add an item at the end of the given menu widget.
85 *
86 * @note This function does not accept relative icon path.
87 *
88 * @param[in] obj The object.
89 * @param[in] parent The parent menu item (optional).
90 * @param[in] icon An icon display on the item. The icon will be destroyed by
91 * the menu.
92 * @param[in] label The label of the item.
93 * @param[in] func Function called when the user select the item.
94 * @param[in] data Data sent by the callback.
95 *
96 * @return The new menu item.
97 *
98 * @ingroup Elm_Menu
99 */
100EOAPI Elm_Widget_Item *elm_obj_menu_item_add(Eo *obj, Elm_Widget_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
101
102/**
103 * @brief Open a closed menu
104 *
105 * Show the menu with no child sub-menus expanded..
106 * @param[in] obj The object.
107 *
108 * @ingroup Elm_Menu
109 */
110EOAPI void elm_obj_menu_open(Eo *obj);
111
112/**
113 * @brief Close a opened menu
114 *
115 * Hides the menu and all it's sub-menus.
116 * @param[in] obj The object.
117 *
118 * @ingroup Elm_Menu
119 */
120EOAPI void elm_obj_menu_close(Eo *obj);
121
122/**
123 * @brief Add a separator item to menu @c obj under @c parent.
124 *
125 * @param[in] obj The object.
126 * @param[in] parent The item to add the separator under.
127 *
128 * @return The created item or @c null.
129 *
130 * @ingroup Elm_Menu
131 */
132EOAPI Elm_Widget_Item *elm_obj_menu_item_separator_add(Eo *obj, Elm_Widget_Item *parent);
133
134EWAPI extern const Efl_Event_Description _ELM_MENU_EVENT_DISMISSED;
135
136/** Called when menu widget was dismissed
137 *
138 * @ingroup Elm_Menu
139 */
140#define ELM_MENU_EVENT_DISMISSED (&(_ELM_MENU_EVENT_DISMISSED))
141
142EWAPI extern const Efl_Event_Description _ELM_MENU_EVENT_ELM_ACTION_BLOCK_MENU;
143
144/** Called when menu blocking have been enabled
145 *
146 * @ingroup Elm_Menu
147 */
148#define ELM_MENU_EVENT_ELM_ACTION_BLOCK_MENU (&(_ELM_MENU_EVENT_ELM_ACTION_BLOCK_MENU))
149
150EWAPI extern const Efl_Event_Description _ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU;
151
152/** Called when menu blocking has been disabled
153 *
154 * @ingroup Elm_Menu
155 */
156#define ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU (&(_ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU))
157
158#endif
diff --git a/src/lib/elementary/elm_menu_eo.legacy.c b/src/lib/elementary/elm_menu_eo.legacy.c
new file mode 100644
index 0000000..864be2d
--- /dev/null
+++ b/src/lib/elementary/elm_menu_eo.legacy.c
@@ -0,0 +1,54 @@
1
2EAPI Elm_Widget_Item *
3elm_menu_selected_item_get(const Elm_Menu *obj)
4{
5 return elm_obj_menu_selected_item_get(obj);
6}
7
8EAPI Elm_Widget_Item *
9elm_menu_first_item_get(const Elm_Menu *obj)
10{
11 return elm_obj_menu_first_item_get(obj);
12}
13
14EAPI Elm_Widget_Item *
15elm_menu_last_item_get(const Elm_Menu *obj)
16{
17 return elm_obj_menu_last_item_get(obj);
18}
19
20EAPI const Eina_List *
21elm_menu_items_get(const Elm_Menu *obj)
22{
23 return elm_obj_menu_items_get(obj);
24}
25
26EAPI void
27elm_menu_move(Elm_Menu *obj, int x, int y)
28{
29 elm_obj_menu_relative_move(obj, x, y);
30}
31
32EAPI Elm_Widget_Item *
33elm_menu_item_add(Elm_Menu *obj, Elm_Widget_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
34{
35 return elm_obj_menu_item_add(obj, parent, icon, label, func, data);
36}
37
38EAPI void
39elm_menu_open(Elm_Menu *obj)
40{
41 elm_obj_menu_open(obj);
42}
43
44EAPI void
45elm_menu_close(Elm_Menu *obj)
46{
47 elm_obj_menu_close(obj);
48}
49
50EAPI Elm_Widget_Item *
51elm_menu_item_separator_add(Elm_Menu *obj, Elm_Widget_Item *parent)
52{
53 return elm_obj_menu_item_separator_add(obj, parent);
54}
diff --git a/src/lib/elementary/elm_menu_eo.legacy.h b/src/lib/elementary/elm_menu_eo.legacy.h
new file mode 100644
index 0000000..d54b440
--- /dev/null
+++ b/src/lib/elementary/elm_menu_eo.legacy.h
@@ -0,0 +1,127 @@
1#ifndef _ELM_MENU_EO_LEGACY_H_
2#define _ELM_MENU_EO_LEGACY_H_
3
4#ifndef _ELM_MENU_EO_CLASS_TYPE
5#define _ELM_MENU_EO_CLASS_TYPE
6
7typedef Eo Elm_Menu;
8
9#endif
10
11#ifndef _ELM_MENU_EO_TYPES
12#define _ELM_MENU_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Get the selected item in the widget.
19 *
20 * @param[in] obj The object.
21 *
22 * @return The selected item or @c null.
23 *
24 * @ingroup Elm_Menu_Group
25 */
26EAPI Elm_Widget_Item *elm_menu_selected_item_get(const Elm_Menu *obj);
27
28/**
29 * @brief Get the first item in the widget.
30 *
31 * @param[in] obj The object.
32 *
33 * @return The first item or @c null.
34 *
35 * @ingroup Elm_Menu_Group
36 */
37EAPI Elm_Widget_Item *elm_menu_first_item_get(const Elm_Menu *obj);
38
39/**
40 * @brief Get the last item in the widget.
41 *
42 * @param[in] obj The object.
43 *
44 * @return The last item or @c null.
45 *
46 * @ingroup Elm_Menu_Group
47 */
48EAPI Elm_Widget_Item *elm_menu_last_item_get(const Elm_Menu *obj);
49
50/**
51 * @brief Returns a list of the widget item.
52 *
53 * @param[in] obj The object.
54 *
55 * @return const list to widget items
56 *
57 * @ingroup Elm_Menu_Group
58 */
59EAPI const Eina_List *elm_menu_items_get(const Elm_Menu *obj);
60
61/**
62 * @brief Move the menu to a new position
63 *
64 * Sets the top-left position of the menu to ($x, @c y).
65 *
66 * @note @c x and @c y coordinates are relative to parent.
67 *
68 * @param[in] obj The object.
69 * @param[in] x The new X coordinate
70 * @param[in] y The new Y coordinate
71 *
72 * @ingroup Elm_Menu_Group
73 */
74EAPI void elm_menu_move(Elm_Menu *obj, int x, int y);
75
76/**
77 * @brief Add an item at the end of the given menu widget.
78 *
79 * @note This function does not accept relative icon path.
80 *
81 * @param[in] obj The object.
82 * @param[in] parent The parent menu item (optional).
83 * @param[in] icon An icon display on the item. The icon will be destroyed by
84 * the menu.
85 * @param[in] label The label of the item.
86 * @param[in] func Function called when the user select the item.
87 * @param[in] data Data sent by the callback.
88 *
89 * @return The new menu item.
90 *
91 * @ingroup Elm_Menu_Group
92 */
93EAPI Elm_Widget_Item *elm_menu_item_add(Elm_Menu *obj, Elm_Widget_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
94
95/**
96 * @brief Open a closed menu
97 *
98 * Show the menu with no child sub-menus expanded..
99 * @param[in] obj The object.
100 *
101 * @ingroup Elm_Menu_Group
102 */
103EAPI void elm_menu_open(Elm_Menu *obj);
104
105/**
106 * @brief Close a opened menu
107 *
108 * Hides the menu and all it's sub-menus.
109 * @param[in] obj The object.
110 *
111 * @ingroup Elm_Menu_Group
112 */
113EAPI void elm_menu_close(Elm_Menu *obj);
114
115/**
116 * @brief Add a separator item to menu @c obj under @c parent.
117 *
118 * @param[in] obj The object.
119 * @param[in] parent The item to add the separator under.
120 *
121 * @return The created item or @c null.
122 *
123 * @ingroup Elm_Menu_Group
124 */
125EAPI Elm_Widget_Item *elm_menu_item_separator_add(Elm_Menu *obj, Elm_Widget_Item *parent);
126
127#endif
diff --git a/src/lib/elementary/elm_menu_item.eo b/src/lib/elementary/elm_menu_item.eo
deleted file mode 100644
index 8bc14ed..0000000
--- a/src/lib/elementary/elm_menu_item.eo
+++ /dev/null
@@ -1,121 +0,0 @@
1class Elm.Menu.Item extends Elm.Widget.Item implements Efl.Access.Selection, Efl.Ui.Legacy
2{
3 [[Elementary menu item class]]
4 legacy_prefix: elm_menu_item;
5 eo_prefix: elm_obj_menu_item;
6 methods {
7 @property icon_name {
8 get {
9 [[Get the string representation from the icon of a menu item
10
11 Once this icon is set, any previously set icon will be deleted.
12 To hide icon set it to "".
13 ]]
14 }
15 set {
16 [[Set the icon of a menu item to the standard icon with the
17 given name.
18
19 Once this icon is set, any previously set icon will be deleted.
20 To hide icon set it to "".
21 ]]
22 }
23 values {
24 icon: string; [[The name of icon object.]]
25 }
26 }
27 @property prev {
28 get {
29 [[Get the item before this one in the widget's list of items.
30
31 See also @.next.
32 ]]
33 }
34 values {
35 item: Elm.Widget.Item; [[The item before the object in its parent's
36 list. If there is no previous item or in case
37 of error, $null is returned.]]
38 }
39 }
40 @property next {
41 get {
42 [[Get the item after this one in the widget's list of items.
43
44 See also @.prev.
45 ]]
46 }
47 values {
48 item: Elm.Widget.Item; [[The item after the object in its parent's
49 list. If there is no next item or in case
50 of error, $null is returned.]]
51 }
52 }
53 @property selected {
54 [[Indicates whether this item is currently selected.]]
55 get {
56 [[Get the selected state of this item.]]
57 }
58 set {
59 [[Set the selected state of $item.
60
61 This sets the selected state of the given item $it.
62 $true for selected, $false for not selected.
63
64 If a new item is selected the previously selected will
65 be unselected. Previously selected item can be retrieved
66 with @Elm.Menu.selected_item.get.
67
68 Selected items will be highlighted.
69 ]]
70 }
71 values {
72 selected: bool; [[The selection state.]]
73 }
74 }
75 index_get @const {
76 [[Get the item index]]
77 return: uint; [[Item index]]
78 }
79 subitems_clear {
80 [[Remove all sub-items (children) of the given item
81
82 This removes all items that are children (and their descendants)
83 of the given item $it.
84
85 @since 1.8
86 ]]
87 }
88 subitems_get @const {
89 [[Returns a list of $item's subitems.]]
90 return: const(list<Elm.Widget.Item>); [[A list of $item's subitems]]
91 }
92 is_separator @const {
93 [[Returns whether $item is a separator.]]
94 return: bool; [[$true if the item is a separator.]]
95 }
96 object_get @const {
97 [[Get the real Evas(Edje) object created to implement the view of
98 a given menu item.
99
100 Warning: Don't manipulate this object!
101 ]]
102 return: Efl.Canvas.Object; [[The base Edje object containing the
103 swallowed content associated with the item.]]
104 }
105 }
106 implements {
107 Efl.Object.constructor;
108 Efl.Object.destructor;
109 Efl.Object.parent { get; }
110 Elm.Widget.Item.disable;
111 Elm.Widget.Item.signal_emit;
112 Elm.Widget.Item.part_text { get; set; }
113 Elm.Widget.Item.part_content { get; set; }
114 Efl.Access.Object.access_children { get; }
115 Efl.Access.Object.role { get; }
116 Efl.Access.Object.i18n_name { get; }
117 Efl.Access.Object.state_set { get; }
118 Efl.Access.Selection.selected_children_count { get; }
119 Efl.Access.Selection.selected_child { get; }
120 }
121}
diff --git a/src/lib/elementary/elm_menu_item_eo.c b/src/lib/elementary/elm_menu_item_eo.c
new file mode 100644
index 0000000..40d2fd8
--- /dev/null
+++ b/src/lib/elementary/elm_menu_item_eo.c
@@ -0,0 +1,205 @@
1
2void _elm_menu_item_icon_name_set(Eo *obj, Elm_Menu_Item_Data *pd, const char *icon);
3
4
5static Eina_Error
6__eolian_elm_menu_item_icon_name_set_reflect(Eo *obj, Eina_Value val)
7{
8 Eina_Error r = 0; const char *cval;
9 if (!eina_value_string_convert(&val, &cval))
10 {
11 r = EINA_ERROR_VALUE_FAILED;
12 goto end;
13 }
14 elm_obj_menu_item_icon_name_set(obj, cval);
15 end:
16 eina_value_flush(&val);
17 return r;
18}
19
20EOAPI EFL_VOID_FUNC_BODYV(elm_obj_menu_item_icon_name_set, EFL_FUNC_CALL(icon), const char *icon);
21
22const char *_elm_menu_item_icon_name_get(const Eo *obj, Elm_Menu_Item_Data *pd);
23
24
25static Eina_Value
26__eolian_elm_menu_item_icon_name_get_reflect(Eo *obj)
27{
28 const char *val = elm_obj_menu_item_icon_name_get(obj);
29 return eina_value_string_init(val);
30}
31
32EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_item_icon_name_get, const char *, NULL);
33
34Elm_Widget_Item *_elm_menu_item_prev_get(const Eo *obj, Elm_Menu_Item_Data *pd);
35
36EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_item_prev_get, Elm_Widget_Item *, NULL);
37
38Elm_Widget_Item *_elm_menu_item_next_get(const Eo *obj, Elm_Menu_Item_Data *pd);
39
40EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_item_next_get, Elm_Widget_Item *, NULL);
41
42void _elm_menu_item_selected_set(Eo *obj, Elm_Menu_Item_Data *pd, Eina_Bool selected);
43
44
45static Eina_Error
46__eolian_elm_menu_item_selected_set_reflect(Eo *obj, Eina_Value val)
47{
48 Eina_Error r = 0; Eina_Bool cval;
49 if (!eina_value_bool_convert(&val, &cval))
50 {
51 r = EINA_ERROR_VALUE_FAILED;
52 goto end;
53 }
54 elm_obj_menu_item_selected_set(obj, cval);
55 end:
56 eina_value_flush(&val);
57 return r;
58}
59
60EOAPI EFL_VOID_FUNC_BODYV(elm_obj_menu_item_selected_set, EFL_FUNC_CALL(selected), Eina_Bool selected);
61
62Eina_Bool _elm_menu_item_selected_get(const Eo *obj, Elm_Menu_Item_Data *pd);
63
64
65static Eina_Value
66__eolian_elm_menu_item_selected_get_reflect(Eo *obj)
67{
68 Eina_Bool val = elm_obj_menu_item_selected_get(obj);
69 return eina_value_bool_init(val);
70}
71
72EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_item_selected_get, Eina_Bool, 0);
73
74unsigned int _elm_menu_item_index_get(const Eo *obj, Elm_Menu_Item_Data *pd);
75
76EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_item_index_get, unsigned int, 0);
77
78void _elm_menu_item_subitems_clear(Eo *obj, Elm_Menu_Item_Data *pd);
79
80EOAPI EFL_VOID_FUNC_BODY(elm_obj_menu_item_subitems_clear);
81
82const Eina_List *_elm_menu_item_subitems_get(const Eo *obj, Elm_Menu_Item_Data *pd);
83
84EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_item_subitems_get, const Eina_List *, NULL);
85
86Eina_Bool _elm_menu_item_is_separator(const Eo *obj, Elm_Menu_Item_Data *pd);
87
88EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_item_is_separator, Eina_Bool, 0);
89
90Efl_Canvas_Object *_elm_menu_item_object_get(const Eo *obj, Elm_Menu_Item_Data *pd);
91
92EOAPI EFL_FUNC_BODY_CONST(elm_obj_menu_item_object_get, Efl_Canvas_Object *, NULL);
93
94Efl_Object *_elm_menu_item_efl_object_constructor(Eo *obj, Elm_Menu_Item_Data *pd);
95
96
97void _elm_menu_item_efl_object_destructor(Eo *obj, Elm_Menu_Item_Data *pd);
98
99
100Efl_Object *_elm_menu_item_efl_object_parent_get(const Eo *obj, Elm_Menu_Item_Data *pd);
101
102
103void _elm_menu_item_elm_widget_item_disable(Eo *obj, Elm_Menu_Item_Data *pd);
104
105
106void _elm_menu_item_elm_widget_item_signal_emit(Eo *obj, Elm_Menu_Item_Data *pd, const char *emission, const char *source);
107
108
109void _elm_menu_item_elm_widget_item_part_text_set(Eo *obj, Elm_Menu_Item_Data *pd, const char *part, const char *label);
110
111
112const char *_elm_menu_item_elm_widget_item_part_text_get(const Eo *obj, Elm_Menu_Item_Data *pd, const char *part);
113
114
115void _elm_menu_item_elm_widget_item_part_content_set(Eo *obj, Elm_Menu_Item_Data *pd, const char *part, Efl_Canvas_Object *content);
116
117
118Efl_Canvas_Object *_elm_menu_item_elm_widget_item_part_content_get(const Eo *obj, Elm_Menu_Item_Data *pd, const char *part);
119
120
121Eina_List *_elm_menu_item_efl_access_object_access_children_get(const Eo *obj, Elm_Menu_Item_Data *pd);
122
123
124Efl_Access_Role _elm_menu_item_efl_access_object_role_get(const Eo *obj, Elm_Menu_Item_Data *pd);
125
126
127const char *_elm_menu_item_efl_access_object_i18n_name_get(const Eo *obj, Elm_Menu_Item_Data *pd);
128
129
130Efl_Access_State_Set _elm_menu_item_efl_access_object_state_set_get(const Eo *obj, Elm_Menu_Item_Data *pd);
131
132
133int _elm_menu_item_efl_access_selection_selected_children_count_get(const Eo *obj, Elm_Menu_Item_Data *pd);
134
135
136Efl_Object *_elm_menu_item_efl_access_selection_selected_child_get(const Eo *obj, Elm_Menu_Item_Data *pd, int selected_child_index);
137
138
139static Eina_Bool
140_elm_menu_item_class_initializer(Efl_Class *klass)
141{
142 const Efl_Object_Ops *opsp = NULL;
143
144 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
145
146#ifndef ELM_MENU_ITEM_EXTRA_OPS
147#define ELM_MENU_ITEM_EXTRA_OPS
148#endif
149
150 EFL_OPS_DEFINE(ops,
151 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_icon_name_set, _elm_menu_item_icon_name_set),
152 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_icon_name_get, _elm_menu_item_icon_name_get),
153 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_prev_get, _elm_menu_item_prev_get),
154 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_next_get, _elm_menu_item_next_get),
155 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_selected_set, _elm_menu_item_selected_set),
156 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_selected_get, _elm_menu_item_selected_get),
157 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_index_get, _elm_menu_item_index_get),
158 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_subitems_clear, _elm_menu_item_subitems_clear),
159 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_subitems_get, _elm_menu_item_subitems_get),
160 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_is_separator, _elm_menu_item_is_separator),
161 EFL_OBJECT_OP_FUNC(elm_obj_menu_item_object_get, _elm_menu_item_object_get),
162 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_menu_item_efl_object_constructor),
163 EFL_OBJECT_OP_FUNC(efl_destructor, _elm_menu_item_efl_object_destructor),
164 EFL_OBJECT_OP_FUNC(efl_parent_get, _elm_menu_item_efl_object_parent_get),
165 EFL_OBJECT_OP_FUNC(elm_wdg_item_disable, _elm_menu_item_elm_widget_item_disable),
166 EFL_OBJECT_OP_FUNC(elm_wdg_item_signal_emit, _elm_menu_item_elm_widget_item_signal_emit),
167 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_set, _elm_menu_item_elm_widget_item_part_text_set),
168 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_menu_item_elm_widget_item_part_text_get),
169 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_set, _elm_menu_item_elm_widget_item_part_content_set),
170 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_get, _elm_menu_item_elm_widget_item_part_content_get),
171 EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_menu_item_efl_access_object_access_children_get),
172 EFL_OBJECT_OP_FUNC(efl_access_object_role_get, _elm_menu_item_efl_access_object_role_get),
173 EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_menu_item_efl_access_object_i18n_name_get),
174 EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_menu_item_efl_access_object_state_set_get),
175 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_children_count_get, _elm_menu_item_efl_access_selection_selected_children_count_get),
176 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_get, _elm_menu_item_efl_access_selection_selected_child_get),
177 ELM_MENU_ITEM_EXTRA_OPS
178 );
179 opsp = &ops;
180
181 static const Efl_Object_Property_Reflection refl_table[] = {
182 {"icon_name", __eolian_elm_menu_item_icon_name_set_reflect, __eolian_elm_menu_item_icon_name_get_reflect},
183 {"selected", __eolian_elm_menu_item_selected_set_reflect, __eolian_elm_menu_item_selected_get_reflect},
184 };
185 static const Efl_Object_Property_Reflection_Ops rops = {
186 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
187 };
188 ropsp = &rops;
189
190 return efl_class_functions_set(klass, opsp, ropsp);
191}
192
193static const Efl_Class_Description _elm_menu_item_class_desc = {
194 EO_VERSION,
195 "Elm.Menu.Item",
196 EFL_CLASS_TYPE_REGULAR,
197 sizeof(Elm_Menu_Item_Data),
198 _elm_menu_item_class_initializer,
199 NULL,
200 NULL
201};
202
203EFL_DEFINE_CLASS(elm_menu_item_class_get, &_elm_menu_item_class_desc, ELM_WIDGET_ITEM_CLASS, EFL_ACCESS_SELECTION_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL);
204
205#include "elm_menu_item_eo.legacy.c"
diff --git a/src/lib/elementary/elm_menu_item_eo.h b/src/lib/elementary/elm_menu_item_eo.h
new file mode 100644
index 0000000..708e77e
--- /dev/null
+++ b/src/lib/elementary/elm_menu_item_eo.h
@@ -0,0 +1,175 @@
1#ifndef _ELM_MENU_ITEM_EO_H_
2#define _ELM_MENU_ITEM_EO_H_
3
4#ifndef _ELM_MENU_ITEM_EO_CLASS_TYPE
5#define _ELM_MENU_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Menu_Item;
8
9#endif
10
11#ifndef _ELM_MENU_ITEM_EO_TYPES
12#define _ELM_MENU_ITEM_EO_TYPES
13
14
15#endif
16/** Elementary menu item class
17 *
18 * @ingroup Elm_Menu_Item
19 */
20#define ELM_MENU_ITEM_CLASS elm_menu_item_class_get()
21
22EWAPI const Efl_Class *elm_menu_item_class_get(void);
23
24/**
25 * @brief Set the icon of a menu item to the standard icon with the given name.
26 *
27 * Once this icon is set, any previously set icon will be deleted. To hide icon
28 * set it to "".
29 *
30 * @param[in] obj The object.
31 * @param[in] icon The name of icon object.
32 *
33 * @ingroup Elm_Menu_Item
34 */
35EOAPI void elm_obj_menu_item_icon_name_set(Eo *obj, const char *icon);
36
37/**
38 * @brief Get the string representation from the icon of a menu item
39 *
40 * Once this icon is set, any previously set icon will be deleted. To hide icon
41 * set it to "".
42 *
43 * @param[in] obj The object.
44 *
45 * @return The name of icon object.
46 *
47 * @ingroup Elm_Menu_Item
48 */
49EOAPI const char *elm_obj_menu_item_icon_name_get(const Eo *obj);
50
51/**
52 * @brief Get the item before this one in the widget's list of items.
53 *
54 * See also @ref elm_obj_menu_item_next_get.
55 *
56 * @param[in] obj The object.
57 *
58 * @return The item before the object in its parent's list. If there is no
59 * previous item or in case of error, @c null is returned.
60 *
61 * @ingroup Elm_Menu_Item
62 */
63EOAPI Elm_Widget_Item *elm_obj_menu_item_prev_get(const Eo *obj);
64
65/**
66 * @brief Get the item after this one in the widget's list of items.
67 *
68 * See also @ref elm_obj_menu_item_prev_get.
69 *
70 * @param[in] obj The object.
71 *
72 * @return The item after the object in its parent's list. If there is no next
73 * item or in case of error, @c null is returned.
74 *
75 * @ingroup Elm_Menu_Item
76 */
77EOAPI Elm_Widget_Item *elm_obj_menu_item_next_get(const Eo *obj);
78
79/**
80 * @brief Indicates whether this item is currently selected.
81 *
82 * Set the selected state of @c item.
83 *
84 * This sets the selected state of the given item @c it. @c true for selected,
85 * @c false for not selected.
86 *
87 * If a new item is selected the previously selected will be unselected.
88 * Previously selected item can be retrieved with
89 * @ref elm_obj_menu_selected_item_get.
90 *
91 * Selected items will be highlighted.
92 *
93 * @param[in] obj The object.
94 * @param[in] selected The selection state.
95 *
96 * @ingroup Elm_Menu_Item
97 */
98EOAPI void elm_obj_menu_item_selected_set(Eo *obj, Eina_Bool selected);
99
100/**
101 * @brief Indicates whether this item is currently selected.
102 *
103 * Get the selected state of this item.
104 *
105 * @param[in] obj The object.
106 *
107 * @return The selection state.
108 *
109 * @ingroup Elm_Menu_Item
110 */
111EOAPI Eina_Bool elm_obj_menu_item_selected_get(const Eo *obj);
112
113/**
114 * @brief Get the item index
115 *
116 * @param[in] obj The object.
117 *
118 * @return Item index
119 *
120 * @ingroup Elm_Menu_Item
121 */
122EOAPI unsigned int elm_obj_menu_item_index_get(const Eo *obj);
123
124/**
125 * @brief Remove all sub-items (children) of the given item
126 *
127 * This removes all items that are children (and their descendants) of the
128 * given item @c it.
129 *
130 * @param[in] obj The object.
131 *
132 * @since 1.8
133 *
134 * @ingroup Elm_Menu_Item
135 */
136EOAPI void elm_obj_menu_item_subitems_clear(Eo *obj);
137
138/**
139 * @brief Returns a list of @c item's subitems.
140 *
141 * @param[in] obj The object.
142 *
143 * @return A list of @c item's subitems
144 *
145 * @ingroup Elm_Menu_Item
146 */
147EOAPI const Eina_List *elm_obj_menu_item_subitems_get(const Eo *obj);
148
149/**
150 * @brief Returns whether @c item is a separator.
151 *
152 * @param[in] obj The object.
153 *
154 * @return @c true if the item is a separator.
155 *
156 * @ingroup Elm_Menu_Item
157 */
158EOAPI Eina_Bool elm_obj_menu_item_is_separator(const Eo *obj);
159
160/**
161 * @brief Get the real Evas(Edje) object created to implement the view of a
162 * given menu item.
163 *
164 * @warning Don't manipulate this object!
165 *
166 * @param[in] obj The object.
167 *
168 * @return The base Edje object containing the swallowed content associated
169 * with the item.
170 *
171 * @ingroup Elm_Menu_Item
172 */
173EOAPI Efl_Canvas_Object *elm_obj_menu_item_object_get(const Eo *obj);
174
175#endif
diff --git a/src/lib/elementary/elm_menu_item_eo.legacy.c b/src/lib/elementary/elm_menu_item_eo.legacy.c
new file mode 100644
index 0000000..fa2c452
--- /dev/null
+++ b/src/lib/elementary/elm_menu_item_eo.legacy.c
@@ -0,0 +1,66 @@
1
2EAPI void
3elm_menu_item_icon_name_set(Elm_Menu_Item *obj, const char *icon)
4{
5 elm_obj_menu_item_icon_name_set(obj, icon);
6}
7
8EAPI const char *
9elm_menu_item_icon_name_get(const Elm_Menu_Item *obj)
10{
11 return elm_obj_menu_item_icon_name_get(obj);
12}
13
14EAPI Elm_Widget_Item *
15elm_menu_item_prev_get(const Elm_Menu_Item *obj)
16{
17 return elm_obj_menu_item_prev_get(obj);
18}
19
20EAPI Elm_Widget_Item *
21elm_menu_item_next_get(const Elm_Menu_Item *obj)
22{
23 return elm_obj_menu_item_next_get(obj);
24}
25
26EAPI void
27elm_menu_item_selected_set(Elm_Menu_Item *obj, Eina_Bool selected)
28{
29 elm_obj_menu_item_selected_set(obj, selected);
30}
31
32EAPI Eina_Bool
33elm_menu_item_selected_get(const Elm_Menu_Item *obj)
34{
35 return elm_obj_menu_item_selected_get(obj);
36}
37
38EAPI unsigned int
39elm_menu_item_index_get(const Elm_Menu_Item *obj)
40{
41 return elm_obj_menu_item_index_get(obj);
42}
43
44EAPI void
45elm_menu_item_subitems_clear(Elm_Menu_Item *obj)
46{
47 elm_obj_menu_item_subitems_clear(obj);
48}
49
50EAPI const Eina_List *
51elm_menu_item_subitems_get(const Elm_Menu_Item *obj)
52{
53 return elm_obj_menu_item_subitems_get(obj);
54}
55
56EAPI Eina_Bool
57elm_menu_item_is_separator(const Elm_Menu_Item *obj)
58{
59 return elm_obj_menu_item_is_separator(obj);
60}
61
62EAPI Efl_Canvas_Object *
63elm_menu_item_object_get(const Elm_Menu_Item *obj)
64{
65 return elm_obj_menu_item_object_get(obj);
66}
diff --git a/src/lib/elementary/elm_menu_item_eo.legacy.h b/src/lib/elementary/elm_menu_item_eo.legacy.h
new file mode 100644
index 0000000..d03284c
--- /dev/null
+++ b/src/lib/elementary/elm_menu_item_eo.legacy.h
@@ -0,0 +1,168 @@
1#ifndef _ELM_MENU_ITEM_EO_LEGACY_H_
2#define _ELM_MENU_ITEM_EO_LEGACY_H_
3
4#ifndef _ELM_MENU_ITEM_EO_CLASS_TYPE
5#define _ELM_MENU_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Menu_Item;
8
9#endif
10
11#ifndef _ELM_MENU_ITEM_EO_TYPES
12#define _ELM_MENU_ITEM_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Set the icon of a menu item to the standard icon with the given name.
19 *
20 * Once this icon is set, any previously set icon will be deleted. To hide icon
21 * set it to "".
22 *
23 * @param[in] obj The object.
24 * @param[in] icon The name of icon object.
25 *
26 * @ingroup Elm_Menu_Item_Group
27 */
28EAPI void elm_menu_item_icon_name_set(Elm_Menu_Item *obj, const char *icon);
29
30/**
31 * @brief Get the string representation from the icon of a menu item
32 *
33 * Once this icon is set, any previously set icon will be deleted. To hide icon
34 * set it to "".
35 *
36 * @param[in] obj The object.
37 *
38 * @return The name of icon object.
39 *
40 * @ingroup Elm_Menu_Item_Group
41 */
42EAPI const char *elm_menu_item_icon_name_get(const Elm_Menu_Item *obj);
43
44/**
45 * @brief Get the item before this one in the widget's list of items.
46 *
47 * See also @ref elm_menu_item_next_get.
48 *
49 * @param[in] obj The object.
50 *
51 * @return The item before the object in its parent's list. If there is no
52 * previous item or in case of error, @c null is returned.
53 *
54 * @ingroup Elm_Menu_Item_Group
55 */
56EAPI Elm_Widget_Item *elm_menu_item_prev_get(const Elm_Menu_Item *obj);
57
58/**
59 * @brief Get the item after this one in the widget's list of items.
60 *
61 * See also @ref elm_menu_item_prev_get.
62 *
63 * @param[in] obj The object.
64 *
65 * @return The item after the object in its parent's list. If there is no next
66 * item or in case of error, @c null is returned.
67 *
68 * @ingroup Elm_Menu_Item_Group
69 */
70EAPI Elm_Widget_Item *elm_menu_item_next_get(const Elm_Menu_Item *obj);
71
72/**
73 * @brief Indicates whether this item is currently selected.
74 *
75 * Set the selected state of @c item.
76 *
77 * This sets the selected state of the given item @c it. @c true for selected,
78 * @c false for not selected.
79 *
80 * If a new item is selected the previously selected will be unselected.
81 * Previously selected item can be retrieved with
82 * @ref elm_menu_selected_item_get.
83 *
84 * Selected items will be highlighted.
85 *
86 * @param[in] obj The object.
87 * @param[in] selected The selection state.
88 *
89 * @ingroup Elm_Menu_Item_Group
90 */
91EAPI void elm_menu_item_selected_set(Elm_Menu_Item *obj, Eina_Bool selected);
92
93/**
94 * @brief Indicates whether this item is currently selected.
95 *
96 * Get the selected state of this item.
97 *
98 * @param[in] obj The object.
99 *
100 * @return The selection state.
101 *
102 * @ingroup Elm_Menu_Item_Group
103 */
104EAPI Eina_Bool elm_menu_item_selected_get(const Elm_Menu_Item *obj);
105
106/**
107 * @brief Get the item index
108 *
109 * @param[in] obj The object.
110 *
111 * @return Item index
112 *
113 * @ingroup Elm_Menu_Item_Group
114 */
115EAPI unsigned int elm_menu_item_index_get(const Elm_Menu_Item *obj);
116
117/**
118 * @brief Remove all sub-items (children) of the given item
119 *
120 * This removes all items that are children (and their descendants) of the
121 * given item @c it.
122 *
123 * @param[in] obj The object.
124 *
125 * @since 1.8
126 *
127 * @ingroup Elm_Menu_Item_Group
128 */
129EAPI void elm_menu_item_subitems_clear(Elm_Menu_Item *obj);
130
131/**
132 * @brief Returns a list of @c item's subitems.
133 *
134 * @param[in] obj The object.
135 *
136 * @return A list of @c item's subitems
137 *
138 * @ingroup Elm_Menu_Item_Group
139 */
140EAPI const Eina_List *elm_menu_item_subitems_get(const Elm_Menu_Item *obj);
141
142/**
143 * @brief Returns whether @c item is a separator.
144 *
145 * @param[in] obj The object.
146 *
147 * @return @c true if the item is a separator.
148 *
149 * @ingroup Elm_Menu_Item_Group
150 */
151EAPI Eina_Bool elm_menu_item_is_separator(const Elm_Menu_Item *obj);
152
153/**
154 * @brief Get the real Evas(Edje) object created to implement the view of a
155 * given menu item.
156 *
157 * @warning Don't manipulate this object!
158 *
159 * @param[in] obj The object.
160 *
161 * @return The base Edje object containing the swallowed content associated
162 * with the item.
163 *
164 * @ingroup Elm_Menu_Item_Group
165 */
166EAPI Efl_Canvas_Object *elm_menu_item_object_get(const Elm_Menu_Item *obj);
167
168#endif
diff --git a/src/lib/elementary/elm_menu_legacy.h b/src/lib/elementary/elm_menu_legacy.h
index 9c86efc..6e6b8ef 100644
--- a/src/lib/elementary/elm_menu_legacy.h
+++ b/src/lib/elementary/elm_menu_legacy.h
@@ -30,5 +30,5 @@ EAPI void elm_menu_parent_set(Evas_Object *obj, Evas_Obj
30 */ 30 */
31EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj); 31EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj);
32 32
33#include "elm_menu_item.eo.legacy.h" 33#include "elm_menu_item_eo.legacy.h"
34#include "elm_menu.eo.legacy.h" 34#include "elm_menu_eo.legacy.h"
diff --git a/src/lib/elementary/elm_widget_menu.h b/src/lib/elementary/elm_widget_menu.h
index 7a1f3ea..dfcc538 100644
--- a/src/lib/elementary/elm_widget_menu.h
+++ b/src/lib/elementary/elm_widget_menu.h
@@ -3,8 +3,8 @@
3 3
4#include "Elementary.h" 4#include "Elementary.h"
5 5
6#include "elm_menu.eo.h" 6#include "elm_menu_eo.h"
7#include "elm_menu_item.eo.h" 7#include "elm_menu_item_eo.h"
8#include "elm_hover_eo.h" 8#include "elm_hover_eo.h"
9 9
10/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR 10/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index e2d72b7..0514bdc 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -1,6 +1,5 @@
1pub_legacy_eo_files = [ 1pub_legacy_eo_files = [
2 'efl_ui_clock_legacy.eo', 2 'efl_ui_clock_legacy.eo',
3 'elm_menu.eo',
4 'elm_notify.eo', 3 'elm_notify.eo',
5 'elm_panel.eo', 4 'elm_panel.eo',
6 'elm_player.eo', 5 'elm_player.eo',
@@ -12,7 +11,6 @@ pub_legacy_eo_files = [
12 'elm_sys_notify.eo', 11 'elm_sys_notify.eo',
13 'elm_sys_notify_dbus.eo', 12 'elm_sys_notify_dbus.eo',
14 'elm_systray.eo', 13 'elm_systray.eo',
15 'elm_menu_item.eo',
16 'elm_widget_item_static_focus.eo', 14 'elm_widget_item_static_focus.eo',
17 'elm_popup_item.eo', 15 'elm_popup_item.eo',
18 'elm_ctxpopup_part.eo', 16 'elm_ctxpopup_part.eo',
@@ -771,6 +769,10 @@ elementary_pub_headers = [
771 'elm_map_eo.legacy.h', 769 'elm_map_eo.legacy.h',
772 'elm_map_pan_eo.h', 770 'elm_map_pan_eo.h',
773 'elm_map_pan_eo.legacy.h', 771 'elm_map_pan_eo.legacy.h',
772 'elm_menu_eo.h',
773 'elm_menu_eo.legacy.h',
774 'elm_menu_item_eo.h',
775 'elm_menu_item_eo.legacy.h',
774] 776]
775 777
776elementary_header_src = [ 778elementary_header_src = [