summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_hoversel_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_hoversel_eo.h')
-rw-r--r--src/lib/elementary/elm_hoversel_eo.h206
1 files changed, 206 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_hoversel_eo.h b/src/lib/elementary/elm_hoversel_eo.h
new file mode 100644
index 0000000..cdbf7fc
--- /dev/null
+++ b/src/lib/elementary/elm_hoversel_eo.h
@@ -0,0 +1,206 @@
1#ifndef _ELM_HOVERSEL_EO_H_
2#define _ELM_HOVERSEL_EO_H_
3
4#ifndef _ELM_HOVERSEL_EO_CLASS_TYPE
5#define _ELM_HOVERSEL_EO_CLASS_TYPE
6
7typedef Eo Elm_Hoversel;
8
9#endif
10
11#ifndef _ELM_HOVERSEL_EO_TYPES
12#define _ELM_HOVERSEL_EO_TYPES
13
14
15#endif
16/** Elementary hoversel class
17 *
18 * @ingroup Elm_Hoversel
19 */
20#define ELM_HOVERSEL_CLASS elm_hoversel_class_get()
21
22EWAPI const Efl_Class *elm_hoversel_class_get(void);
23
24/**
25 * @brief Control if the hoversel should expand horizontally.
26 *
27 * @note The initial button will display horizontally regradless of this
28 * setting.
29 *
30 * @param[in] obj The object.
31 * @param[in] horizontal If @c true, the hover will expand horizontally to the
32 * right.
33 *
34 * @ingroup Elm_Hoversel
35 */
36EOAPI void elm_obj_hoversel_horizontal_set(Eo *obj, Eina_Bool horizontal);
37
38/**
39 * @brief Control if the hoversel should expand horizontally.
40 *
41 * @note The initial button will display horizontally regradless of this
42 * setting.
43 *
44 * @param[in] obj The object.
45 *
46 * @return If @c true, the hover will expand horizontally to the right.
47 *
48 * @ingroup Elm_Hoversel
49 */
50EOAPI Eina_Bool elm_obj_hoversel_horizontal_get(const Eo *obj);
51
52/**
53 * @brief Control the hover parent.
54 *
55 * Sets the hover parent object, the area that will be darkened when the
56 * hoversel is clicked. Should probably be the window that the hoversel is in.
57 *
58 * @param[in] obj The object.
59 * @param[in] parent The parent to use
60 *
61 * @ingroup Elm_Hoversel
62 */
63EOAPI void elm_obj_hoversel_hover_parent_set(Eo *obj, Efl_Canvas_Object *parent);
64
65/**
66 * @brief Control the hover parent.
67 *
68 * Sets the hover parent object, the area that will be darkened when the
69 * hoversel is clicked. Should probably be the window that the hoversel is in.
70 *
71 * @param[in] obj The object.
72 *
73 * @return The parent to use
74 *
75 * @ingroup Elm_Hoversel
76 */
77EOAPI Efl_Canvas_Object *elm_obj_hoversel_hover_parent_get(const Eo *obj);
78
79/**
80 * @brief Returns whether the hoversel is expanded.
81 *
82 * @param[in] obj The object.
83 *
84 * @return @c true if the hoversel is expanded or @c false otherwise
85 *
86 * @ingroup Elm_Hoversel
87 */
88EOAPI Eina_Bool elm_obj_hoversel_expanded_get(const Eo *obj);
89
90/**
91 * @brief Get the list of items within the given hoversel.
92 *
93 * @param[in] obj The object.
94 *
95 * @return List of items
96 *
97 * @ingroup Elm_Hoversel
98 */
99EOAPI const Eina_List *elm_obj_hoversel_items_get(const Eo *obj);
100
101/**
102 * @brief Update icon and text of hoversel same to those of selected item
103 * automatically.
104 *
105 * @param[in] obj The object.
106 * @param[in] auto_update @c true if hoversel is updated automatically or
107 * @c false otherwise
108 *
109 * @ingroup Elm_Hoversel
110 */
111EOAPI void elm_obj_hoversel_auto_update_set(Eo *obj, Eina_Bool auto_update);
112
113/**
114 * @brief Update icon and text of hoversel same to those of selected item
115 * automatically.
116 *
117 * @param[in] obj The object.
118 *
119 * @return @c true if hoversel is updated automatically or @c false otherwise
120 *
121 * @ingroup Elm_Hoversel
122 */
123EOAPI Eina_Bool elm_obj_hoversel_auto_update_get(const Eo *obj);
124
125/** This triggers the hoversel popup from code, the same as if the user had
126 * clicked the button.
127 *
128 * @ingroup Elm_Hoversel
129 */
130EOAPI void elm_obj_hoversel_hover_begin(Eo *obj);
131
132/**
133 * @brief This will remove all the children items from the hoversel.
134 *
135 * Warning Should *not* be called while the hoversel is active; use
136 * @ref elm_obj_hoversel_expanded_get to check first.
137 * @param[in] obj The object.
138 *
139 * @ingroup Elm_Hoversel
140 */
141EOAPI void elm_obj_hoversel_clear(Eo *obj);
142
143/** This dismisses the hoversel popup as if the user had clicked outside the
144 * hover.
145 *
146 * @ingroup Elm_Hoversel
147 */
148EOAPI void elm_obj_hoversel_hover_end(Eo *obj);
149
150/**
151 * @brief Add an item to the hoversel button
152 *
153 * This adds an item to the hoversel to show when it is clicked. Note: if you
154 * need to use an icon from an edje file then use Elm.Hoversel.Item.icon.set
155 * right after this function, and set icon_file to @c null here.
156 *
157 * @param[in] obj The object.
158 * @param[in] label The text label to use for the item (NULL if not desired)
159 * @param[in] icon_file An image file path on disk to use for the icon or
160 * standard icon name (NULL if not desired)
161 * @param[in] icon_type The icon type if relevant
162 * @param[in] func Convenience function to call when this item is selected. The
163 * last parameter @c event_info of @c func is the selected item pointer.
164 * @param[in] data Data to pass to item-related functions
165 *
166 * @return A handle to the added item.
167 *
168 * @ingroup Elm_Hoversel
169 */
170EOAPI Elm_Widget_Item *elm_obj_hoversel_item_add(Eo *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data);
171
172EWAPI extern const Efl_Event_Description _ELM_HOVERSEL_EVENT_DISMISSED;
173
174/** Called when hoversel is dismissed
175 *
176 * @ingroup Elm_Hoversel
177 */
178#define ELM_HOVERSEL_EVENT_DISMISSED (&(_ELM_HOVERSEL_EVENT_DISMISSED))
179
180EWAPI extern const Efl_Event_Description _ELM_HOVERSEL_EVENT_EXPANDED;
181
182/** Called when hoversel is expanded
183 *
184 * @ingroup Elm_Hoversel
185 */
186#define ELM_HOVERSEL_EVENT_EXPANDED (&(_ELM_HOVERSEL_EVENT_EXPANDED))
187
188EWAPI extern const Efl_Event_Description _ELM_HOVERSEL_EVENT_ITEM_FOCUSED;
189
190/** Called when hoversel item got focus
191 * @return Efl_Object *
192 *
193 * @ingroup Elm_Hoversel
194 */
195#define ELM_HOVERSEL_EVENT_ITEM_FOCUSED (&(_ELM_HOVERSEL_EVENT_ITEM_FOCUSED))
196
197EWAPI extern const Efl_Event_Description _ELM_HOVERSEL_EVENT_ITEM_UNFOCUSED;
198
199/** Called when hoversel item lost focus
200 * @return Efl_Object *
201 *
202 * @ingroup Elm_Hoversel
203 */
204#define ELM_HOVERSEL_EVENT_ITEM_UNFOCUSED (&(_ELM_HOVERSEL_EVENT_ITEM_UNFOCUSED))
205
206#endif