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 
7 typedef 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 
22 EWAPI const Efl_Class *elm_menu_class_get(void) EINA_CONST;
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  */
33 EOAPI 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  */
44 EOAPI 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  */
55 EOAPI 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  */
66 EOAPI 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  */
81 EOAPI 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  */
100 EOAPI 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  */
110 EOAPI 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  */
120 EOAPI 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  */
132 EOAPI Elm_Widget_Item *elm_obj_menu_item_separator_add(Eo *obj, Elm_Widget_Item *parent);
133 
134 EWAPI 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 
142 EWAPI 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 
150 EWAPI 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
159