summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_menu_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_menu_eo.h')
-rw-r--r--src/lib/elementary/elm_menu_eo.h158
1 files changed, 158 insertions, 0 deletions
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