summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_toolbar_eo.legacy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_toolbar_eo.legacy.h')
-rw-r--r--src/lib/elementary/elm_toolbar_eo.legacy.h525
1 files changed, 525 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_toolbar_eo.legacy.h b/src/lib/elementary/elm_toolbar_eo.legacy.h
new file mode 100644
index 0000000..d16a3b2
--- /dev/null
+++ b/src/lib/elementary/elm_toolbar_eo.legacy.h
@@ -0,0 +1,525 @@
1#ifndef _ELM_TOOLBAR_EO_LEGACY_H_
2#define _ELM_TOOLBAR_EO_LEGACY_H_
3
4#ifndef _ELM_TOOLBAR_EO_CLASS_TYPE
5#define _ELM_TOOLBAR_EO_CLASS_TYPE
6
7typedef Eo Elm_Toolbar;
8
9#endif
10
11#ifndef _ELM_TOOLBAR_EO_TYPES
12#define _ELM_TOOLBAR_EO_TYPES
13
14/**
15 * @brief Set toolbar's items display behavior, it can be scrollable, show a
16 * menu with exceeding items, or simply hide them.
17 *
18 * Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value from elm config.
19 *
20 * Values don't work as bitmask, only one can be chosen.
21 *
22 * See also @ref elm_toolbar_shrink_mode_set, @ref elm_toolbar_shrink_mode_get.
23 *
24 * @ingroup Elm
25 */
26typedef enum
27{
28 ELM_TOOLBAR_SHRINK_NONE = 0, /**< Set toolbar minimum size to fit all the
29 * items. */
30 ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */
31 ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a
32 * scroller. */
33 ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding
34 * items. */
35 ELM_TOOLBAR_SHRINK_EXPAND, /**< Expand all items according the size of the
36 * toolbar. */
37 ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by
38 * elm_toolbar_shrink_mode_get() */
39} Elm_Toolbar_Shrink_Mode;
40
41
42#endif
43
44/**
45 * @brief Get the selected item in the widget.
46 *
47 * @param[in] obj The object.
48 *
49 * @return The selected item or @c null.
50 *
51 * @ingroup Elm_Toolbar_Group
52 */
53EAPI Elm_Widget_Item *elm_toolbar_selected_item_get(const Elm_Toolbar *obj);
54
55/**
56 * @brief Get the first item in the widget.
57 *
58 * @param[in] obj The object.
59 *
60 * @return The first item or @c null.
61 *
62 * @ingroup Elm_Toolbar_Group
63 */
64EAPI Elm_Widget_Item *elm_toolbar_first_item_get(const Elm_Toolbar *obj);
65
66/**
67 * @brief Get the last item in the widget.
68 *
69 * @param[in] obj The object.
70 *
71 * @return The last item or @c null.
72 *
73 * @ingroup Elm_Toolbar_Group
74 */
75EAPI Elm_Widget_Item *elm_toolbar_last_item_get(const Elm_Toolbar *obj);
76
77/**
78 * @brief Returns a list of the widget item.
79 *
80 * @param[in] obj The object.
81 *
82 * @return iterator to widget items
83 *
84 * @ingroup Elm_Toolbar_Group
85 */
86EAPI Eina_Iterator *elm_toolbar_items_get(const Elm_Toolbar *obj) EINA_WARN_UNUSED_RESULT;
87
88/**
89 * @brief Control homogeneous mode.
90 *
91 * This will enable the homogeneous mode where items are of the same size.
92 *
93 * @param[in] obj The object.
94 * @param[in] homogeneous Assume the items within the toolbar are of the same
95 * size (true = on, false = off). Default is @c false.
96 *
97 * @ingroup Elm_Toolbar_Group
98 */
99EAPI void elm_toolbar_homogeneous_set(Elm_Toolbar *obj, Eina_Bool homogeneous);
100
101/**
102 * @brief Control homogeneous mode.
103 *
104 * This will enable the homogeneous mode where items are of the same size.
105 *
106 * @param[in] obj The object.
107 *
108 * @return Assume the items within the toolbar are of the same size (true = on,
109 * false = off). Default is @c false.
110 *
111 * @ingroup Elm_Toolbar_Group
112 */
113EAPI Eina_Bool elm_toolbar_homogeneous_get(const Elm_Toolbar *obj);
114
115/**
116 * @brief Control the alignment of the items.
117 *
118 * Alignment of toolbar items, from 0.0 to indicates to align left, to 1.0, to
119 * align to right. 0.5 centralize items.
120 *
121 * Centered items by default.
122 *
123 * @param[in] obj The object.
124 * @param[in] align The new alignment, a float between 0.0 and 1.0.
125 *
126 * @ingroup Elm_Toolbar_Group
127 */
128EAPI void elm_toolbar_align_set(Elm_Toolbar *obj, double align);
129
130/**
131 * @brief Control the alignment of the items.
132 *
133 * Alignment of toolbar items, from 0.0 to indicates to align left, to 1.0, to
134 * align to right. 0.5 centralize items.
135 *
136 * Centered items by default.
137 *
138 * @param[in] obj The object.
139 *
140 * @return The new alignment, a float between 0.0 and 1.0.
141 *
142 * @ingroup Elm_Toolbar_Group
143 */
144EAPI double elm_toolbar_align_get(const Elm_Toolbar *obj);
145
146/**
147 * @brief Control the toolbar select mode.
148 *
149 * elm_toolbar_select_mode_set() changes item select mode in the toolbar
150 * widget. - #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their
151 * selection func and callback when first becoming selected. Any further clicks
152 * will do nothing, unless you set always select mode. -
153 * #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every
154 * click will make the selected callbacks be called. -
155 * #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select
156 * items entirely and they will neither appear selected nor call selected
157 * callback functions.
158 *
159 * @param[in] obj The object.
160 * @param[in] mode The select mode If getting mode fails, it returns
161 * #ELM_OBJECT_SELECT_MODE_MAX
162 *
163 * @ingroup Elm_Toolbar_Group
164 */
165EAPI void elm_toolbar_select_mode_set(Elm_Toolbar *obj, Elm_Object_Select_Mode mode);
166
167/**
168 * @brief Control the toolbar select mode.
169 *
170 * elm_toolbar_select_mode_set() changes item select mode in the toolbar
171 * widget. - #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their
172 * selection func and callback when first becoming selected. Any further clicks
173 * will do nothing, unless you set always select mode. -
174 * #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every
175 * click will make the selected callbacks be called. -
176 * #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select
177 * items entirely and they will neither appear selected nor call selected
178 * callback functions.
179 *
180 * @param[in] obj The object.
181 *
182 * @return The select mode If getting mode fails, it returns
183 * #ELM_OBJECT_SELECT_MODE_MAX
184 *
185 * @ingroup Elm_Toolbar_Group
186 */
187EAPI Elm_Object_Select_Mode elm_toolbar_select_mode_get(const Elm_Toolbar *obj);
188
189/**
190 * @brief Control the icon size, in pixels, to be used by toolbar items.
191 *
192 * @note Default value is $32. It reads value from elm config.
193 *
194 * @param[in] obj The object.
195 * @param[in] icon_size The icon size in pixels
196 *
197 * @ingroup Elm_Toolbar_Group
198 */
199EAPI void elm_toolbar_icon_size_set(Elm_Toolbar *obj, int icon_size);
200
201/**
202 * @brief Control the icon size, in pixels, to be used by toolbar items.
203 *
204 * @note Default value is $32. It reads value from elm config.
205 *
206 * @param[in] obj The object.
207 *
208 * @return The icon size in pixels
209 *
210 * @ingroup Elm_Toolbar_Group
211 */
212EAPI int elm_toolbar_icon_size_get(const Elm_Toolbar *obj);
213
214/**
215 * @brief Control the item displaying mode of a given toolbar widget @c obj.
216 *
217 * The toolbar won't scroll under #ELM_TOOLBAR_SHRINK_NONE mode, but it will
218 * enforce a minimum size, so that all the items will fit inside it. It won't
219 * scroll and won't show the items that don't fit under
220 * #ELM_TOOLBAR_SHRINK_HIDE mode. Finally, it'll scroll under
221 * #ELM_TOOLBAR_SHRINK_SCROLL mode, and it will create a button to aggregate
222 * items which didn't fit with the #ELM_TOOLBAR_SHRINK_MENU mode.
223 *
224 * If shrink mode is changed, Toolbar will send one of the following signal to
225 * each item for informing the current shrink mode. "elm,state,shrink,default"
226 * "elm,state,shrink,hide" "elm,state,shrink,scroll" "elm,state,shrink,menu"
227 * "elm,state,shrink,expand"
228 *
229 * @warning This function's behavior will clash with those of
230 * elm_scroller_policy_set(), so use either one of them, but not both.
231 *
232 * @param[in] obj The object.
233 * @param[in] shrink_mode Toolbar's items display behavior
234 *
235 * @ingroup Elm_Toolbar_Group
236 */
237EAPI void elm_toolbar_shrink_mode_set(Elm_Toolbar *obj, Elm_Toolbar_Shrink_Mode shrink_mode);
238
239/**
240 * @brief Control the item displaying mode of a given toolbar widget @c obj.
241 *
242 * The toolbar won't scroll under #ELM_TOOLBAR_SHRINK_NONE mode, but it will
243 * enforce a minimum size, so that all the items will fit inside it. It won't
244 * scroll and won't show the items that don't fit under
245 * #ELM_TOOLBAR_SHRINK_HIDE mode. Finally, it'll scroll under
246 * #ELM_TOOLBAR_SHRINK_SCROLL mode, and it will create a button to aggregate
247 * items which didn't fit with the #ELM_TOOLBAR_SHRINK_MENU mode.
248 *
249 * If shrink mode is changed, Toolbar will send one of the following signal to
250 * each item for informing the current shrink mode. "elm,state,shrink,default"
251 * "elm,state,shrink,hide" "elm,state,shrink,scroll" "elm,state,shrink,menu"
252 * "elm,state,shrink,expand"
253 *
254 * @warning This function's behavior will clash with those of
255 * elm_scroller_policy_set(), so use either one of them, but not both.
256 *
257 * @param[in] obj The object.
258 *
259 * @return Toolbar's items display behavior
260 *
261 * @ingroup Elm_Toolbar_Group
262 */
263EAPI Elm_Toolbar_Shrink_Mode elm_toolbar_shrink_mode_get(const Elm_Toolbar *obj);
264
265/**
266 * @brief Control the parent object of the toolbar items' menus.
267 *
268 * Each item can be set as item menu, with elm_toolbar_item_menu_set().
269 *
270 * For more details about setting the parent for toolbar menus, see
271 * elm_menu_parent_set().
272 *
273 * See: elm_menu_parent_set() for details. See: elm_toolbar_item_menu_set() for
274 * details.
275 *
276 * @param[in] obj The object.
277 * @param[in] parent The parent of the menu objects.
278 *
279 * @ingroup Elm_Toolbar_Group
280 */
281EAPI void elm_toolbar_menu_parent_set(Elm_Toolbar *obj, Efl_Canvas_Object *parent);
282
283/**
284 * @brief Control the parent object of the toolbar items' menus.
285 *
286 * Each item can be set as item menu, with elm_toolbar_item_menu_set().
287 *
288 * For more details about setting the parent for toolbar menus, see
289 * elm_menu_parent_set().
290 *
291 * See: elm_menu_parent_set() for details. See: elm_toolbar_item_menu_set() for
292 * details.
293 *
294 * @param[in] obj The object.
295 *
296 * @return The parent of the menu objects.
297 *
298 * @ingroup Elm_Toolbar_Group
299 */
300EAPI Efl_Canvas_Object *elm_toolbar_menu_parent_get(const Elm_Toolbar *obj);
301
302/**
303 * @brief Set the standard priority of visible items in a toolbar
304 *
305 * If the priority of the item is up to standard priority, it is shown in basic
306 * panel. The other items are located in more menu or panel. The more menu or
307 * panel can be shown when the more item is clicked.
308 *
309 * @param[in] obj The object.
310 * @param[in] priority The standard_priority of visible items
311 *
312 * @since 1.7
313 *
314 * @ingroup Elm_Toolbar_Group
315 */
316EAPI void elm_toolbar_standard_priority_set(Elm_Toolbar *obj, int priority);
317
318/**
319 * @brief Set the standard priority of visible items in a toolbar
320 *
321 * If the priority of the item is up to standard priority, it is shown in basic
322 * panel. The other items are located in more menu or panel. The more menu or
323 * panel can be shown when the more item is clicked.
324 *
325 * @param[in] obj The object.
326 *
327 * @return The standard_priority of visible items
328 *
329 * @since 1.7
330 *
331 * @ingroup Elm_Toolbar_Group
332 */
333EAPI int elm_toolbar_standard_priority_get(const Elm_Toolbar *obj);
334
335/**
336 * @brief Get the more item which is auto-generated by toolbar.
337 *
338 * Toolbar generates 'more' item when there is no more space to fit items in
339 * and toolbar is in #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_EXPAND
340 * mode. The more item can be manipulated by elm_object_item_text_set() and
341 * elm_object_item_content_set.
342 *
343 * @param[in] obj The object.
344 *
345 * @return The toolbar more item.
346 *
347 * @ingroup Elm_Toolbar_Group
348 */
349EAPI Elm_Widget_Item *elm_toolbar_more_item_get(const Elm_Toolbar *obj);
350
351/**
352 * @brief Insert a new item into the toolbar object before item @c before.
353 *
354 * A new item will be created and added to the toolbar. Its position in this
355 * toolbar will be just before item @c before.
356 *
357 * Items created with this method can be deleted with elm_object_item_del().
358 *
359 * Associated @c data can be properly freed when item is deleted if a callback
360 * function is set with elm_object_item_del_cb_set().
361 *
362 * If a function is passed as argument, it will be called every time this item
363 * is selected, i.e., the user clicks over an unselected item. If such function
364 * isn't needed, just passing @c NULL as @c func is enough. The same should be
365 * done for @c data.
366 *
367 * Toolbar will load icon image from fdo or current theme. This behavior can be
368 * set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is
369 * provided it will load it direct from a file.
370 *
371 * @note This function does not accept relative icon path.
372 *
373 * See: elm_toolbar_item_icon_set()
374 *
375 * @param[in] obj The object.
376 * @param[in] before The toolbar item to insert before.
377 * @param[in] icon A string with icon name or the absolute path of an image
378 * file.
379 * @param[in] label The label of the item.
380 * @param[in] func The function to call when the item is clicked.
381 * @param[in] data The data to associate with the item for related callbacks.
382 *
383 * @return The created item or @c NULL upon failure.
384 *
385 * @ingroup Elm_Toolbar_Group
386 */
387EAPI Elm_Widget_Item *elm_toolbar_item_insert_before(Elm_Toolbar *obj, Elm_Widget_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
388
389/**
390 * @brief Insert a new item into the toolbar object after item @c after.
391 *
392 * A new item will be created and added to the toolbar. Its position in this
393 * toolbar will be just after item @c after.
394 *
395 * Items created with this method can be deleted with elm_object_item_del().
396 *
397 * Associated @c data can be properly freed when item is deleted if a callback
398 * function is set with elm_object_item_del_cb_set().
399 *
400 * If a function is passed as argument, it will be called every time this item
401 * is selected, i.e., the user clicks over an unselected item. If such function
402 * isn't needed, just passing @c NULL as @c func is enough. The same should be
403 * done for @c data.
404 *
405 * Toolbar will load icon image from fdo or current theme. This behavior can be
406 * set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is
407 * provided it will load it direct from a file.
408 *
409 * @note This function does not accept relative icon path.
410 *
411 * See: elm_toolbar_item_icon_set()
412 *
413 * @param[in] obj The object.
414 * @param[in] after The toolbar item to insert after.
415 * @param[in] icon A string with icon name or the absolute path of an image
416 * file.
417 * @param[in] label The label of the item.
418 * @param[in] func The function to call when the item is clicked.
419 * @param[in] data The data to associate with the item for related callbacks.
420 *
421 * @return The created item or @c NULL upon failure.
422 *
423 * @ingroup Elm_Toolbar_Group
424 */
425EAPI Elm_Widget_Item *elm_toolbar_item_insert_after(Elm_Toolbar *obj, Elm_Widget_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
426
427/**
428 * @brief Append item to the toolbar.
429 *
430 * A new item will be created and appended to the toolbar, i.e., will be set as
431 * last item.
432 *
433 * Items created with this method can be deleted with elm_object_item_del().
434 *
435 * Associated @c data can be properly freed when item is deleted if a callback
436 * function is set with elm_object_item_del_cb_set().
437 *
438 * If a function is passed as argument, it will be called every time this item
439 * is selected, i.e., the user clicks over an unselected item. If such function
440 * isn't needed, just passing @c NULL as @c func is enough. The same should be
441 * done for @c data.
442 *
443 * Toolbar will load icon image from fdo or current theme. This behavior can be
444 * set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is
445 * provided it will load it direct from a file.
446 *
447 * @note This function does not accept relative icon path.
448 *
449 * See: elm_toolbar_item_icon_set()
450 *
451 * @param[in] obj The object.
452 * @param[in] icon A string with icon name or the absolute path of an image
453 * file.
454 * @param[in] label The label of the item.
455 * @param[in] func The function to call when the item is clicked.
456 * @param[in] data The data to associate with the item for related callbacks.
457 *
458 * @return The created item or @c NULL upon failure.
459 *
460 * @ingroup Elm_Toolbar_Group
461 */
462EAPI Elm_Widget_Item *elm_toolbar_item_append(Elm_Toolbar *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
463
464/**
465 * @brief Get the number of items in a toolbar
466 *
467 * @param[in] obj The object.
468 *
469 * @return The number of items in @c obj toolbar
470 *
471 * @ingroup Elm_Toolbar_Group
472 */
473EAPI unsigned int elm_toolbar_items_count(const Elm_Toolbar *obj);
474
475/**
476 * @brief Prepend item to the toolbar.
477 *
478 * A new item will be created and prepended to the toolbar, i.e., will be set
479 * as first item.
480 *
481 * Items created with this method can be deleted with elm_object_item_del().
482 *
483 * Associated @c data can be properly freed when item is deleted if a callback
484 * function is set with elm_object_item_del_cb_set().
485 *
486 * If a function is passed as argument, it will be called every time this item
487 * is selected, i.e., the user clicks over an unselected item. If such function
488 * isn't needed, just passing @c NULL as @c func is enough. The same should be
489 * done for @c data.
490 *
491 * Toolbar will load icon image from fdo or current theme. This behavior can be
492 * set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is
493 * provided it will load it direct from a file.
494 *
495 * @note This function does not accept relative icon path.
496 *
497 * See: elm_toolbar_item_icon_set()
498 *
499 * @param[in] obj The object.
500 * @param[in] icon A string with icon name or the absolute path of an image
501 * file.
502 * @param[in] label The label of the item.
503 * @param[in] func The function to call when the item is clicked.
504 * @param[in] data The data to associate with the item for related callbacks.
505 *
506 * @return The created item or @c NULL upon failure.
507 *
508 * @ingroup Elm_Toolbar_Group
509 */
510EAPI Elm_Widget_Item *elm_toolbar_item_prepend(Elm_Toolbar *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
511
512/**
513 * @brief Returns a pointer to a toolbar item by its label.
514 *
515 * @param[in] obj The object.
516 * @param[in] label The label of the item to find.
517 *
518 * @return The pointer to the toolbar item matching @c label or @c NULL on
519 * failure.
520 *
521 * @ingroup Elm_Toolbar_Group
522 */
523EAPI Elm_Widget_Item *elm_toolbar_item_find_by_label(const Elm_Toolbar *obj, const char *label);
524
525#endif