summaryrefslogtreecommitdiff
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:16:35 -0800
commit70008ed9d92b0e9fadf846356015ec739b2f1c8e (patch)
treeb9f0d0e7f06fcb9aa9e62ae3aa832472f2674614
parenta0aefabfd3765e2e51350581add0fe4bf9179a20 (diff)
elm_toolbar*: 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/D8206
-rw-r--r--src/Makefile_Elementary.am10
-rw-r--r--src/lib/elementary/elm_toolbar.c4
-rw-r--r--src/lib/elementary/elm_toolbar.eo379
-rw-r--r--src/lib/elementary/elm_toolbar.h1
-rw-r--r--src/lib/elementary/elm_toolbar_eo.c377
-rw-r--r--src/lib/elementary/elm_toolbar_eo.h546
-rw-r--r--src/lib/elementary/elm_toolbar_eo.legacy.c150
-rw-r--r--src/lib/elementary/elm_toolbar_eo.legacy.h525
-rw-r--r--src/lib/elementary/elm_toolbar_item.eo329
-rw-r--r--src/lib/elementary/elm_toolbar_item_eo.c328
-rw-r--r--src/lib/elementary/elm_toolbar_item_eo.h410
-rw-r--r--src/lib/elementary/elm_toolbar_item_eo.legacy.c144
-rw-r--r--src/lib/elementary/elm_toolbar_item_eo.legacy.h401
-rw-r--r--src/lib/elementary/elm_toolbar_legacy.h4
-rw-r--r--src/lib/elementary/meson.build6
15 files changed, 2894 insertions, 720 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 3f632df..f8b2319 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -146,8 +146,6 @@ elm_public_eolian_files += \
146 lib/elementary/elm_atspi_bridge.eo \ 146 lib/elementary/elm_atspi_bridge.eo \
147 lib/elementary/elm_atspi_app_object.eo \ 147 lib/elementary/elm_atspi_app_object.eo \
148 lib/elementary/efl_ui_image_zoomable_pan.eo \ 148 lib/elementary/efl_ui_image_zoomable_pan.eo \
149 lib/elementary/elm_toolbar.eo \
150 lib/elementary/elm_toolbar_item.eo \
151 lib/elementary/elm_view_list.eo \ 149 lib/elementary/elm_view_list.eo \
152 lib/elementary/elm_view_form.eo \ 150 lib/elementary/elm_view_form.eo \
153 lib/elementary/elm_web.eo \ 151 lib/elementary/elm_web.eo \
@@ -392,6 +390,10 @@ lib/elementary/elm_systray_eo.legacy.c \
392lib/elementary/elm_table_eo.c \ 390lib/elementary/elm_table_eo.c \
393lib/elementary/elm_table_eo.legacy.c \ 391lib/elementary/elm_table_eo.legacy.c \
394lib/elementary/elm_thumb_eo.c \ 392lib/elementary/elm_thumb_eo.c \
393lib/elementary/elm_toolbar_eo.c \
394lib/elementary/elm_toolbar_eo.legacy.c \
395lib/elementary/elm_toolbar_item_eo.c \
396lib/elementary/elm_toolbar_item_eo.legacy.c \
395$(NULL) 397$(NULL)
396 398
397elm_legacy_eo_headers = \ 399elm_legacy_eo_headers = \
@@ -595,6 +597,10 @@ lib/elementary/elm_table_eo.h \
595lib/elementary/elm_table_eo.legacy.h \ 597lib/elementary/elm_table_eo.legacy.h \
596lib/elementary/elm_thumb_eo.h \ 598lib/elementary/elm_thumb_eo.h \
597lib/elementary/elm_thumb_eo.legacy.h \ 599lib/elementary/elm_thumb_eo.legacy.h \
600lib/elementary/elm_toolbar_eo.h \
601lib/elementary/elm_toolbar_eo.legacy.h \
602lib/elementary/elm_toolbar_item_eo.h \
603lib/elementary/elm_toolbar_item_eo.legacy.h \
598$(NULL) 604$(NULL)
599 605
600 606
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index d2a447f..fd1ab52 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -4087,5 +4087,5 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_toolbar, Elm_Toolbar_Data)
4087#define ELM_TOOLBAR_EXTRA_OPS \ 4087#define ELM_TOOLBAR_EXTRA_OPS \
4088 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_toolbar) 4088 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_toolbar)
4089 4089
4090#include "elm_toolbar.eo.c" 4090#include "elm_toolbar_eo.c"
4091#include "elm_toolbar_item.eo.c" 4091#include "elm_toolbar_item_eo.c"
diff --git a/src/lib/elementary/elm_toolbar.eo b/src/lib/elementary/elm_toolbar.eo
deleted file mode 100644
index 43f98de..0000000
--- a/src/lib/elementary/elm_toolbar.eo
+++ /dev/null
@@ -1,379 +0,0 @@
1import elm_general;
2
3enum Elm.Toolbar_Shrink_Mode
4{
5 [[Set toolbar's items display behavior, it can be scrollable,
6 show a menu with exceeding items, or simply hide them.
7
8 Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value
9 from elm config.
10
11 Values don't work as bitmask, only one can be chosen.
12
13 See also @Elm.Toolbar.shrink_mode.set, @Elm.Toolbar.shrink_mode.get.
14 ]]
15
16 legacy: elm_toolbar_shrink;
17
18 none, [[Set toolbar minimum size to fit all the items.]]
19 hide, [[Hide exceeding items.]]
20 scroll, [[Allow accessing exceeding items through a scroller.]]
21 menu, [[Inserts a button to pop up a menu with exceeding items.]]
22 expand, [[Expand all items according the size of the toolbar.]]
23 last [[Indicates error if returned by elm_toolbar_shrink_mode_get()]]
24}
25
26class Elm.Toolbar extends Efl.Ui.Widget implements Efl.Ui.Focus.Composition, Elm.Interface_Scrollable, Efl.Ui.Direction,
27 Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Access.Object,
28 Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy, Elm.Widget_Item_Container
29{
30 [[Elementary toolbar class]]
31 legacy_prefix: elm_toolbar;
32 eo_prefix: elm_obj_toolbar;
33 event_prefix: elm_toolbar;
34 methods {
35 @property selected_item {
36 get {
37 [[Get the selected item in the widget.]]
38 }
39 values {
40 item: Elm.Widget.Item; [[The selected item or $null.]]
41 }
42 }
43 @property first_item {
44 get {
45 [[Get the first item in the widget.]]
46 }
47 values {
48 item: Elm.Widget.Item; [[The first item or $null.]]
49 }
50 }
51 @property last_item {
52 get {
53 [[Get the last item in the widget.]]
54 }
55 values {
56 item: Elm.Widget.Item; [[The last item or $null.]]
57 }
58 }
59 @property items {
60 get {
61 [[Returns a list of the widget item.]]
62 return: iterator<Elm.Widget.Item> @owned @warn_unused; [[iterator to widget items]]
63 }
64 }
65 @property homogeneous {
66 [[Control homogeneous mode.
67
68 This will enable the homogeneous mode where items are of the same size.]]
69 set {
70 }
71 get {
72 }
73 values {
74 homogeneous: bool; [[Assume the items within the toolbar are of the same size (true = on, false = off). Default is $false.]]
75 }
76 }
77 @property align {
78 [[Control the alignment of the items.
79
80 Alignment of toolbar items, from 0.0 to indicates to align
81 left, to 1.0, to align to right. 0.5 centralize
82 items.
83
84 Centered items by default.]]
85 set {
86 }
87 get {
88 }
89 values {
90 align: double; [[The new alignment, a float between 0.0 and 1.0.]]
91 }
92 }
93 @property select_mode {
94 [[Control the toolbar select mode.
95
96 elm_toolbar_select_mode_set() changes item select mode in the toolbar widget.
97 - #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
98 callback when first becoming selected. Any further clicks will
99 do nothing, unless you set always select mode.
100 - #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
101 every click will make the selected callbacks be called.
102 - #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
103 entirely and they will neither appear selected nor call selected
104 callback functions.]]
105 set {
106 }
107 get {
108 }
109 values {
110 mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The select mode If getting mode fails, it returns #ELM_OBJECT_SELECT_MODE_MAX]]
111 }
112 }
113 @property icon_size {
114 [[Control the icon size, in pixels, to be used by toolbar items.
115
116 Note: Default value is $32. It reads value from elm config.]]
117 set {
118 }
119 get {
120 }
121 values {
122 icon_size: int; [[The icon size in pixels]]
123 }
124 }
125 @property shrink_mode {
126 [[Control the item displaying mode of a given toolbar widget $obj.
127
128 The toolbar won't scroll under #ELM_TOOLBAR_SHRINK_NONE mode, but
129 it will enforce a minimum size, so that all the items will fit
130 inside it. It won't scroll and won't show the items that don't fit
131 under #ELM_TOOLBAR_SHRINK_HIDE mode. Finally, it'll scroll under
132 #ELM_TOOLBAR_SHRINK_SCROLL mode, and it will create a button to
133 aggregate items which didn't fit with the #ELM_TOOLBAR_SHRINK_MENU
134 mode.
135
136 If shrink mode is changed, Toolbar will send one of the following
137 signal to each item for informing the current shrink mode.
138 "elm,state,shrink,default"
139 "elm,state,shrink,hide"
140 "elm,state,shrink,scroll"
141 "elm,state,shrink,menu"
142 "elm,state,shrink,expand"
143
144 Warning: This function's behavior will clash with those of
145 elm_scroller_policy_set(), so use either one of them, but not both.]]
146 set {
147 }
148 get {
149 }
150 values {
151 shrink_mode: Elm.Toolbar_Shrink_Mode; [[Toolbar's items display behavior]]
152 }
153 }
154 @property menu_parent {
155 [[Control the parent object of the toolbar items' menus.
156
157 Each item can be set as item menu, with elm_toolbar_item_menu_set().
158
159 For more details about setting the parent for toolbar menus, see
160 elm_menu_parent_set().
161
162 See: elm_menu_parent_set() for details.
163 See: elm_toolbar_item_menu_set() for details.]]
164 set {
165 }
166 get {
167 }
168 values {
169 parent: Efl.Canvas.Object; [[The parent of the menu objects.]]
170 }
171 }
172 @property standard_priority {
173 [[Set the standard priority of visible items in a toolbar
174
175 If the priority of the item is up to standard priority, it is shown in basic panel.
176 The other items are located in more menu or panel. The more menu or panel can be shown when the more item is clicked.
177
178 @since 1.7]]
179 set {
180 }
181 get {
182 }
183 values {
184 priority: int; [[The standard_priority of visible items]]
185 }
186 }
187 @property more_item {
188 get {
189 [[Get the more item which is auto-generated by toolbar.
190
191 Toolbar generates 'more' item when there is no more space to fit items in
192 and toolbar is in #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_EXPAND mode.
193 The more item can be manipulated by elm_object_item_text_set() and
194 elm_object_item_content_set.]]
195
196 return: Elm.Widget.Item; [[The toolbar more item.]]
197 }
198 }
199 item_insert_before {
200 [[Insert a new item into the toolbar object before item $before.
201
202 A new item will be created and added to the toolbar. Its position in
203 this toolbar will be just before item $before.
204
205 Items created with this method can be deleted with
206 elm_object_item_del().
207
208 Associated $data can be properly freed when item is deleted if a
209 callback function is set with elm_object_item_del_cb_set().
210
211 If a function is passed as argument, it will be called every time this item
212 is selected, i.e., the user clicks over an unselected item.
213 If such function isn't needed, just passing
214 $NULL as $func is enough. The same should be done for $data.
215
216 Toolbar will load icon image from fdo or current theme.
217 This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
218 If an absolute path is provided it will load it direct from a file.
219
220 Note: This function does not accept relative icon path.
221
222 See: elm_toolbar_item_icon_set()]]
223
224 return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
225 params {
226 @in before: Elm.Widget.Item; [[The toolbar item to insert before.]]
227 @in icon: string @optional; [[A string with icon name or the absolute path of an image file.]]
228 @in label: string; [[The label of the item.]]
229 @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
230 @in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
231 }
232 }
233 item_insert_after {
234 [[Insert a new item into the toolbar object after item $after.
235
236 A new item will be created and added to the toolbar. Its position in
237 this toolbar will be just after item $after.
238
239 Items created with this method can be deleted with
240 elm_object_item_del().
241
242 Associated $data can be properly freed when item is deleted if a
243 callback function is set with elm_object_item_del_cb_set().
244
245 If a function is passed as argument, it will be called every time this item
246 is selected, i.e., the user clicks over an unselected item.
247 If such function isn't needed, just passing
248 $NULL as $func is enough. The same should be done for $data.
249
250 Toolbar will load icon image from fdo or current theme.
251 This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
252 If an absolute path is provided it will load it direct from a file.
253
254 Note: This function does not accept relative icon path.
255
256 See: elm_toolbar_item_icon_set()]]
257
258 return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
259 params {
260 @in after: Elm.Widget.Item; [[The toolbar item to insert after.]]
261 @in icon: string @optional; [[A string with icon name or the absolute path of an image file.]]
262 @in label: string; [[The label of the item.]]
263 @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
264 @in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
265 }
266 }
267 item_append {
268 [[Append item to the toolbar.
269
270 A new item will be created and appended to the toolbar, i.e., will
271 be set as last item.
272
273 Items created with this method can be deleted with
274 elm_object_item_del().
275
276 Associated $data can be properly freed when item is deleted if a
277 callback function is set with elm_object_item_del_cb_set().
278
279 If a function is passed as argument, it will be called every time this item
280 is selected, i.e., the user clicks over an unselected item.
281 If such function isn't needed, just passing
282 $NULL as $func is enough. The same should be done for $data.
283
284 Toolbar will load icon image from fdo or current theme.
285 This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
286 If an absolute path is provided it will load it direct from a file.
287
288 Note: This function does not accept relative icon path.
289
290 See: elm_toolbar_item_icon_set()]]
291
292 return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
293 params {
294 @in icon: string @optional; [[A string with icon name or the absolute path of an image file.]]
295 @in label: string; [[The label of the item.]]
296 @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
297 @in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
298 }
299 }
300 items_count @const {
301 [[Get the number of items in a toolbar]]
302 return: uint; [[The number of items in $obj toolbar]]
303 }
304 item_prepend {
305 [[Prepend item to the toolbar.
306
307 A new item will be created and prepended to the toolbar, i.e., will
308 be set as first item.
309
310 Items created with this method can be deleted with
311 elm_object_item_del().
312
313 Associated $data can be properly freed when item is deleted if a
314 callback function is set with elm_object_item_del_cb_set().
315
316 If a function is passed as argument, it will be called every time this item
317 is selected, i.e., the user clicks over an unselected item.
318 If such function isn't needed, just passing
319 $NULL as $func is enough. The same should be done for $data.
320
321 Toolbar will load icon image from fdo or current theme.
322 This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
323 If an absolute path is provided it will load it direct from a file.
324
325 Note: This function does not accept relative icon path.
326
327 See: elm_toolbar_item_icon_set()]]
328
329 return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
330 params {
331 @in icon: string @optional; [[A string with icon name or the absolute path of an image file.]]
332 @in label: string; [[The label of the item.]]
333 @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
334 @in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
335 }
336 }
337 item_find_by_label @const {
338 [[Returns a pointer to a toolbar item by its label.]]
339
340 return: Elm.Widget.Item; [[The pointer to the toolbar item matching $label or $NULL on failure.]]
341 params {
342 @in label: string; [[The label of the item to find.]]
343 }
344 }
345 }
346 implements {
347 class.constructor;
348 Efl.Object.constructor;
349 Efl.Gfx.Entity.position { set; }
350 Efl.Gfx.Entity.size { set; }
351 Efl.Canvas.Group.group_calculate;
352 Efl.Canvas.Group.group_member_add;
353 Efl.Ui.Widget.on_access_update;
354 Efl.Ui.Widget.theme_apply;
355 Efl.Ui.Focus.Object.on_focus_update;
356 Efl.Ui.L10n.translation_update;
357 Efl.Ui.Widget.widget_input_event_handler;
358 Efl.Ui.Widget.focus_highlight_geometry { get; }
359 Elm.Widget_Item_Container.focused_item { get; }
360 Efl.Ui.Direction.direction { get; set; [[Only supports $vertical and $horizontal. Default is $horizontal.]] }
361 Efl.Ui.Widget.focus_state_apply;
362 Efl.Access.Widget.Action.elm_actions { get; }
363 Efl.Access.Object.access_children { get; }
364 Efl.Access.Object.state_set { get; }
365 Efl.Access.Selection.selected_children_count { get; }
366 Efl.Access.Selection.selected_child { get; }
367 Efl.Access.Selection.selected_child_deselect;
368 Efl.Access.Selection.child_select;
369 Efl.Access.Selection.child_deselect;
370 Efl.Access.Selection.is_child_selected;
371 Efl.Access.Selection.all_children_select;
372 Efl.Access.Selection.access_selection_clear;
373 Efl.Ui.Focus.Composition.prepare;
374 }
375 events {
376 item,focused: Efl.Object; [[Called when toolbar item got focus]]
377 item,unfocused: Efl.Object; [[Called when toolbar item lost focus]]
378 }
379}
diff --git a/src/lib/elementary/elm_toolbar.h b/src/lib/elementary/elm_toolbar.h
index ef237c4..9e9ec74 100644
--- a/src/lib/elementary/elm_toolbar.h
+++ b/src/lib/elementary/elm_toolbar.h
@@ -71,6 +71,7 @@
71#include <elm_toolbar_common.h> 71#include <elm_toolbar_common.h>
72#ifdef EFL_EO_API_SUPPORT 72#ifdef EFL_EO_API_SUPPORT
73#include <elm_toolbar_eo.h> 73#include <elm_toolbar_eo.h>
74#include <elm_toolbar_item_eo.h>
74#endif 75#endif
75#ifndef EFL_NOLEGACY_API_SUPPORT 76#ifndef EFL_NOLEGACY_API_SUPPORT
76#include <elm_toolbar_legacy.h> 77#include <elm_toolbar_legacy.h>
diff --git a/src/lib/elementary/elm_toolbar_eo.c b/src/lib/elementary/elm_toolbar_eo.c
new file mode 100644
index 0000000..ee20e46
--- /dev/null
+++ b/src/lib/elementary/elm_toolbar_eo.c
@@ -0,0 +1,377 @@
1EWAPI const Efl_Event_Description _ELM_TOOLBAR_EVENT_ITEM_FOCUSED =
2 EFL_EVENT_DESCRIPTION("item,focused");
3EWAPI const Efl_Event_Description _ELM_TOOLBAR_EVENT_ITEM_UNFOCUSED =
4 EFL_EVENT_DESCRIPTION("item,unfocused");
5
6Elm_Widget_Item *_elm_toolbar_selected_item_get(const Eo *obj, Elm_Toolbar_Data *pd);
7
8EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_selected_item_get, Elm_Widget_Item *, NULL);
9
10Elm_Widget_Item *_elm_toolbar_first_item_get(const Eo *obj, Elm_Toolbar_Data *pd);
11
12EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_first_item_get, Elm_Widget_Item *, NULL);
13
14Elm_Widget_Item *_elm_toolbar_last_item_get(const Eo *obj, Elm_Toolbar_Data *pd);
15
16EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_last_item_get, Elm_Widget_Item *, NULL);
17
18Eina_Iterator *_elm_toolbar_items_get(const Eo *obj, Elm_Toolbar_Data *pd);
19
20EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_items_get, Eina_Iterator *, NULL);
21
22void _elm_toolbar_homogeneous_set(Eo *obj, Elm_Toolbar_Data *pd, Eina_Bool homogeneous);
23
24
25static Eina_Error
26__eolian_elm_toolbar_homogeneous_set_reflect(Eo *obj, Eina_Value val)
27{
28 Eina_Error r = 0; Eina_Bool cval;
29 if (!eina_value_bool_convert(&val, &cval))
30 {
31 r = EINA_ERROR_VALUE_FAILED;
32 goto end;
33 }
34 elm_obj_toolbar_homogeneous_set(obj, cval);
35 end:
36 eina_value_flush(&val);
37 return r;
38}
39
40EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_homogeneous_set, EFL_FUNC_CALL(homogeneous), Eina_Bool homogeneous);
41
42Eina_Bool _elm_toolbar_homogeneous_get(const Eo *obj, Elm_Toolbar_Data *pd);
43
44
45static Eina_Value
46__eolian_elm_toolbar_homogeneous_get_reflect(Eo *obj)
47{
48 Eina_Bool val = elm_obj_toolbar_homogeneous_get(obj);
49 return eina_value_bool_init(val);
50}
51
52EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_homogeneous_get, Eina_Bool, 0);
53
54void _elm_toolbar_align_set(Eo *obj, Elm_Toolbar_Data *pd, double align);
55
56
57static Eina_Error
58__eolian_elm_toolbar_align_set_reflect(Eo *obj, Eina_Value val)
59{
60 Eina_Error r = 0; double cval;
61 if (!eina_value_double_convert(&val, &cval))
62 {
63 r = EINA_ERROR_VALUE_FAILED;
64 goto end;
65 }
66 elm_obj_toolbar_align_set(obj, cval);
67 end:
68 eina_value_flush(&val);
69 return r;
70}
71
72EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_align_set, EFL_FUNC_CALL(align), double align);
73
74double _elm_toolbar_align_get(const Eo *obj, Elm_Toolbar_Data *pd);
75
76
77static Eina_Value
78__eolian_elm_toolbar_align_get_reflect(Eo *obj)
79{
80 double val = elm_obj_toolbar_align_get(obj);
81 return eina_value_double_init(val);
82}
83
84EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_align_get, double, 0);
85
86void _elm_toolbar_select_mode_set(Eo *obj, Elm_Toolbar_Data *pd, Elm_Object_Select_Mode mode);
87
88EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_select_mode_set, EFL_FUNC_CALL(mode), Elm_Object_Select_Mode mode);
89
90Elm_Object_Select_Mode _elm_toolbar_select_mode_get(const Eo *obj, Elm_Toolbar_Data *pd);
91
92EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_select_mode_get, Elm_Object_Select_Mode, 4 /* Elm.Object.Select_Mode.max */);
93
94void _elm_toolbar_icon_size_set(Eo *obj, Elm_Toolbar_Data *pd, int icon_size);
95
96
97static Eina_Error
98__eolian_elm_toolbar_icon_size_set_reflect(Eo *obj, Eina_Value val)
99{
100 Eina_Error r = 0; int cval;
101 if (!eina_value_int_convert(&val, &cval))
102 {
103 r = EINA_ERROR_VALUE_FAILED;
104 goto end;
105 }
106 elm_obj_toolbar_icon_size_set(obj, cval);
107 end:
108 eina_value_flush(&val);
109 return r;
110}
111
112EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_icon_size_set, EFL_FUNC_CALL(icon_size), int icon_size);
113
114int _elm_toolbar_icon_size_get(const Eo *obj, Elm_Toolbar_Data *pd);
115
116
117static Eina_Value
118__eolian_elm_toolbar_icon_size_get_reflect(Eo *obj)
119{
120 int val = elm_obj_toolbar_icon_size_get(obj);
121 return eina_value_int_init(val);
122}
123
124EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_icon_size_get, int, 0);
125
126void _elm_toolbar_shrink_mode_set(Eo *obj, Elm_Toolbar_Data *pd, Elm_Toolbar_Shrink_Mode shrink_mode);
127
128EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_shrink_mode_set, EFL_FUNC_CALL(shrink_mode), Elm_Toolbar_Shrink_Mode shrink_mode);
129
130Elm_Toolbar_Shrink_Mode _elm_toolbar_shrink_mode_get(const Eo *obj, Elm_Toolbar_Data *pd);
131
132EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_shrink_mode_get, Elm_Toolbar_Shrink_Mode, 0);
133
134void _elm_toolbar_menu_parent_set(Eo *obj, Elm_Toolbar_Data *pd, Efl_Canvas_Object *parent);
135
136EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_menu_parent_set, EFL_FUNC_CALL(parent), Efl_Canvas_Object *parent);
137
138Efl_Canvas_Object *_elm_toolbar_menu_parent_get(const Eo *obj, Elm_Toolbar_Data *pd);
139
140EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_menu_parent_get, Efl_Canvas_Object *, NULL);
141
142void _elm_toolbar_standard_priority_set(Eo *obj, Elm_Toolbar_Data *pd, int priority);
143
144
145static Eina_Error
146__eolian_elm_toolbar_standard_priority_set_reflect(Eo *obj, Eina_Value val)
147{
148 Eina_Error r = 0; int cval;
149 if (!eina_value_int_convert(&val, &cval))
150 {
151 r = EINA_ERROR_VALUE_FAILED;
152 goto end;
153 }
154 elm_obj_toolbar_standard_priority_set(obj, cval);
155 end:
156 eina_value_flush(&val);
157 return r;
158}
159
160EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_standard_priority_set, EFL_FUNC_CALL(priority), int priority);
161
162int _elm_toolbar_standard_priority_get(const Eo *obj, Elm_Toolbar_Data *pd);
163
164
165static Eina_Value
166__eolian_elm_toolbar_standard_priority_get_reflect(Eo *obj)
167{
168 int val = elm_obj_toolbar_standard_priority_get(obj);
169 return eina_value_int_init(val);
170}
171
172EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_standard_priority_get, int, 0);
173
174Elm_Widget_Item *_elm_toolbar_more_item_get(const Eo *obj, Elm_Toolbar_Data *pd);
175
176EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_more_item_get, Elm_Widget_Item *, NULL);
177
178Elm_Widget_Item *_elm_toolbar_item_insert_before(Eo *obj, Elm_Toolbar_Data *pd, Elm_Widget_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
179
180EOAPI EFL_FUNC_BODYV(elm_obj_toolbar_item_insert_before, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(before, icon, label, func, data), Elm_Widget_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
181
182Elm_Widget_Item *_elm_toolbar_item_insert_after(Eo *obj, Elm_Toolbar_Data *pd, Elm_Widget_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
183
184EOAPI EFL_FUNC_BODYV(elm_obj_toolbar_item_insert_after, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(after, icon, label, func, data), Elm_Widget_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
185
186Elm_Widget_Item *_elm_toolbar_item_append(Eo *obj, Elm_Toolbar_Data *pd, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
187
188EOAPI EFL_FUNC_BODYV(elm_obj_toolbar_item_append, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(icon, label, func, data), const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
189
190unsigned int _elm_toolbar_items_count(const Eo *obj, Elm_Toolbar_Data *pd);
191
192EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_items_count, unsigned int, 0);
193
194Elm_Widget_Item *_elm_toolbar_item_prepend(Eo *obj, Elm_Toolbar_Data *pd, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
195
196EOAPI EFL_FUNC_BODYV(elm_obj_toolbar_item_prepend, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(icon, label, func, data), const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
197
198Elm_Widget_Item *_elm_toolbar_item_find_by_label(const Eo *obj, Elm_Toolbar_Data *pd, const char *label);
199
200EOAPI EFL_FUNC_BODYV_CONST(elm_obj_toolbar_item_find_by_label, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(label), const char *label);
201
202Efl_Object *_elm_toolbar_efl_object_constructor(Eo *obj, Elm_Toolbar_Data *pd);
203
204
205void _elm_toolbar_efl_gfx_entity_position_set(Eo *obj, Elm_Toolbar_Data *pd, Eina_Position2D pos);
206
207
208void _elm_toolbar_efl_gfx_entity_size_set(Eo *obj, Elm_Toolbar_Data *pd, Eina_Size2D size);
209
210
211void _elm_toolbar_efl_canvas_group_group_calculate(Eo *obj, Elm_Toolbar_Data *pd);
212
213
214void _elm_toolbar_efl_canvas_group_group_member_add(Eo *obj, Elm_Toolbar_Data *pd, Efl_Canvas_Object *sub_obj);
215
216
217void _elm_toolbar_efl_ui_widget_on_access_update(Eo *obj, Elm_Toolbar_Data *pd, Eina_Bool enable);
218
219
220Eina_Error _elm_toolbar_efl_ui_widget_theme_apply(Eo *obj, Elm_Toolbar_Data *pd);
221
222
223Eina_Bool _elm_toolbar_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Toolbar_Data *pd);
224
225
226void _elm_toolbar_efl_ui_l10n_translation_update(Eo *obj, Elm_Toolbar_Data *pd);
227
228
229Eina_Bool _elm_toolbar_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Toolbar_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source);
230
231
232Eina_Rect _elm_toolbar_efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Toolbar_Data *pd);
233
234
235Elm_Widget_Item *_elm_toolbar_elm_widget_item_container_focused_item_get(const Eo *obj, Elm_Toolbar_Data *pd);
236
237
238void _elm_toolbar_efl_ui_direction_direction_set(Eo *obj, Elm_Toolbar_Data *pd, Efl_Ui_Dir dir);
239
240
241Efl_Ui_Dir _elm_toolbar_efl_ui_direction_direction_get(const Eo *obj, Elm_Toolbar_Data *pd);
242
243
244Eina_Bool _elm_toolbar_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Toolbar_Data *pd, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect);
245
246
247const Efl_Access_Action_Data *_elm_toolbar_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Toolbar_Data *pd);
248
249
250Eina_List *_elm_toolbar_efl_access_object_access_children_get(const Eo *obj, Elm_Toolbar_Data *pd);
251
252
253Efl_Access_State_Set _elm_toolbar_efl_access_object_state_set_get(const Eo *obj, Elm_Toolbar_Data *pd);
254
255
256int _elm_toolbar_efl_access_selection_selected_children_count_get(const Eo *obj, Elm_Toolbar_Data *pd);
257
258
259Efl_Object *_elm_toolbar_efl_access_selection_selected_child_get(const Eo *obj, Elm_Toolbar_Data *pd, int selected_child_index);
260
261
262Eina_Bool _elm_toolbar_efl_access_selection_selected_child_deselect(Eo *obj, Elm_Toolbar_Data *pd, int child_index);
263
264
265Eina_Bool _elm_toolbar_efl_access_selection_child_select(Eo *obj, Elm_Toolbar_Data *pd, int child_index);
266
267
268Eina_Bool _elm_toolbar_efl_access_selection_child_deselect(Eo *obj, Elm_Toolbar_Data *pd, int child_index);
269
270
271Eina_Bool _elm_toolbar_efl_access_selection_is_child_selected(Eo *obj, Elm_Toolbar_Data *pd, int child_index);
272
273
274Eina_Bool _elm_toolbar_efl_access_selection_all_children_select(Eo *obj, Elm_Toolbar_Data *pd);
275
276
277Eina_Bool _elm_toolbar_efl_access_selection_access_selection_clear(Eo *obj, Elm_Toolbar_Data *pd);
278
279
280void _elm_toolbar_efl_ui_focus_composition_prepare(Eo *obj, Elm_Toolbar_Data *pd);
281
282
283static Eina_Bool
284_elm_toolbar_class_initializer(Efl_Class *klass)
285{
286 const Efl_Object_Ops *opsp = NULL;
287
288 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
289
290#ifndef ELM_TOOLBAR_EXTRA_OPS
291#define ELM_TOOLBAR_EXTRA_OPS
292#endif
293
294 EFL_OPS_DEFINE(ops,
295 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_selected_item_get, _elm_toolbar_selected_item_get),
296 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_first_item_get, _elm_toolbar_first_item_get),
297 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_last_item_get, _elm_toolbar_last_item_get),
298 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_items_get, _elm_toolbar_items_get),
299 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_homogeneous_set, _elm_toolbar_homogeneous_set),
300 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_homogeneous_get, _elm_toolbar_homogeneous_get),
301 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_align_set, _elm_toolbar_align_set),
302 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_align_get, _elm_toolbar_align_get),
303 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_select_mode_set, _elm_toolbar_select_mode_set),
304 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_select_mode_get, _elm_toolbar_select_mode_get),
305 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_icon_size_set, _elm_toolbar_icon_size_set),
306 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_icon_size_get, _elm_toolbar_icon_size_get),
307 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_shrink_mode_set, _elm_toolbar_shrink_mode_set),
308 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_shrink_mode_get, _elm_toolbar_shrink_mode_get),
309 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_menu_parent_set, _elm_toolbar_menu_parent_set),
310 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_menu_parent_get, _elm_toolbar_menu_parent_get),
311 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_standard_priority_set, _elm_toolbar_standard_priority_set),
312 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_standard_priority_get, _elm_toolbar_standard_priority_get),
313 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_more_item_get, _elm_toolbar_more_item_get),
314 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_insert_before, _elm_toolbar_item_insert_before),
315 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_insert_after, _elm_toolbar_item_insert_after),
316 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_append, _elm_toolbar_item_append),
317 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_items_count, _elm_toolbar_items_count),
318 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_prepend, _elm_toolbar_item_prepend),
319 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_find_by_label, _elm_toolbar_item_find_by_label),
320 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_toolbar_efl_object_constructor),
321 EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_toolbar_efl_gfx_entity_position_set),
322 EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_toolbar_efl_gfx_entity_size_set),
323 EFL_OBJECT_OP_FUNC(efl_canvas_group_calculate, _elm_toolbar_efl_canvas_group_group_calculate),
324 EFL_OBJECT_OP_FUNC(efl_canvas_group_member_add, _elm_toolbar_efl_canvas_group_group_member_add),
325 EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_toolbar_efl_ui_widget_on_access_update),
326 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_toolbar_efl_ui_widget_theme_apply),
327 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_on_focus_update, _elm_toolbar_efl_ui_focus_object_on_focus_update),
328 EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_toolbar_efl_ui_l10n_translation_update),
329 EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_toolbar_efl_ui_widget_widget_input_event_handler),
330 EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_highlight_geometry_get, _elm_toolbar_efl_ui_widget_focus_highlight_geometry_get),
331 EFL_OBJECT_OP_FUNC(elm_widget_item_container_focused_item_get, _elm_toolbar_elm_widget_item_container_focused_item_get),
332 EFL_OBJECT_OP_FUNC(efl_ui_direction_set, _elm_toolbar_efl_ui_direction_direction_set),
333 EFL_OBJECT_OP_FUNC(efl_ui_direction_get, _elm_toolbar_efl_ui_direction_direction_get),
334 EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_state_apply, _elm_toolbar_efl_ui_widget_focus_state_apply),
335 EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_toolbar_efl_access_widget_action_elm_actions_get),
336 EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_toolbar_efl_access_object_access_children_get),
337 EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_toolbar_efl_access_object_state_set_get),
338 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_children_count_get, _elm_toolbar_efl_access_selection_selected_children_count_get),
339 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_get, _elm_toolbar_efl_access_selection_selected_child_get),
340 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_deselect, _elm_toolbar_efl_access_selection_selected_child_deselect),
341 EFL_OBJECT_OP_FUNC(efl_access_selection_child_select, _elm_toolbar_efl_access_selection_child_select),
342 EFL_OBJECT_OP_FUNC(efl_access_selection_child_deselect, _elm_toolbar_efl_access_selection_child_deselect),
343 EFL_OBJECT_OP_FUNC(efl_access_selection_is_child_selected, _elm_toolbar_efl_access_selection_is_child_selected),
344 EFL_OBJECT_OP_FUNC(efl_access_selection_all_children_select, _elm_toolbar_efl_access_selection_all_children_select),
345 EFL_OBJECT_OP_FUNC(efl_access_selection_clear, _elm_toolbar_efl_access_selection_access_selection_clear),
346 EFL_OBJECT_OP_FUNC(efl_ui_focus_composition_prepare, _elm_toolbar_efl_ui_focus_composition_prepare),
347 ELM_TOOLBAR_EXTRA_OPS
348 );
349 opsp = &ops;
350
351 static const Efl_Object_Property_Reflection refl_table[] = {
352 {"homogeneous", __eolian_elm_toolbar_homogeneous_set_reflect, __eolian_elm_toolbar_homogeneous_get_reflect},
353 {"align", __eolian_elm_toolbar_align_set_reflect, __eolian_elm_toolbar_align_get_reflect},
354 {"icon_size", __eolian_elm_toolbar_icon_size_set_reflect, __eolian_elm_toolbar_icon_size_get_reflect},
355 {"standard_priority", __eolian_elm_toolbar_standard_priority_set_reflect, __eolian_elm_toolbar_standard_priority_get_reflect},
356 };
357 static const Efl_Object_Property_Reflection_Ops rops = {
358 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
359 };
360 ropsp = &rops;
361
362 return efl_class_functions_set(klass, opsp, ropsp);
363}
364
365static const Efl_Class_Description _elm_toolbar_class_desc = {
366 EO_VERSION,
367 "Elm.Toolbar",
368 EFL_CLASS_TYPE_REGULAR,
369 sizeof(Elm_Toolbar_Data),
370 _elm_toolbar_class_initializer,
371 _elm_toolbar_class_constructor,
372 NULL
373};
374
375EFL_DEFINE_CLASS(elm_toolbar_class_get, &_elm_toolbar_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_FOCUS_COMPOSITION_MIXIN, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_UI_DIRECTION_INTERFACE, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_ACCESS_SELECTION_INTERFACE, EFL_ACCESS_OBJECT_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_SELECTABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, ELM_WIDGET_ITEM_CONTAINER_INTERFACE, NULL);
376
377#include "elm_toolbar_eo.legacy.c"
diff --git a/src/lib/elementary/elm_toolbar_eo.h b/src/lib/elementary/elm_toolbar_eo.h
index 604ca3f..ae7d8ae 100644
--- a/src/lib/elementary/elm_toolbar_eo.h
+++ b/src/lib/elementary/elm_toolbar_eo.h
@@ -1,13 +1,551 @@
1#ifndef _ELM_TOOLBAR_EO_H_
2#define _ELM_TOOLBAR_EO_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_obj_toolbar_shrink_mode_set,
23 * @ref elm_obj_toolbar_shrink_mode_get.
24 *
25 * @ingroup Elm
26 */
27typedef enum
28{
29 ELM_TOOLBAR_SHRINK_NONE = 0, /**< Set toolbar minimum size to fit all the
30 * items. */
31 ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */
32 ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a
33 * scroller. */
34 ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding
35 * items. */
36 ELM_TOOLBAR_SHRINK_EXPAND, /**< Expand all items according the size of the
37 * toolbar. */
38 ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by
39 * elm_toolbar_shrink_mode_get() */
40} Elm_Toolbar_Shrink_Mode;
41
42
43#endif
44/** Elementary toolbar class
45 *
46 * @ingroup Elm_Toolbar
47 */
48#define ELM_TOOLBAR_CLASS elm_toolbar_class_get()
49
50EWAPI const Efl_Class *elm_toolbar_class_get(void);
51
52/**
53 * @brief Get the selected item in the widget.
54 *
55 * @param[in] obj The object.
56 *
57 * @return The selected item or @c null.
58 *
59 * @ingroup Elm_Toolbar
60 */
61EOAPI Elm_Widget_Item *elm_obj_toolbar_selected_item_get(const Eo *obj);
62
63/**
64 * @brief Get the first item in the widget.
65 *
66 * @param[in] obj The object.
67 *
68 * @return The first item or @c null.
69 *
70 * @ingroup Elm_Toolbar
71 */
72EOAPI Elm_Widget_Item *elm_obj_toolbar_first_item_get(const Eo *obj);
73
74/**
75 * @brief Get the last item in the widget.
76 *
77 * @param[in] obj The object.
78 *
79 * @return The last item or @c null.
80 *
81 * @ingroup Elm_Toolbar
82 */
83EOAPI Elm_Widget_Item *elm_obj_toolbar_last_item_get(const Eo *obj);
84
85/**
86 * @brief Returns a list of the widget item.
87 *
88 * @param[in] obj The object.
89 *
90 * @return iterator to widget items
91 *
92 * @ingroup Elm_Toolbar
93 */
94EOAPI Eina_Iterator *elm_obj_toolbar_items_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
95
96/**
97 * @brief Control homogeneous mode.
98 *
99 * This will enable the homogeneous mode where items are of the same size.
100 *
101 * @param[in] obj The object.
102 * @param[in] homogeneous Assume the items within the toolbar are of the same
103 * size (true = on, false = off). Default is @c false.
104 *
105 * @ingroup Elm_Toolbar
106 */
107EOAPI void elm_obj_toolbar_homogeneous_set(Eo *obj, Eina_Bool homogeneous);
108
109/**
110 * @brief Control homogeneous mode.
111 *
112 * This will enable the homogeneous mode where items are of the same size.
113 *
114 * @param[in] obj The object.
115 *
116 * @return Assume the items within the toolbar are of the same size (true = on,
117 * false = off). Default is @c false.
118 *
119 * @ingroup Elm_Toolbar
120 */
121EOAPI Eina_Bool elm_obj_toolbar_homogeneous_get(const Eo *obj);
122
123/**
124 * @brief Control the alignment of the items.
125 *
126 * Alignment of toolbar items, from 0.0 to indicates to align left, to 1.0, to
127 * align to right. 0.5 centralize items.
128 *
129 * Centered items by default.
130 *
131 * @param[in] obj The object.
132 * @param[in] align The new alignment, a float between 0.0 and 1.0.
133 *
134 * @ingroup Elm_Toolbar
135 */
136EOAPI void elm_obj_toolbar_align_set(Eo *obj, double align);
137
138/**
139 * @brief Control the alignment of the items.
140 *
141 * Alignment of toolbar items, from 0.0 to indicates to align left, to 1.0, to
142 * align to right. 0.5 centralize items.
143 *
144 * Centered items by default.
145 *
146 * @param[in] obj The object.
147 *
148 * @return The new alignment, a float between 0.0 and 1.0.
149 *
150 * @ingroup Elm_Toolbar
151 */
152EOAPI double elm_obj_toolbar_align_get(const Eo *obj);
153
154/**
155 * @brief Control the toolbar select mode.
156 *
157 * elm_toolbar_select_mode_set() changes item select mode in the toolbar
158 * widget. - #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their
159 * selection func and callback when first becoming selected. Any further clicks
160 * will do nothing, unless you set always select mode. -
161 * #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every
162 * click will make the selected callbacks be called. -
163 * #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select
164 * items entirely and they will neither appear selected nor call selected
165 * callback functions.
166 *
167 * @param[in] obj The object.
168 * @param[in] mode The select mode If getting mode fails, it returns
169 * #ELM_OBJECT_SELECT_MODE_MAX
170 *
171 * @ingroup Elm_Toolbar
172 */
173EOAPI void elm_obj_toolbar_select_mode_set(Eo *obj, Elm_Object_Select_Mode mode);
174
175/**
176 * @brief Control the toolbar select mode.
177 *
178 * elm_toolbar_select_mode_set() changes item select mode in the toolbar
179 * widget. - #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their
180 * selection func and callback when first becoming selected. Any further clicks
181 * will do nothing, unless you set always select mode. -
182 * #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every
183 * click will make the selected callbacks be called. -
184 * #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select
185 * items entirely and they will neither appear selected nor call selected
186 * callback functions.
187 *
188 * @param[in] obj The object.
189 *
190 * @return The select mode If getting mode fails, it returns
191 * #ELM_OBJECT_SELECT_MODE_MAX
192 *
193 * @ingroup Elm_Toolbar
194 */
195EOAPI Elm_Object_Select_Mode elm_obj_toolbar_select_mode_get(const Eo *obj);
196
197/**
198 * @brief Control the icon size, in pixels, to be used by toolbar items.
199 *
200 * @note Default value is $32. It reads value from elm config.
201 *
202 * @param[in] obj The object.
203 * @param[in] icon_size The icon size in pixels
204 *
205 * @ingroup Elm_Toolbar
206 */
207EOAPI void elm_obj_toolbar_icon_size_set(Eo *obj, int icon_size);
208
209/**
210 * @brief Control the icon size, in pixels, to be used by toolbar items.
211 *
212 * @note Default value is $32. It reads value from elm config.
213 *
214 * @param[in] obj The object.
215 *
216 * @return The icon size in pixels
217 *
218 * @ingroup Elm_Toolbar
219 */
220EOAPI int elm_obj_toolbar_icon_size_get(const Eo *obj);
221
222/**
223 * @brief Control the item displaying mode of a given toolbar widget @c obj.
224 *
225 * The toolbar won't scroll under #ELM_TOOLBAR_SHRINK_NONE mode, but it will
226 * enforce a minimum size, so that all the items will fit inside it. It won't
227 * scroll and won't show the items that don't fit under
228 * #ELM_TOOLBAR_SHRINK_HIDE mode. Finally, it'll scroll under
229 * #ELM_TOOLBAR_SHRINK_SCROLL mode, and it will create a button to aggregate
230 * items which didn't fit with the #ELM_TOOLBAR_SHRINK_MENU mode.
231 *
232 * If shrink mode is changed, Toolbar will send one of the following signal to
233 * each item for informing the current shrink mode. "elm,state,shrink,default"
234 * "elm,state,shrink,hide" "elm,state,shrink,scroll" "elm,state,shrink,menu"
235 * "elm,state,shrink,expand"
236 *
237 * @warning This function's behavior will clash with those of
238 * elm_scroller_policy_set(), so use either one of them, but not both.
239 *
240 * @param[in] obj The object.
241 * @param[in] shrink_mode Toolbar's items display behavior
242 *
243 * @ingroup Elm_Toolbar
244 */
245EOAPI void elm_obj_toolbar_shrink_mode_set(Eo *obj, Elm_Toolbar_Shrink_Mode shrink_mode);
246
247/**
248 * @brief Control the item displaying mode of a given toolbar widget @c obj.
249 *
250 * The toolbar won't scroll under #ELM_TOOLBAR_SHRINK_NONE mode, but it will
251 * enforce a minimum size, so that all the items will fit inside it. It won't
252 * scroll and won't show the items that don't fit under
253 * #ELM_TOOLBAR_SHRINK_HIDE mode. Finally, it'll scroll under
254 * #ELM_TOOLBAR_SHRINK_SCROLL mode, and it will create a button to aggregate
255 * items which didn't fit with the #ELM_TOOLBAR_SHRINK_MENU mode.
256 *
257 * If shrink mode is changed, Toolbar will send one of the following signal to
258 * each item for informing the current shrink mode. "elm,state,shrink,default"
259 * "elm,state,shrink,hide" "elm,state,shrink,scroll" "elm,state,shrink,menu"
260 * "elm,state,shrink,expand"
261 *
262 * @warning This function's behavior will clash with those of
263 * elm_scroller_policy_set(), so use either one of them, but not both.
264 *
265 * @param[in] obj The object.
266 *
267 * @return Toolbar's items display behavior
268 *
269 * @ingroup Elm_Toolbar
270 */
271EOAPI Elm_Toolbar_Shrink_Mode elm_obj_toolbar_shrink_mode_get(const Eo *obj);
272
1/** 273/**
274 * @brief Control the parent object of the toolbar items' menus.
275 *
276 * Each item can be set as item menu, with elm_toolbar_item_menu_set().
277 *
278 * For more details about setting the parent for toolbar menus, see
279 * elm_menu_parent_set().
280 *
281 * See: elm_menu_parent_set() for details. See: elm_toolbar_item_menu_set() for
282 * details.
283 *
284 * @param[in] obj The object.
285 * @param[in] parent The parent of the menu objects.
286 *
2 * @ingroup Elm_Toolbar 287 * @ingroup Elm_Toolbar
288 */
289EOAPI void elm_obj_toolbar_menu_parent_set(Eo *obj, Efl_Canvas_Object *parent);
290
291/**
292 * @brief Control the parent object of the toolbar items' menus.
293 *
294 * Each item can be set as item menu, with elm_toolbar_item_menu_set().
295 *
296 * For more details about setting the parent for toolbar menus, see
297 * elm_menu_parent_set().
3 * 298 *
4 * @{ 299 * See: elm_menu_parent_set() for details. See: elm_toolbar_item_menu_set() for
300 * details.
301 *
302 * @param[in] obj The object.
303 *
304 * @return The parent of the menu objects.
305 *
306 * @ingroup Elm_Toolbar
5 */ 307 */
308EOAPI Efl_Canvas_Object *elm_obj_toolbar_menu_parent_get(const Eo *obj);
6 309
7#include "elm_toolbar_item.eo.h" 310/**
8#include "elm_toolbar.eo.h" 311 * @brief Set the standard priority of visible items in a toolbar
312 *
313 * If the priority of the item is up to standard priority, it is shown in basic
314 * panel. The other items are located in more menu or panel. The more menu or
315 * panel can be shown when the more item is clicked.
316 *
317 * @param[in] obj The object.
318 * @param[in] priority The standard_priority of visible items
319 *
320 * @since 1.7
321 *
322 * @ingroup Elm_Toolbar
323 */
324EOAPI void elm_obj_toolbar_standard_priority_set(Eo *obj, int priority);
9 325
10/** 326/**
11 * @} 327 * @brief Set the standard priority of visible items in a toolbar
328 *
329 * If the priority of the item is up to standard priority, it is shown in basic
330 * panel. The other items are located in more menu or panel. The more menu or
331 * panel can be shown when the more item is clicked.
332 *
333 * @param[in] obj The object.
334 *
335 * @return The standard_priority of visible items
336 *
337 * @since 1.7
338 *
339 * @ingroup Elm_Toolbar
340 */
341EOAPI int elm_obj_toolbar_standard_priority_get(const Eo *obj);
342
343/**
344 * @brief Get the more item which is auto-generated by toolbar.
345 *
346 * Toolbar generates 'more' item when there is no more space to fit items in
347 * and toolbar is in #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_EXPAND
348 * mode. The more item can be manipulated by elm_object_item_text_set() and
349 * elm_object_item_content_set.
350 *
351 * @param[in] obj The object.
352 *
353 * @return The toolbar more item.
354 *
355 * @ingroup Elm_Toolbar
356 */
357EOAPI Elm_Widget_Item *elm_obj_toolbar_more_item_get(const Eo *obj);
358
359/**
360 * @brief Insert a new item into the toolbar object before item @c before.
361 *
362 * A new item will be created and added to the toolbar. Its position in this
363 * toolbar will be just before item @c before.
364 *
365 * Items created with this method can be deleted with elm_object_item_del().
366 *
367 * Associated @c data can be properly freed when item is deleted if a callback
368 * function is set with elm_object_item_del_cb_set().
369 *
370 * If a function is passed as argument, it will be called every time this item
371 * is selected, i.e., the user clicks over an unselected item. If such function
372 * isn't needed, just passing @c NULL as @c func is enough. The same should be
373 * done for @c data.
374 *
375 * Toolbar will load icon image from fdo or current theme. This behavior can be
376 * set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is
377 * provided it will load it direct from a file.
378 *
379 * @note This function does not accept relative icon path.
380 *
381 * See: elm_toolbar_item_icon_set()
382 *
383 * @param[in] obj The object.
384 * @param[in] before The toolbar item to insert before.
385 * @param[in] icon A string with icon name or the absolute path of an image
386 * file.
387 * @param[in] label The label of the item.
388 * @param[in] func The function to call when the item is clicked.
389 * @param[in] data The data to associate with the item for related callbacks.
390 *
391 * @return The created item or @c NULL upon failure.
392 *
393 * @ingroup Elm_Toolbar
394 */
395EOAPI Elm_Widget_Item *elm_obj_toolbar_item_insert_before(Eo *obj, Elm_Widget_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
396
397/**
398 * @brief Insert a new item into the toolbar object after item @c after.
399 *
400 * A new item will be created and added to the toolbar. Its position in this
401 * toolbar will be just after item @c after.
402 *
403 * Items created with this method can be deleted with elm_object_item_del().
404 *
405 * Associated @c data can be properly freed when item is deleted if a callback
406 * function is set with elm_object_item_del_cb_set().
407 *
408 * If a function is passed as argument, it will be called every time this item
409 * is selected, i.e., the user clicks over an unselected item. If such function
410 * isn't needed, just passing @c NULL as @c func is enough. The same should be
411 * done for @c data.
412 *
413 * Toolbar will load icon image from fdo or current theme. This behavior can be
414 * set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is
415 * provided it will load it direct from a file.
416 *
417 * @note This function does not accept relative icon path.
418 *
419 * See: elm_toolbar_item_icon_set()
420 *
421 * @param[in] obj The object.
422 * @param[in] after The toolbar item to insert after.
423 * @param[in] icon A string with icon name or the absolute path of an image
424 * file.
425 * @param[in] label The label of the item.
426 * @param[in] func The function to call when the item is clicked.
427 * @param[in] data The data to associate with the item for related callbacks.
428 *
429 * @return The created item or @c NULL upon failure.
430 *
431 * @ingroup Elm_Toolbar
432 */
433EOAPI Elm_Widget_Item *elm_obj_toolbar_item_insert_after(Eo *obj, Elm_Widget_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
434
435/**
436 * @brief Append item to the toolbar.
437 *
438 * A new item will be created and appended to the toolbar, i.e., will be set as
439 * last item.
440 *
441 * Items created with this method can be deleted with elm_object_item_del().
442 *
443 * Associated @c data can be properly freed when item is deleted if a callback
444 * function is set with elm_object_item_del_cb_set().
445 *
446 * If a function is passed as argument, it will be called every time this item
447 * is selected, i.e., the user clicks over an unselected item. If such function
448 * isn't needed, just passing @c NULL as @c func is enough. The same should be
449 * done for @c data.
450 *
451 * Toolbar will load icon image from fdo or current theme. This behavior can be
452 * set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is
453 * provided it will load it direct from a file.
454 *
455 * @note This function does not accept relative icon path.
456 *
457 * See: elm_toolbar_item_icon_set()
458 *
459 * @param[in] obj The object.
460 * @param[in] icon A string with icon name or the absolute path of an image
461 * file.
462 * @param[in] label The label of the item.
463 * @param[in] func The function to call when the item is clicked.
464 * @param[in] data The data to associate with the item for related callbacks.
465 *
466 * @return The created item or @c NULL upon failure.
467 *
468 * @ingroup Elm_Toolbar
469 */
470EOAPI Elm_Widget_Item *elm_obj_toolbar_item_append(Eo *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
471
472/**
473 * @brief Get the number of items in a toolbar
474 *
475 * @param[in] obj The object.
476 *
477 * @return The number of items in @c obj toolbar
478 *
479 * @ingroup Elm_Toolbar
480 */
481EOAPI unsigned int elm_obj_toolbar_items_count(const Eo *obj);
482
483/**
484 * @brief Prepend item to the toolbar.
485 *
486 * A new item will be created and prepended to the toolbar, i.e., will be set
487 * as first item.
488 *
489 * Items created with this method can be deleted with elm_object_item_del().
490 *
491 * Associated @c data can be properly freed when item is deleted if a callback
492 * function is set with elm_object_item_del_cb_set().
493 *
494 * If a function is passed as argument, it will be called every time this item
495 * is selected, i.e., the user clicks over an unselected item. If such function
496 * isn't needed, just passing @c NULL as @c func is enough. The same should be
497 * done for @c data.
498 *
499 * Toolbar will load icon image from fdo or current theme. This behavior can be
500 * set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is
501 * provided it will load it direct from a file.
502 *
503 * @note This function does not accept relative icon path.
504 *
505 * See: elm_toolbar_item_icon_set()
506 *
507 * @param[in] obj The object.
508 * @param[in] icon A string with icon name or the absolute path of an image
509 * file.
510 * @param[in] label The label of the item.
511 * @param[in] func The function to call when the item is clicked.
512 * @param[in] data The data to associate with the item for related callbacks.
513 *
514 * @return The created item or @c NULL upon failure.
515 *
516 * @ingroup Elm_Toolbar
517 */
518EOAPI Elm_Widget_Item *elm_obj_toolbar_item_prepend(Eo *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
519
520/**
521 * @brief Returns a pointer to a toolbar item by its label.
522 *
523 * @param[in] obj The object.
524 * @param[in] label The label of the item to find.
525 *
526 * @return The pointer to the toolbar item matching @c label or @c NULL on
527 * failure.
528 *
529 * @ingroup Elm_Toolbar
530 */
531EOAPI Elm_Widget_Item *elm_obj_toolbar_item_find_by_label(const Eo *obj, const char *label);
532
533EWAPI extern const Efl_Event_Description _ELM_TOOLBAR_EVENT_ITEM_FOCUSED;
534
535/** Called when toolbar item got focus
536 * @return Efl_Object *
537 *
538 * @ingroup Elm_Toolbar
539 */
540#define ELM_TOOLBAR_EVENT_ITEM_FOCUSED (&(_ELM_TOOLBAR_EVENT_ITEM_FOCUSED))
541
542EWAPI extern const Efl_Event_Description _ELM_TOOLBAR_EVENT_ITEM_UNFOCUSED;
543
544/** Called when toolbar item lost focus
545 * @return Efl_Object *
546 *
547 * @ingroup Elm_Toolbar
12 */ 548 */
549#define ELM_TOOLBAR_EVENT_ITEM_UNFOCUSED (&(_ELM_TOOLBAR_EVENT_ITEM_UNFOCUSED))
13 550
551#endif
diff --git a/src/lib/elementary/elm_toolbar_eo.legacy.c b/src/lib/elementary/elm_toolbar_eo.legacy.c
new file mode 100644
index 0000000..f0083b5
--- /dev/null
+++ b/src/lib/elementary/elm_toolbar_eo.legacy.c
@@ -0,0 +1,150 @@
1
2EAPI Elm_Widget_Item *
3elm_toolbar_selected_item_get(const Elm_Toolbar *obj)
4{
5 return elm_obj_toolbar_selected_item_get(obj);
6}
7
8EAPI Elm_Widget_Item *
9elm_toolbar_first_item_get(const Elm_Toolbar *obj)
10{
11 return elm_obj_toolbar_first_item_get(obj);
12}
13
14EAPI Elm_Widget_Item *
15elm_toolbar_last_item_get(const Elm_Toolbar *obj)
16{
17 return elm_obj_toolbar_last_item_get(obj);
18}
19
20EAPI Eina_Iterator *
21elm_toolbar_items_get(const Elm_Toolbar *obj)
22{
23 return elm_obj_toolbar_items_get(obj);
24}
25
26EAPI void
27elm_toolbar_homogeneous_set(Elm_Toolbar *obj, Eina_Bool homogeneous)
28{
29 elm_obj_toolbar_homogeneous_set(obj, homogeneous);
30}
31
32EAPI Eina_Bool
33elm_toolbar_homogeneous_get(const Elm_Toolbar *obj)
34{
35 return elm_obj_toolbar_homogeneous_get(obj);
36}
37
38EAPI void
39elm_toolbar_align_set(Elm_Toolbar *obj, double align)
40{
41 elm_obj_toolbar_align_set(obj, align);
42}
43
44EAPI double
45elm_toolbar_align_get(const Elm_Toolbar *obj)
46{
47 return elm_obj_toolbar_align_get(obj);
48}
49
50EAPI void
51elm_toolbar_select_mode_set(Elm_Toolbar *obj, Elm_Object_Select_Mode mode)
52{
53 elm_obj_toolbar_select_mode_set(obj, mode);
54}
55
56EAPI Elm_Object_Select_Mode
57elm_toolbar_select_mode_get(const Elm_Toolbar *obj)
58{
59 return elm_obj_toolbar_select_mode_get(obj);
60}
61
62EAPI void
63elm_toolbar_icon_size_set(Elm_Toolbar *obj, int icon_size)
64{
65 elm_obj_toolbar_icon_size_set(obj, icon_size);
66}
67
68EAPI int
69elm_toolbar_icon_size_get(const Elm_Toolbar *obj)
70{
71 return elm_obj_toolbar_icon_size_get(obj);
72}
73
74EAPI void
75elm_toolbar_shrink_mode_set(Elm_Toolbar *obj, Elm_Toolbar_Shrink_Mode shrink_mode)
76{
77 elm_obj_toolbar_shrink_mode_set(obj, shrink_mode);
78}
79
80EAPI Elm_Toolbar_Shrink_Mode
81elm_toolbar_shrink_mode_get(const Elm_Toolbar *obj)
82{
83 return elm_obj_toolbar_shrink_mode_get(obj);
84}
85
86EAPI void
87elm_toolbar_menu_parent_set(Elm_Toolbar *obj, Efl_Canvas_Object *parent)
88{
89 elm_obj_toolbar_menu_parent_set(obj, parent);
90}
91
92EAPI Efl_Canvas_Object *
93elm_toolbar_menu_parent_get(const Elm_Toolbar *obj)
94{
95 return elm_obj_toolbar_menu_parent_get(obj);
96}
97
98EAPI void
99elm_toolbar_standard_priority_set(Elm_Toolbar *obj, int priority)
100{
101 elm_obj_toolbar_standard_priority_set(obj, priority);
102}
103
104EAPI int
105elm_toolbar_standard_priority_get(const Elm_Toolbar *obj)
106{
107 return elm_obj_toolbar_standard_priority_get(obj);
108}
109
110EAPI Elm_Widget_Item *
111elm_toolbar_more_item_get(const Elm_Toolbar *obj)
112{
113 return elm_obj_toolbar_more_item_get(obj);
114}
115
116EAPI Elm_Widget_Item *
117elm_toolbar_item_insert_before(Elm_Toolbar *obj, Elm_Widget_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
118{
119 return elm_obj_toolbar_item_insert_before(obj, before, icon, label, func, data);
120}
121
122EAPI Elm_Widget_Item *
123elm_toolbar_item_insert_after(Elm_Toolbar *obj, Elm_Widget_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
124{
125 return elm_obj_toolbar_item_insert_after(obj, after, icon, label, func, data);
126}
127
128EAPI Elm_Widget_Item *
129elm_toolbar_item_append(Elm_Toolbar *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
130{
131 return elm_obj_toolbar_item_append(obj, icon, label, func, data);
132}
133
134EAPI unsigned int
135elm_toolbar_items_count(const Elm_Toolbar *obj)
136{
137 return elm_obj_toolbar_items_count(obj);
138}
139
140EAPI Elm_Widget_Item *
141elm_toolbar_item_prepend(Elm_Toolbar *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
142{
143 return elm_obj_toolbar_item_prepend(obj, icon, label, func, data);
144}
145
146EAPI Elm_Widget_Item *
147elm_toolbar_item_find_by_label(const Elm_Toolbar *obj, const char *label)
148{
149 return elm_obj_toolbar_item_find_by_label(obj, label);
150}
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
diff --git a/src/lib/elementary/elm_toolbar_item.eo b/src/lib/elementary/elm_toolbar_item.eo
deleted file mode 100644
index 6abdc39..0000000
--- a/src/lib/elementary/elm_toolbar_item.eo
+++ /dev/null
@@ -1,329 +0,0 @@
1enum Elm.Toolbar_Item_Scrollto_Type
2{
3 [[Defines where to position the item in the toolbar.]]
4 legacy: elm_toolbar_item_scrollto;
5
6 none = 0, [[no scrollto]]
7 in = (1 << 0), [[to the nearest viewport]]
8 first = (1 << 1), [[to the first of viewport]]
9 middle = (1 << 2), [[to the middle of viewport]]
10 last = (1 << 3) [[to the last of viewport]]
11}
12
13struct Elm.Toolbar_Item_State
14{
15 [[
16 State of a Elm_Toolbar_Item.
17 Can be created with elm_toolbar_item_state_add() and removed with elm_toolbar_item_state_del().
18 ]]
19 label: string; [[Item label]]
20 icon_str: string; [[Item icon string]]
21 icon: Efl.Canvas.Object; [[Item icon]]
22 func: Evas_Smart_Cb ; [[Item callback function]]
23 data: const(void_ptr); [[Item data]]
24}
25
26class Elm.Toolbar_Item extends Elm.Widget.Item implements Efl.Ui.Focus.Object, Efl.Ui.Legacy
27{
28 [[Elementary toolbar item class]]
29 legacy_prefix: elm_toolbar_item;
30 eo_prefix: elm_obj_toolbar_item;
31 methods {
32 @property prev {
33 get {
34 [[Get the item before this one in the widget's list of items.
35
36 See also @.next.
37 ]]
38 }
39 values {
40 item: Elm.Widget.Item; [[The item before the object in its parent's
41 list. If there is no previous item or in case
42 of error, $null is returned.]]
43 }
44 }
45 @property next {
46 get {
47 [[Get the item after this one in the widget's list of items.
48
49 See also @.prev.
50 ]]
51 }
52 values {
53 item: Elm.Widget.Item; [[The item after the object in its parent's
54 list. If there is no next item or in case
55 of error, $null is returned.]]
56 }
57 }
58 @property selected {
59 [[Indicates whether this item is currently selected.]]
60 get {
61 [[Get the selected state of this item.]]
62 }
63 set {
64 [[Set the selected state of $item.
65
66 This sets the selected state of the given item $it.
67 $true for selected, $false for not selected.
68
69 If a new item is selected the previously selected will
70 be unselected. Previously selected item can be retrieved
71 with @Elm.Toolbar.selected_item.get.
72
73 Selected items will be highlighted.
74 ]]
75 }
76 values {
77 selected: bool; [[The selection state.]]
78 }
79 }
80 @property priority {
81 get {
82 [[Get the priority of a toolbar item.]]
83 }
84 set {
85 [[Set the priority of a toolbar item.
86
87 This is used only when the toolbar shrink mode is set
88 to #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE.
89 When space is less than required, items with low priority
90 will be removed from the toolbar and added to a
91 dynamically-created menu, while items with higher
92 priority will remain on the toolbar, with the same
93 order they were added.
94 ]]
95 }
96 values {
97 priority: int; [[The $item priority. The default is zero
98 for set and 0 is returned on failure.]]
99 }
100 }
101 @property icon {
102 get {
103 [[Get the string used to set the icon of $item.]]
104 }
105 set {
106 [[Set the icon associated with $item.
107
108 Toolbar will load icon image from fdo or current theme.
109 This behavior can be set by
110 elm_toolbar_icon_order_lookup_set function.
111 If an absolute path is provided it will load it direct
112 from a file.
113
114 Note: This function does not accept relative icon path.
115 ]]
116 }
117 values {
118 icon: string; [[A string with icon name or the
119 absolute path of an image file.]]
120 }
121 }
122 @property object {
123 get {
124 [[Get the real Evas(Edje) object created to implement the
125 view of a given toolbar $item.
126 ]]
127 }
128 values {
129 obj: Efl.Canvas.Object; [[The base Edje object associated with $it.]]
130 }
131 }
132 @property icon_object {
133 get {
134 [[Get the icon object of $item.
135
136 See also @.icon.set, @.icon_file_set, @.icon_memfile_set.
137 ]]
138 }
139 values {
140 obj: Efl.Canvas.Object; [[The icon object.]]
141 }
142 }
143 @property separator {
144 get {
145 [[Get a value whether item is a separator or not.]]
146 }
147 set {
148 [[Set or unset item as a separator.
149
150 Items aren't set as separator by default.
151
152 If set as separator it will display separator theme, so
153 won't display icons or label.
154 ]]
155 }
156 values {
157 separator: bool; [[$true if the item is a separator, $false otherwise]]
158 }
159 }
160 @property menu {
161 get {
162 [[Get toolbar item's menu.
163
164 If $item wasn't set as menu item with @.menu_set,
165 this function will set it.
166 ]]
167 }
168 values {
169 menu: Efl.Canvas.Object; [[Item's menu object or $null on failure.]]
170 }
171 }
172 @property state {
173 get {
174 [[Get the current state of $it.]]
175 }
176 set {
177 [[Set $state as the current state of $it.
178
179 If $state is $NULL, it won't select any state and the
180 default item's icon and label will be used. It's the
181 behavior as \@ref elm_toolbar_item_state_unset.
182 ]]
183 return: bool; [[$true on success, $false otherwise]]
184 }
185 values {
186 state: ptr(Elm.Toolbar_Item_State) @nullable; [[Item state]]
187 }
188 }
189 /* init { FIXME
190 params {
191 Evas_Smart_Cb func;
192 const(void_ptr) data;
193 }
194 }*/
195 icon_memfile_set {
196 [[Set the icon associated with $item to an image in a binary buffer.
197
198 Note: The icon image set by this function can be changed by
199 @.icon.set.
200 ]]
201 params {
202 @in img: const(void_ptr); [[The binary data that will be used as an image.]]
203 @in size: size; [[The size of binary data $img.]]
204 @in format: string; [[Optional format of $img to pass to the image loader.]]
205 @in key: string; [[Optional key of $img to pass to the image loader (eg. if $img is an edje file).]]
206 }
207 return: bool; [[$true on success, $false otherwise]]
208 }
209 icon_file_set {
210 [[Set the icon associated with $item to an image in a binary buffer.
211
212 Note: The icon image set by this function can be changed by
213 elm_toolbar_item_icon_set().
214 ]]
215 params {
216 @in file: string; [[The file that contains the image.]]
217 @in key: string; [[Optional key of $img to pass to the image loader (eg. if $img is an edje file).]]
218 }
219 return: bool; [[$true on success, $false otherwise]]
220 }
221 state_add {
222 [[Add a new state to $item.
223
224 Toolbar will load icon image from fdo or current theme.
225 This behavior can be set by elm_toolbar_icon_order_lookup_set
226 function. If an absolute path is provided it will load it
227 direct from a file.
228
229 States created with this function can be removed with
230 @.state_del.
231 ]]
232 params {
233 @in icon: string; [[A string with icon name or the absolute path of an image file.]]
234 @in label: string; [[The label of the new state.]]
235 @in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked when this state is selected.]]
236 @in data: const(void_ptr) @optional; [[The data to associate with the state.]]
237 }
238 return: ptr(Elm.Toolbar_Item_State); [[The toolbar item state, or $null upon failure.]]
239 }
240 state_del {
241 [[Delete a previously added state to $item.]]
242 params {
243 @in state: ptr(Elm.Toolbar_Item_State); [[The state to be deleted.]]
244 }
245 return: bool; [[$true on success or $false on failure.]]
246 }
247 state_next {
248 [[Get the state after selected state in toolbar's $item.
249
250 If last state is selected, this function will return first
251 state.
252 ]]
253 return: ptr(Elm.Toolbar_Item_State); [[The state after current state, or $null on failure.]]
254 }
255 state_prev {
256 [[Get the state before selected state in toolbar's $item.
257
258 If first state is selected, this function will return last
259 state.
260 ]]
261 return: ptr(Elm.Toolbar_Item_State); [[The state before current state, or $null on failure.]]
262 }
263 show {
264 [[Show a specific item, when the toolbar can be scrolled.
265
266 @since 1.8
267 ]]
268 params {
269 @in scrollto: Elm.Toolbar_Item_Scrollto_Type; [[The position the item should appear at.]]
270 }
271 }
272 bring_in {
273 [[Show a specific item with scroll animation, when the toolbar
274 can be scrolled.
275
276 @since 1.8
277 ]]
278 params {
279 @in scrollto: Elm.Toolbar_Item_Scrollto_Type; [[The position the item should appear at.]]
280 }
281 }
282 menu_set {
283 [[Set whether the toolbar item opens a menu.
284
285 A toolbar item can be set to be a menu, using this function.
286
287 Once it is set to be a menu, it can be manipulated through the
288 menu-like function @Elm.Toolbar.menu_parent.set and the
289 other elm_menu functions, using the Evas_Object $menu returned
290 by @.menu.get.
291
292 So, items to be displayed in this item's menu should be added
293 with \@ref elm_menu_item_add.
294 ]]
295 /* FIXME-doc
296 The following code exemplifies the most basic usage:
297 @code
298 tb = elm_toolbar_add(win)
299 item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
300 elm_toolbar_item_menu_set(item, true);
301 elm_toolbar_menu_parent_set(tb, win);
302 menu = elm_toolbar_item_menu_get(item);
303 elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL);
304 menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL,
305 NULL);
306 @endcode
307 */
308 params {
309 @in menu: bool; [[If $true, $item will opens a menu when selected.]]
310 }
311 }
312 }
313 implements {
314 Efl.Object.constructor;
315 Efl.Object.invalidate;
316 Elm.Widget.Item.disable;
317 Elm.Widget.Item.disabled { set; }
318 Elm.Widget.Item.item_focus { get; set; }
319 Elm.Widget.Item.signal_emit;
320 Elm.Widget.Item.part_text { get; set; }
321 Elm.Widget.Item.part_content { get; set; }
322 Elm.Widget.Item.part_content_unset;
323 Efl.Ui.Focus.Object.focus_geometry { get; }
324 Efl.Ui.Focus.Object.focus { set; }
325 Efl.Ui.Focus.Object.focus_parent { get; }
326 Efl.Access.Object.i18n_name { get; }
327 Efl.Access.Object.state_set { get; }
328 }
329}
diff --git a/src/lib/elementary/elm_toolbar_item_eo.c b/src/lib/elementary/elm_toolbar_item_eo.c
new file mode 100644
index 0000000..59d22db
--- /dev/null
+++ b/src/lib/elementary/elm_toolbar_item_eo.c
@@ -0,0 +1,328 @@
1
2Elm_Widget_Item *_elm_toolbar_item_prev_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
3
4EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_prev_get, Elm_Widget_Item *, NULL);
5
6Elm_Widget_Item *_elm_toolbar_item_next_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
7
8EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_next_get, Elm_Widget_Item *, NULL);
9
10void _elm_toolbar_item_selected_set(Eo *obj, Elm_Toolbar_Item_Data *pd, Eina_Bool selected);
11
12
13static Eina_Error
14__eolian_elm_toolbar_item_selected_set_reflect(Eo *obj, Eina_Value val)
15{
16 Eina_Error r = 0; Eina_Bool cval;
17 if (!eina_value_bool_convert(&val, &cval))
18 {
19 r = EINA_ERROR_VALUE_FAILED;
20 goto end;
21 }
22 elm_obj_toolbar_item_selected_set(obj, cval);
23 end:
24 eina_value_flush(&val);
25 return r;
26}
27
28EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_item_selected_set, EFL_FUNC_CALL(selected), Eina_Bool selected);
29
30Eina_Bool _elm_toolbar_item_selected_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
31
32
33static Eina_Value
34__eolian_elm_toolbar_item_selected_get_reflect(Eo *obj)
35{
36 Eina_Bool val = elm_obj_toolbar_item_selected_get(obj);
37 return eina_value_bool_init(val);
38}
39
40EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_selected_get, Eina_Bool, 0);
41
42void _elm_toolbar_item_priority_set(Eo *obj, Elm_Toolbar_Item_Data *pd, int priority);
43
44
45static Eina_Error
46__eolian_elm_toolbar_item_priority_set_reflect(Eo *obj, Eina_Value val)
47{
48 Eina_Error r = 0; int cval;
49 if (!eina_value_int_convert(&val, &cval))
50 {
51 r = EINA_ERROR_VALUE_FAILED;
52 goto end;
53 }
54 elm_obj_toolbar_item_priority_set(obj, cval);
55 end:
56 eina_value_flush(&val);
57 return r;
58}
59
60EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_item_priority_set, EFL_FUNC_CALL(priority), int priority);
61
62int _elm_toolbar_item_priority_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
63
64
65static Eina_Value
66__eolian_elm_toolbar_item_priority_get_reflect(Eo *obj)
67{
68 int val = elm_obj_toolbar_item_priority_get(obj);
69 return eina_value_int_init(val);
70}
71
72EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_priority_get, int, 0);
73
74void _elm_toolbar_item_icon_set(Eo *obj, Elm_Toolbar_Item_Data *pd, const char *icon);
75
76
77static Eina_Error
78__eolian_elm_toolbar_item_icon_set_reflect(Eo *obj, Eina_Value val)
79{
80 Eina_Error r = 0; const char *cval;
81 if (!eina_value_string_convert(&val, &cval))
82 {
83 r = EINA_ERROR_VALUE_FAILED;
84 goto end;
85 }
86 elm_obj_toolbar_item_icon_set(obj, cval);
87 end:
88 eina_value_flush(&val);
89 return r;
90}
91
92EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_item_icon_set, EFL_FUNC_CALL(icon), const char *icon);
93
94const char *_elm_toolbar_item_icon_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
95
96
97static Eina_Value
98__eolian_elm_toolbar_item_icon_get_reflect(Eo *obj)
99{
100 const char *val = elm_obj_toolbar_item_icon_get(obj);
101 return eina_value_string_init(val);
102}
103
104EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_icon_get, const char *, NULL);
105
106Efl_Canvas_Object *_elm_toolbar_item_object_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
107
108EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_object_get, Efl_Canvas_Object *, NULL);
109
110Efl_Canvas_Object *_elm_toolbar_item_icon_object_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
111
112EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_icon_object_get, Efl_Canvas_Object *, NULL);
113
114void _elm_toolbar_item_separator_set(Eo *obj, Elm_Toolbar_Item_Data *pd, Eina_Bool separator);
115
116
117static Eina_Error
118__eolian_elm_toolbar_item_separator_set_reflect(Eo *obj, Eina_Value val)
119{
120 Eina_Error r = 0; Eina_Bool cval;
121 if (!eina_value_bool_convert(&val, &cval))
122 {
123 r = EINA_ERROR_VALUE_FAILED;
124 goto end;
125 }
126 elm_obj_toolbar_item_separator_set(obj, cval);
127 end:
128 eina_value_flush(&val);
129 return r;
130}
131
132EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_item_separator_set, EFL_FUNC_CALL(separator), Eina_Bool separator);
133
134Eina_Bool _elm_toolbar_item_separator_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
135
136
137static Eina_Value
138__eolian_elm_toolbar_item_separator_get_reflect(Eo *obj)
139{
140 Eina_Bool val = elm_obj_toolbar_item_separator_get(obj);
141 return eina_value_bool_init(val);
142}
143
144EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_separator_get, Eina_Bool, 0);
145
146Efl_Canvas_Object *_elm_toolbar_item_menu_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
147
148EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_menu_get, Efl_Canvas_Object *, NULL);
149
150Eina_Bool _elm_toolbar_item_state_set(Eo *obj, Elm_Toolbar_Item_Data *pd, Elm_Toolbar_Item_State *state);
151
152EOAPI EFL_FUNC_BODYV(elm_obj_toolbar_item_state_set, Eina_Bool, 0, EFL_FUNC_CALL(state), Elm_Toolbar_Item_State *state);
153
154Elm_Toolbar_Item_State *_elm_toolbar_item_state_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
155
156EOAPI EFL_FUNC_BODY_CONST(elm_obj_toolbar_item_state_get, Elm_Toolbar_Item_State *, NULL);
157
158Eina_Bool _elm_toolbar_item_icon_memfile_set(Eo *obj, Elm_Toolbar_Item_Data *pd, const void *img, size_t size, const char *format, const char *key);
159
160EOAPI EFL_FUNC_BODYV(elm_obj_toolbar_item_icon_memfile_set, Eina_Bool, 0, EFL_FUNC_CALL(img, size, format, key), const void *img, size_t size, const char *format, const char *key);
161
162Eina_Bool _elm_toolbar_item_icon_file_set(Eo *obj, Elm_Toolbar_Item_Data *pd, const char *file, const char *key);
163
164EOAPI EFL_FUNC_BODYV(elm_obj_toolbar_item_icon_file_set, Eina_Bool, 0, EFL_FUNC_CALL(file, key), const char *file, const char *key);
165
166Elm_Toolbar_Item_State *_elm_toolbar_item_state_add(Eo *obj, Elm_Toolbar_Item_Data *pd, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
167
168EOAPI EFL_FUNC_BODYV(elm_obj_toolbar_item_state_add, Elm_Toolbar_Item_State *, NULL, EFL_FUNC_CALL(icon, label, func, data), const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
169
170Eina_Bool _elm_toolbar_item_state_del(Eo *obj, Elm_Toolbar_Item_Data *pd, Elm_Toolbar_Item_State *state);
171
172EOAPI EFL_FUNC_BODYV(elm_obj_toolbar_item_state_del, Eina_Bool, 0, EFL_FUNC_CALL(state), Elm_Toolbar_Item_State *state);
173
174Elm_Toolbar_Item_State *_elm_toolbar_item_state_next(Eo *obj, Elm_Toolbar_Item_Data *pd);
175
176EOAPI EFL_FUNC_BODY(elm_obj_toolbar_item_state_next, Elm_Toolbar_Item_State *, NULL);
177
178Elm_Toolbar_Item_State *_elm_toolbar_item_state_prev(Eo *obj, Elm_Toolbar_Item_Data *pd);
179
180EOAPI EFL_FUNC_BODY(elm_obj_toolbar_item_state_prev, Elm_Toolbar_Item_State *, NULL);
181
182void _elm_toolbar_item_show(Eo *obj, Elm_Toolbar_Item_Data *pd, Elm_Toolbar_Item_Scrollto_Type scrollto);
183
184EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_item_show, EFL_FUNC_CALL(scrollto), Elm_Toolbar_Item_Scrollto_Type scrollto);
185
186void _elm_toolbar_item_bring_in(Eo *obj, Elm_Toolbar_Item_Data *pd, Elm_Toolbar_Item_Scrollto_Type scrollto);
187
188EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_item_bring_in, EFL_FUNC_CALL(scrollto), Elm_Toolbar_Item_Scrollto_Type scrollto);
189
190void _elm_toolbar_item_menu_set(Eo *obj, Elm_Toolbar_Item_Data *pd, Eina_Bool menu);
191
192EOAPI EFL_VOID_FUNC_BODYV(elm_obj_toolbar_item_menu_set, EFL_FUNC_CALL(menu), Eina_Bool menu);
193
194Efl_Object *_elm_toolbar_item_efl_object_constructor(Eo *obj, Elm_Toolbar_Item_Data *pd);
195
196
197void _elm_toolbar_item_efl_object_invalidate(Eo *obj, Elm_Toolbar_Item_Data *pd);
198
199
200void _elm_toolbar_item_elm_widget_item_disable(Eo *obj, Elm_Toolbar_Item_Data *pd);
201
202
203void _elm_toolbar_item_elm_widget_item_disabled_set(Eo *obj, Elm_Toolbar_Item_Data *pd, Eina_Bool disable);
204
205
206void _elm_toolbar_item_elm_widget_item_item_focus_set(Eo *obj, Elm_Toolbar_Item_Data *pd, Eina_Bool focused);
207
208
209Eina_Bool _elm_toolbar_item_elm_widget_item_item_focus_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
210
211
212void _elm_toolbar_item_elm_widget_item_signal_emit(Eo *obj, Elm_Toolbar_Item_Data *pd, const char *emission, const char *source);
213
214
215void _elm_toolbar_item_elm_widget_item_part_text_set(Eo *obj, Elm_Toolbar_Item_Data *pd, const char *part, const char *label);
216
217
218const char *_elm_toolbar_item_elm_widget_item_part_text_get(const Eo *obj, Elm_Toolbar_Item_Data *pd, const char *part);
219
220
221void _elm_toolbar_item_elm_widget_item_part_content_set(Eo *obj, Elm_Toolbar_Item_Data *pd, const char *part, Efl_Canvas_Object *content);
222
223
224Efl_Canvas_Object *_elm_toolbar_item_elm_widget_item_part_content_get(const Eo *obj, Elm_Toolbar_Item_Data *pd, const char *part);
225
226
227Efl_Canvas_Object *_elm_toolbar_item_elm_widget_item_part_content_unset(Eo *obj, Elm_Toolbar_Item_Data *pd, const char *part);
228
229
230Eina_Rect _elm_toolbar_item_efl_ui_focus_object_focus_geometry_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
231
232
233void _elm_toolbar_item_efl_ui_focus_object_focus_set(Eo *obj, Elm_Toolbar_Item_Data *pd, Eina_Bool focus);
234
235
236Efl_Ui_Focus_Object *_elm_toolbar_item_efl_ui_focus_object_focus_parent_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
237
238
239const char *_elm_toolbar_item_efl_access_object_i18n_name_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
240
241
242Efl_Access_State_Set _elm_toolbar_item_efl_access_object_state_set_get(const Eo *obj, Elm_Toolbar_Item_Data *pd);
243
244
245static Eina_Bool
246_elm_toolbar_item_class_initializer(Efl_Class *klass)
247{
248 const Efl_Object_Ops *opsp = NULL;
249
250 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
251
252#ifndef ELM_TOOLBAR_ITEM_EXTRA_OPS
253#define ELM_TOOLBAR_ITEM_EXTRA_OPS
254#endif
255
256 EFL_OPS_DEFINE(ops,
257 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_prev_get, _elm_toolbar_item_prev_get),
258 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_next_get, _elm_toolbar_item_next_get),
259 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_selected_set, _elm_toolbar_item_selected_set),
260 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_selected_get, _elm_toolbar_item_selected_get),
261 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_priority_set, _elm_toolbar_item_priority_set),
262 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_priority_get, _elm_toolbar_item_priority_get),
263 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_icon_set, _elm_toolbar_item_icon_set),
264 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_icon_get, _elm_toolbar_item_icon_get),
265 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_object_get, _elm_toolbar_item_object_get),
266 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_icon_object_get, _elm_toolbar_item_icon_object_get),
267 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_separator_set, _elm_toolbar_item_separator_set),
268 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_separator_get, _elm_toolbar_item_separator_get),
269 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_menu_get, _elm_toolbar_item_menu_get),
270 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_state_set, _elm_toolbar_item_state_set),
271 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_state_get, _elm_toolbar_item_state_get),
272 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_icon_memfile_set, _elm_toolbar_item_icon_memfile_set),
273 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_icon_file_set, _elm_toolbar_item_icon_file_set),
274 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_state_add, _elm_toolbar_item_state_add),
275 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_state_del, _elm_toolbar_item_state_del),
276 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_state_next, _elm_toolbar_item_state_next),
277 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_state_prev, _elm_toolbar_item_state_prev),
278 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_show, _elm_toolbar_item_show),
279 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_bring_in, _elm_toolbar_item_bring_in),
280 EFL_OBJECT_OP_FUNC(elm_obj_toolbar_item_menu_set, _elm_toolbar_item_menu_set),
281 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_toolbar_item_efl_object_constructor),
282 EFL_OBJECT_OP_FUNC(efl_invalidate, _elm_toolbar_item_efl_object_invalidate),
283 EFL_OBJECT_OP_FUNC(elm_wdg_item_disable, _elm_toolbar_item_elm_widget_item_disable),
284 EFL_OBJECT_OP_FUNC(elm_wdg_item_disabled_set, _elm_toolbar_item_elm_widget_item_disabled_set),
285 EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_set, _elm_toolbar_item_elm_widget_item_item_focus_set),
286 EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_get, _elm_toolbar_item_elm_widget_item_item_focus_get),
287 EFL_OBJECT_OP_FUNC(elm_wdg_item_signal_emit, _elm_toolbar_item_elm_widget_item_signal_emit),
288 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_set, _elm_toolbar_item_elm_widget_item_part_text_set),
289 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_toolbar_item_elm_widget_item_part_text_get),
290 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_set, _elm_toolbar_item_elm_widget_item_part_content_set),
291 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_get, _elm_toolbar_item_elm_widget_item_part_content_get),
292 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_unset, _elm_toolbar_item_elm_widget_item_part_content_unset),
293 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_focus_geometry_get, _elm_toolbar_item_efl_ui_focus_object_focus_geometry_get),
294 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_focus_set, _elm_toolbar_item_efl_ui_focus_object_focus_set),
295 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_focus_parent_get, _elm_toolbar_item_efl_ui_focus_object_focus_parent_get),
296 EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_toolbar_item_efl_access_object_i18n_name_get),
297 EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_toolbar_item_efl_access_object_state_set_get),
298 ELM_TOOLBAR_ITEM_EXTRA_OPS
299 );
300 opsp = &ops;
301
302 static const Efl_Object_Property_Reflection refl_table[] = {
303 {"selected", __eolian_elm_toolbar_item_selected_set_reflect, __eolian_elm_toolbar_item_selected_get_reflect},
304 {"priority", __eolian_elm_toolbar_item_priority_set_reflect, __eolian_elm_toolbar_item_priority_get_reflect},
305 {"icon", __eolian_elm_toolbar_item_icon_set_reflect, __eolian_elm_toolbar_item_icon_get_reflect},
306 {"separator", __eolian_elm_toolbar_item_separator_set_reflect, __eolian_elm_toolbar_item_separator_get_reflect},
307 };
308 static const Efl_Object_Property_Reflection_Ops rops = {
309 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
310 };
311 ropsp = &rops;
312
313 return efl_class_functions_set(klass, opsp, ropsp);
314}
315
316static const Efl_Class_Description _elm_toolbar_item_class_desc = {
317 EO_VERSION,
318 "Elm.Toolbar_Item",
319 EFL_CLASS_TYPE_REGULAR,
320 sizeof(Elm_Toolbar_Item_Data),
321 _elm_toolbar_item_class_initializer,
322 NULL,
323 NULL
324};
325
326EFL_DEFINE_CLASS(elm_toolbar_item_class_get, &_elm_toolbar_item_class_desc, ELM_WIDGET_ITEM_CLASS, EFL_UI_FOCUS_OBJECT_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL);
327
328#include "elm_toolbar_item_eo.legacy.c"
diff --git a/src/lib/elementary/elm_toolbar_item_eo.h b/src/lib/elementary/elm_toolbar_item_eo.h
new file mode 100644
index 0000000..44bb2d9
--- /dev/null
+++ b/src/lib/elementary/elm_toolbar_item_eo.h
@@ -0,0 +1,410 @@
1#ifndef _ELM_TOOLBAR_ITEM_EO_H_
2#define _ELM_TOOLBAR_ITEM_EO_H_
3
4#ifndef _ELM_TOOLBAR_ITEM_EO_CLASS_TYPE
5#define _ELM_TOOLBAR_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Toolbar_Item;
8
9#endif
10
11#ifndef _ELM_TOOLBAR_ITEM_EO_TYPES
12#define _ELM_TOOLBAR_ITEM_EO_TYPES
13
14/** Defines where to position the item in the toolbar.
15 *
16 * @ingroup Elm
17 */
18typedef enum
19{
20 ELM_TOOLBAR_ITEM_SCROLLTO_NONE = 0, /**< no scrollto */
21 ELM_TOOLBAR_ITEM_SCROLLTO_IN = 1 /* 1 >> 0 */, /**< to the nearest viewport */
22 ELM_TOOLBAR_ITEM_SCROLLTO_FIRST = 2 /* 1 >> 1 */, /**< to the first of
23 * viewport */
24 ELM_TOOLBAR_ITEM_SCROLLTO_MIDDLE = 4 /* 1 >> 2 */, /**< to the middle of
25 * viewport */
26 ELM_TOOLBAR_ITEM_SCROLLTO_LAST = 8 /* 1 >> 3 */ /**< to the last of viewport
27 */
28} Elm_Toolbar_Item_Scrollto_Type;
29
30/** State of a Elm_Toolbar_Item. Can be created with
31 * elm_toolbar_item_state_add() and removed with elm_toolbar_item_state_del().
32 *
33 * @ingroup Elm
34 */
35typedef struct _Elm_Toolbar_Item_State
36{
37 const char *label; /**< Item label */
38 const char *icon_str; /**< Item icon string */
39 Efl_Canvas_Object *icon; /**< Item icon */
40 Evas_Smart_Cb func; /**< Item callback function */
41 const void *data; /**< Item data */
42} Elm_Toolbar_Item_State;
43
44
45#endif
46/** Elementary toolbar item class
47 *
48 * @ingroup Elm_Toolbar_Item
49 */
50#define ELM_TOOLBAR_ITEM_CLASS elm_toolbar_item_class_get()
51
52EWAPI const Efl_Class *elm_toolbar_item_class_get(void);
53
54/**
55 * @brief Get the item before this one in the widget's list of items.
56 *
57 * See also @ref elm_obj_toolbar_item_next_get.
58 *
59 * @param[in] obj The object.
60 *
61 * @return The item before the object in its parent's list. If there is no
62 * previous item or in case of error, @c null is returned.
63 *
64 * @ingroup Elm_Toolbar_Item
65 */
66EOAPI Elm_Widget_Item *elm_obj_toolbar_item_prev_get(const Eo *obj);
67
68/**
69 * @brief Get the item after this one in the widget's list of items.
70 *
71 * See also @ref elm_obj_toolbar_item_prev_get.
72 *
73 * @param[in] obj The object.
74 *
75 * @return The item after the object in its parent's list. If there is no next
76 * item or in case of error, @c null is returned.
77 *
78 * @ingroup Elm_Toolbar_Item
79 */
80EOAPI Elm_Widget_Item *elm_obj_toolbar_item_next_get(const Eo *obj);
81
82/**
83 * @brief Indicates whether this item is currently selected.
84 *
85 * Set the selected state of @c item.
86 *
87 * This sets the selected state of the given item @c it. @c true for selected,
88 * @c false for not selected.
89 *
90 * If a new item is selected the previously selected will be unselected.
91 * Previously selected item can be retrieved with
92 * @ref elm_obj_toolbar_selected_item_get.
93 *
94 * Selected items will be highlighted.
95 *
96 * @param[in] obj The object.
97 * @param[in] selected The selection state.
98 *
99 * @ingroup Elm_Toolbar_Item
100 */
101EOAPI void elm_obj_toolbar_item_selected_set(Eo *obj, Eina_Bool selected);
102
103/**
104 * @brief Indicates whether this item is currently selected.
105 *
106 * Get the selected state of this item.
107 *
108 * @param[in] obj The object.
109 *
110 * @return The selection state.
111 *
112 * @ingroup Elm_Toolbar_Item
113 */
114EOAPI Eina_Bool elm_obj_toolbar_item_selected_get(const Eo *obj);
115
116/**
117 * @brief Set the priority of a toolbar item.
118 *
119 * This is used only when the toolbar shrink mode is set to
120 * #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE. When space is less
121 * than required, items with low priority will be removed from the toolbar and
122 * added to a dynamically-created menu, while items with higher priority will
123 * remain on the toolbar, with the same order they were added.
124 *
125 * @param[in] obj The object.
126 * @param[in] priority The @c item priority. The default is zero for set and 0
127 * is returned on failure.
128 *
129 * @ingroup Elm_Toolbar_Item
130 */
131EOAPI void elm_obj_toolbar_item_priority_set(Eo *obj, int priority);
132
133/**
134 * @brief Get the priority of a toolbar item.
135 *
136 * @param[in] obj The object.
137 *
138 * @return The @c item priority. The default is zero for set and 0 is returned
139 * on failure.
140 *
141 * @ingroup Elm_Toolbar_Item
142 */
143EOAPI int elm_obj_toolbar_item_priority_get(const Eo *obj);
144
145/**
146 * @brief Set the icon associated with @c item.
147 *
148 * Toolbar will load icon image from fdo or current theme. This behavior can be
149 * set by elm_toolbar_icon_order_lookup_set function. If an absolute path is
150 * provided it will load it direct from a file.
151 *
152 * @note This function does not accept relative icon path.
153 *
154 * @param[in] obj The object.
155 * @param[in] icon A string with icon name or the absolute path of an image
156 * file.
157 *
158 * @ingroup Elm_Toolbar_Item
159 */
160EOAPI void elm_obj_toolbar_item_icon_set(Eo *obj, const char *icon);
161
162/**
163 * @brief Get the string used to set the icon of @c item.
164 *
165 * @param[in] obj The object.
166 *
167 * @return A string with icon name or the absolute path of an image file.
168 *
169 * @ingroup Elm_Toolbar_Item
170 */
171EOAPI const char *elm_obj_toolbar_item_icon_get(const Eo *obj);
172
173/**
174 * @brief Get the real Evas(Edje) object created to implement the view of a
175 * given toolbar @c item.
176 *
177 * @param[in] obj The object.
178 *
179 * @return The base Edje object associated with @c it.
180 *
181 * @ingroup Elm_Toolbar_Item
182 */
183EOAPI Efl_Canvas_Object *elm_obj_toolbar_item_object_get(const Eo *obj);
184
185/**
186 * @brief Get the icon object of @c item.
187 *
188 * See also @ref elm_obj_toolbar_item_icon_set,
189 * @ref elm_obj_toolbar_item_icon_file_set,
190 * @ref elm_obj_toolbar_item_icon_memfile_set.
191 *
192 * @param[in] obj The object.
193 *
194 * @return The icon object.
195 *
196 * @ingroup Elm_Toolbar_Item
197 */
198EOAPI Efl_Canvas_Object *elm_obj_toolbar_item_icon_object_get(const Eo *obj);
199
200/**
201 * @brief Set or unset item as a separator.
202 *
203 * Items aren't set as separator by default.
204 *
205 * If set as separator it will display separator theme, so won't display icons
206 * or label.
207 *
208 * @param[in] obj The object.
209 * @param[in] separator @c true if the item is a separator, @c false otherwise
210 *
211 * @ingroup Elm_Toolbar_Item
212 */
213EOAPI void elm_obj_toolbar_item_separator_set(Eo *obj, Eina_Bool separator);
214
215/**
216 * @brief Get a value whether item is a separator or not.
217 *
218 * @param[in] obj The object.
219 *
220 * @return @c true if the item is a separator, @c false otherwise
221 *
222 * @ingroup Elm_Toolbar_Item
223 */
224EOAPI Eina_Bool elm_obj_toolbar_item_separator_get(const Eo *obj);
225
226/**
227 * @brief Get toolbar item's menu.
228 *
229 * If @c item wasn't set as menu item with @ref elm_obj_toolbar_item_menu_set,
230 * this function will set it.
231 *
232 * @param[in] obj The object.
233 *
234 * @return Item's menu object or @c null on failure.
235 *
236 * @ingroup Elm_Toolbar_Item
237 */
238EOAPI Efl_Canvas_Object *elm_obj_toolbar_item_menu_get(const Eo *obj);
239
240/**
241 * @brief Set @c state as the current state of @c it.
242 *
243 * If @c state is @c NULL, it won't select any state and the default item's
244 * icon and label will be used. It's the behavior as @ref
245 * elm_toolbar_item_state_unset.
246 *
247 * @param[in] obj The object.
248 * @param[in] state Item state
249 *
250 * @return @c true on success, @c false otherwise
251 *
252 * @ingroup Elm_Toolbar_Item
253 */
254EOAPI Eina_Bool elm_obj_toolbar_item_state_set(Eo *obj, Elm_Toolbar_Item_State *state);
255
256/**
257 * @brief Get the current state of @c it.
258 *
259 * @param[in] obj The object.
260 *
261 * @return Item state
262 *
263 * @ingroup Elm_Toolbar_Item
264 */
265EOAPI Elm_Toolbar_Item_State *elm_obj_toolbar_item_state_get(const Eo *obj);
266
267/**
268 * @brief Set the icon associated with @c item to an image in a binary buffer.
269 *
270 * @note The icon image set by this function can be changed by
271 * @ref elm_obj_toolbar_item_icon_set.
272 *
273 * @param[in] obj The object.
274 * @param[in] img The binary data that will be used as an image.
275 * @param[in] size The size of binary data @c img.
276 * @param[in] format Optional format of @c img to pass to the image loader.
277 * @param[in] key Optional key of @c img to pass to the image loader (eg. if
278 * @c img is an edje file).
279 *
280 * @return @c true on success, @c false otherwise
281 *
282 * @ingroup Elm_Toolbar_Item
283 */
284EOAPI Eina_Bool elm_obj_toolbar_item_icon_memfile_set(Eo *obj, const void *img, size_t size, const char *format, const char *key);
285
286/**
287 * @brief Set the icon associated with @c item to an image in a binary buffer.
288 *
289 * @note The icon image set by this function can be changed by
290 * elm_toolbar_item_icon_set().
291 *
292 * @param[in] obj The object.
293 * @param[in] file The file that contains the image.
294 * @param[in] key Optional key of @c img to pass to the image loader (eg. if
295 * @c img is an edje file).
296 *
297 * @return @c true on success, @c false otherwise
298 *
299 * @ingroup Elm_Toolbar_Item
300 */
301EOAPI Eina_Bool elm_obj_toolbar_item_icon_file_set(Eo *obj, const char *file, const char *key);
302
303/**
304 * @brief Add a new state to @c item.
305 *
306 * Toolbar will load icon image from fdo or current theme. This behavior can be
307 * set by elm_toolbar_icon_order_lookup_set function. If an absolute path is
308 * provided it will load it direct from a file.
309 *
310 * States created with this function can be removed with
311 * @ref elm_obj_toolbar_item_state_del.
312 *
313 * @param[in] obj The object.
314 * @param[in] icon A string with icon name or the absolute path of an image
315 * file.
316 * @param[in] label The label of the new state.
317 * @param[in] func The function to call when the item is clicked when this
318 * state is selected.
319 * @param[in] data The data to associate with the state.
320 *
321 * @return The toolbar item state, or @c null upon failure.
322 *
323 * @ingroup Elm_Toolbar_Item
324 */
325EOAPI Elm_Toolbar_Item_State *elm_obj_toolbar_item_state_add(Eo *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
326
327/**
328 * @brief Delete a previously added state to @c item.
329 *
330 * @param[in] obj The object.
331 * @param[in] state The state to be deleted.
332 *
333 * @return @c true on success or @c false on failure.
334 *
335 * @ingroup Elm_Toolbar_Item
336 */
337EOAPI Eina_Bool elm_obj_toolbar_item_state_del(Eo *obj, Elm_Toolbar_Item_State *state);
338
339/**
340 * @brief Get the state after selected state in toolbar's @c item.
341 *
342 * If last state is selected, this function will return first state.
343 *
344 * @param[in] obj The object.
345 *
346 * @return The state after current state, or @c null on failure.
347 *
348 * @ingroup Elm_Toolbar_Item
349 */
350EOAPI Elm_Toolbar_Item_State *elm_obj_toolbar_item_state_next(Eo *obj);
351
352/**
353 * @brief Get the state before selected state in toolbar's @c item.
354 *
355 * If first state is selected, this function will return last state.
356 *
357 * @param[in] obj The object.
358 *
359 * @return The state before current state, or @c null on failure.
360 *
361 * @ingroup Elm_Toolbar_Item
362 */
363EOAPI Elm_Toolbar_Item_State *elm_obj_toolbar_item_state_prev(Eo *obj);
364
365/**
366 * @brief Show a specific item, when the toolbar can be scrolled.
367 *
368 * @param[in] obj The object.
369 * @param[in] scrollto The position the item should appear at.
370 *
371 * @since 1.8
372 *
373 * @ingroup Elm_Toolbar_Item
374 */
375EOAPI void elm_obj_toolbar_item_show(Eo *obj, Elm_Toolbar_Item_Scrollto_Type scrollto);
376
377/**
378 * @brief Show a specific item with scroll animation, when the toolbar can be
379 * scrolled.
380 *
381 * @param[in] obj The object.
382 * @param[in] scrollto The position the item should appear at.
383 *
384 * @since 1.8
385 *
386 * @ingroup Elm_Toolbar_Item
387 */
388EOAPI void elm_obj_toolbar_item_bring_in(Eo *obj, Elm_Toolbar_Item_Scrollto_Type scrollto);
389
390/**
391 * @brief Set whether the toolbar item opens a menu.
392 *
393 * A toolbar item can be set to be a menu, using this function.
394 *
395 * Once it is set to be a menu, it can be manipulated through the menu-like
396 * function @ref elm_obj_toolbar_menu_parent_set and the other elm_menu
397 * functions, using the Evas_Object @c menu returned by
398 * @ref elm_obj_toolbar_item_menu_get.
399 *
400 * So, items to be displayed in this item's menu should be added with @ref
401 * elm_menu_item_add.
402 *
403 * @param[in] obj The object.
404 * @param[in] menu If @c true, @c item will opens a menu when selected.
405 *
406 * @ingroup Elm_Toolbar_Item
407 */
408EOAPI void elm_obj_toolbar_item_menu_set(Eo *obj, Eina_Bool menu);
409
410#endif
diff --git a/src/lib/elementary/elm_toolbar_item_eo.legacy.c b/src/lib/elementary/elm_toolbar_item_eo.legacy.c
new file mode 100644
index 0000000..ebb4d64
--- /dev/null
+++ b/src/lib/elementary/elm_toolbar_item_eo.legacy.c
@@ -0,0 +1,144 @@
1
2EAPI Elm_Widget_Item *
3elm_toolbar_item_prev_get(const Elm_Toolbar_Item *obj)
4{
5 return elm_obj_toolbar_item_prev_get(obj);
6}
7
8EAPI Elm_Widget_Item *
9elm_toolbar_item_next_get(const Elm_Toolbar_Item *obj)
10{
11 return elm_obj_toolbar_item_next_get(obj);
12}
13
14EAPI void
15elm_toolbar_item_selected_set(Elm_Toolbar_Item *obj, Eina_Bool selected)
16{
17 elm_obj_toolbar_item_selected_set(obj, selected);
18}
19
20EAPI Eina_Bool
21elm_toolbar_item_selected_get(const Elm_Toolbar_Item *obj)
22{
23 return elm_obj_toolbar_item_selected_get(obj);
24}
25
26EAPI void
27elm_toolbar_item_priority_set(Elm_Toolbar_Item *obj, int priority)
28{
29 elm_obj_toolbar_item_priority_set(obj, priority);
30}
31
32EAPI int
33elm_toolbar_item_priority_get(const Elm_Toolbar_Item *obj)
34{
35 return elm_obj_toolbar_item_priority_get(obj);
36}
37
38EAPI void
39elm_toolbar_item_icon_set(Elm_Toolbar_Item *obj, const char *icon)
40{
41 elm_obj_toolbar_item_icon_set(obj, icon);
42}
43
44EAPI const char *
45elm_toolbar_item_icon_get(const Elm_Toolbar_Item *obj)
46{
47 return elm_obj_toolbar_item_icon_get(obj);
48}
49
50EAPI Efl_Canvas_Object *
51elm_toolbar_item_object_get(const Elm_Toolbar_Item *obj)
52{
53 return elm_obj_toolbar_item_object_get(obj);
54}
55
56EAPI Efl_Canvas_Object *
57elm_toolbar_item_icon_object_get(const Elm_Toolbar_Item *obj)
58{
59 return elm_obj_toolbar_item_icon_object_get(obj);
60}
61
62EAPI void
63elm_toolbar_item_separator_set(Elm_Toolbar_Item *obj, Eina_Bool separator)
64{
65 elm_obj_toolbar_item_separator_set(obj, separator);
66}
67
68EAPI Eina_Bool
69elm_toolbar_item_separator_get(const Elm_Toolbar_Item *obj)
70{
71 return elm_obj_toolbar_item_separator_get(obj);
72}
73
74EAPI Efl_Canvas_Object *
75elm_toolbar_item_menu_get(const Elm_Toolbar_Item *obj)
76{
77 return elm_obj_toolbar_item_menu_get(obj);
78}
79
80EAPI Eina_Bool
81elm_toolbar_item_state_set(Elm_Toolbar_Item *obj, Elm_Toolbar_Item_State *state)
82{
83 return elm_obj_toolbar_item_state_set(obj, state);
84}
85
86EAPI Elm_Toolbar_Item_State *
87elm_toolbar_item_state_get(const Elm_Toolbar_Item *obj)
88{
89 return elm_obj_toolbar_item_state_get(obj);
90}
91
92EAPI Eina_Bool
93elm_toolbar_item_icon_memfile_set(Elm_Toolbar_Item *obj, const void *img, size_t size, const char *format, const char *key)
94{
95 return elm_obj_toolbar_item_icon_memfile_set(obj, img, size, format, key);
96}
97
98EAPI Eina_Bool
99elm_toolbar_item_icon_file_set(Elm_Toolbar_Item *obj, const char *file, const char *key)
100{
101 return elm_obj_toolbar_item_icon_file_set(obj, file, key);
102}
103
104EAPI Elm_Toolbar_Item_State *
105elm_toolbar_item_state_add(Elm_Toolbar_Item *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
106{
107 return elm_obj_toolbar_item_state_add(obj, icon, label, func, data);
108}
109
110EAPI Eina_Bool
111elm_toolbar_item_state_del(Elm_Toolbar_Item *obj, Elm_Toolbar_Item_State *state)
112{
113 return elm_obj_toolbar_item_state_del(obj, state);
114}
115
116EAPI Elm_Toolbar_Item_State *
117elm_toolbar_item_state_next(Elm_Toolbar_Item *obj)
118{
119 return elm_obj_toolbar_item_state_next(obj);
120}
121
122EAPI Elm_Toolbar_Item_State *
123elm_toolbar_item_state_prev(Elm_Toolbar_Item *obj)
124{
125 return elm_obj_toolbar_item_state_prev(obj);
126}
127
128EAPI void
129elm_toolbar_item_show(Elm_Toolbar_Item *obj, Elm_Toolbar_Item_Scrollto_Type scrollto)
130{
131 elm_obj_toolbar_item_show(obj, scrollto);
132}
133
134EAPI void
135elm_toolbar_item_bring_in(Elm_Toolbar_Item *obj, Elm_Toolbar_Item_Scrollto_Type scrollto)
136{
137 elm_obj_toolbar_item_bring_in(obj, scrollto);
138}
139
140EAPI void
141elm_toolbar_item_menu_set(Elm_Toolbar_Item *obj, Eina_Bool menu)
142{
143 elm_obj_toolbar_item_menu_set(obj, menu);
144}
diff --git a/src/lib/elementary/elm_toolbar_item_eo.legacy.h b/src/lib/elementary/elm_toolbar_item_eo.legacy.h
new file mode 100644
index 0000000..8caac89
--- /dev/null
+++ b/src/lib/elementary/elm_toolbar_item_eo.legacy.h
@@ -0,0 +1,401 @@
1#ifndef _ELM_TOOLBAR_ITEM_EO_LEGACY_H_
2#define _ELM_TOOLBAR_ITEM_EO_LEGACY_H_
3
4#ifndef _ELM_TOOLBAR_ITEM_EO_CLASS_TYPE
5#define _ELM_TOOLBAR_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Toolbar_Item;
8
9#endif
10
11#ifndef _ELM_TOOLBAR_ITEM_EO_TYPES
12#define _ELM_TOOLBAR_ITEM_EO_TYPES
13
14/** Defines where to position the item in the toolbar.
15 *
16 * @ingroup Elm
17 */
18typedef enum
19{
20 ELM_TOOLBAR_ITEM_SCROLLTO_NONE = 0, /**< no scrollto */
21 ELM_TOOLBAR_ITEM_SCROLLTO_IN = 1 /* 1 >> 0 */, /**< to the nearest viewport */
22 ELM_TOOLBAR_ITEM_SCROLLTO_FIRST = 2 /* 1 >> 1 */, /**< to the first of
23 * viewport */
24 ELM_TOOLBAR_ITEM_SCROLLTO_MIDDLE = 4 /* 1 >> 2 */, /**< to the middle of
25 * viewport */
26 ELM_TOOLBAR_ITEM_SCROLLTO_LAST = 8 /* 1 >> 3 */ /**< to the last of viewport
27 */
28} Elm_Toolbar_Item_Scrollto_Type;
29
30/** State of a Elm_Toolbar_Item. Can be created with
31 * elm_toolbar_item_state_add() and removed with elm_toolbar_item_state_del().
32 *
33 * @ingroup Elm
34 */
35typedef struct _Elm_Toolbar_Item_State
36{
37 const char *label; /**< Item label */
38 const char *icon_str; /**< Item icon string */
39 Efl_Canvas_Object *icon; /**< Item icon */
40 Evas_Smart_Cb func; /**< Item callback function */
41 const void *data; /**< Item data */
42} Elm_Toolbar_Item_State;
43
44
45#endif
46
47/**
48 * @brief Get the item before this one in the widget's list of items.
49 *
50 * See also @ref elm_toolbar_item_next_get.
51 *
52 * @param[in] obj The object.
53 *
54 * @return The item before the object in its parent's list. If there is no
55 * previous item or in case of error, @c null is returned.
56 *
57 * @ingroup Elm_Toolbar_Item_Group
58 */
59EAPI Elm_Widget_Item *elm_toolbar_item_prev_get(const Elm_Toolbar_Item *obj);
60
61/**
62 * @brief Get the item after this one in the widget's list of items.
63 *
64 * See also @ref elm_toolbar_item_prev_get.
65 *
66 * @param[in] obj The object.
67 *
68 * @return The item after the object in its parent's list. If there is no next
69 * item or in case of error, @c null is returned.
70 *
71 * @ingroup Elm_Toolbar_Item_Group
72 */
73EAPI Elm_Widget_Item *elm_toolbar_item_next_get(const Elm_Toolbar_Item *obj);
74
75/**
76 * @brief Indicates whether this item is currently selected.
77 *
78 * Set the selected state of @c item.
79 *
80 * This sets the selected state of the given item @c it. @c true for selected,
81 * @c false for not selected.
82 *
83 * If a new item is selected the previously selected will be unselected.
84 * Previously selected item can be retrieved with
85 * @ref elm_toolbar_selected_item_get.
86 *
87 * Selected items will be highlighted.
88 *
89 * @param[in] obj The object.
90 * @param[in] selected The selection state.
91 *
92 * @ingroup Elm_Toolbar_Item_Group
93 */
94EAPI void elm_toolbar_item_selected_set(Elm_Toolbar_Item *obj, Eina_Bool selected);
95
96/**
97 * @brief Indicates whether this item is currently selected.
98 *
99 * Get the selected state of this item.
100 *
101 * @param[in] obj The object.
102 *
103 * @return The selection state.
104 *
105 * @ingroup Elm_Toolbar_Item_Group
106 */
107EAPI Eina_Bool elm_toolbar_item_selected_get(const Elm_Toolbar_Item *obj);
108
109/**
110 * @brief Set the priority of a toolbar item.
111 *
112 * This is used only when the toolbar shrink mode is set to
113 * #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE. When space is less
114 * than required, items with low priority will be removed from the toolbar and
115 * added to a dynamically-created menu, while items with higher priority will
116 * remain on the toolbar, with the same order they were added.
117 *
118 * @param[in] obj The object.
119 * @param[in] priority The @c item priority. The default is zero for set and 0
120 * is returned on failure.
121 *
122 * @ingroup Elm_Toolbar_Item_Group
123 */
124EAPI void elm_toolbar_item_priority_set(Elm_Toolbar_Item *obj, int priority);
125
126/**
127 * @brief Get the priority of a toolbar item.
128 *
129 * @param[in] obj The object.
130 *
131 * @return The @c item priority. The default is zero for set and 0 is returned
132 * on failure.
133 *
134 * @ingroup Elm_Toolbar_Item_Group
135 */
136EAPI int elm_toolbar_item_priority_get(const Elm_Toolbar_Item *obj);
137
138/**
139 * @brief Set the icon associated with @c item.
140 *
141 * Toolbar will load icon image from fdo or current theme. This behavior can be
142 * set by elm_toolbar_icon_order_lookup_set function. If an absolute path is
143 * provided it will load it direct from a file.
144 *
145 * @note This function does not accept relative icon path.
146 *
147 * @param[in] obj The object.
148 * @param[in] icon A string with icon name or the absolute path of an image
149 * file.
150 *
151 * @ingroup Elm_Toolbar_Item_Group
152 */
153EAPI void elm_toolbar_item_icon_set(Elm_Toolbar_Item *obj, const char *icon);
154
155/**
156 * @brief Get the string used to set the icon of @c item.
157 *
158 * @param[in] obj The object.
159 *
160 * @return A string with icon name or the absolute path of an image file.
161 *
162 * @ingroup Elm_Toolbar_Item_Group
163 */
164EAPI const char *elm_toolbar_item_icon_get(const Elm_Toolbar_Item *obj);
165
166/**
167 * @brief Get the real Evas(Edje) object created to implement the view of a
168 * given toolbar @c item.
169 *
170 * @param[in] obj The object.
171 *
172 * @return The base Edje object associated with @c it.
173 *
174 * @ingroup Elm_Toolbar_Item_Group
175 */
176EAPI Efl_Canvas_Object *elm_toolbar_item_object_get(const Elm_Toolbar_Item *obj);
177
178/**
179 * @brief Get the icon object of @c item.
180 *
181 * See also @ref elm_toolbar_item_icon_set,
182 * @ref elm_toolbar_item_icon_file_set, @ref elm_toolbar_item_icon_memfile_set.
183 *
184 * @param[in] obj The object.
185 *
186 * @return The icon object.
187 *
188 * @ingroup Elm_Toolbar_Item_Group
189 */
190EAPI Efl_Canvas_Object *elm_toolbar_item_icon_object_get(const Elm_Toolbar_Item *obj);
191
192/**
193 * @brief Set or unset item as a separator.
194 *
195 * Items aren't set as separator by default.
196 *
197 * If set as separator it will display separator theme, so won't display icons
198 * or label.
199 *
200 * @param[in] obj The object.
201 * @param[in] separator @c true if the item is a separator, @c false otherwise
202 *
203 * @ingroup Elm_Toolbar_Item_Group
204 */
205EAPI void elm_toolbar_item_separator_set(Elm_Toolbar_Item *obj, Eina_Bool separator);
206
207/**
208 * @brief Get a value whether item is a separator or not.
209 *
210 * @param[in] obj The object.
211 *
212 * @return @c true if the item is a separator, @c false otherwise
213 *
214 * @ingroup Elm_Toolbar_Item_Group
215 */
216EAPI Eina_Bool elm_toolbar_item_separator_get(const Elm_Toolbar_Item *obj);
217
218/**
219 * @brief Get toolbar item's menu.
220 *
221 * If @c item wasn't set as menu item with @ref elm_toolbar_item_menu_set, this
222 * function will set it.
223 *
224 * @param[in] obj The object.
225 *
226 * @return Item's menu object or @c null on failure.
227 *
228 * @ingroup Elm_Toolbar_Item_Group
229 */
230EAPI Efl_Canvas_Object *elm_toolbar_item_menu_get(const Elm_Toolbar_Item *obj);
231
232/**
233 * @brief Set @c state as the current state of @c it.
234 *
235 * If @c state is @c NULL, it won't select any state and the default item's
236 * icon and label will be used. It's the behavior as @ref
237 * elm_toolbar_item_state_unset.
238 *
239 * @param[in] obj The object.
240 * @param[in] state Item state
241 *
242 * @return @c true on success, @c false otherwise
243 *
244 * @ingroup Elm_Toolbar_Item_Group
245 */
246EAPI Eina_Bool elm_toolbar_item_state_set(Elm_Toolbar_Item *obj, Elm_Toolbar_Item_State *state);
247
248/**
249 * @brief Get the current state of @c it.
250 *
251 * @param[in] obj The object.
252 *
253 * @return Item state
254 *
255 * @ingroup Elm_Toolbar_Item_Group
256 */
257EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_get(const Elm_Toolbar_Item *obj);
258
259/**
260 * @brief Set the icon associated with @c item to an image in a binary buffer.
261 *
262 * @note The icon image set by this function can be changed by
263 * @ref elm_toolbar_item_icon_set.
264 *
265 * @param[in] obj The object.
266 * @param[in] img The binary data that will be used as an image.
267 * @param[in] size The size of binary data @c img.
268 * @param[in] format Optional format of @c img to pass to the image loader.
269 * @param[in] key Optional key of @c img to pass to the image loader (eg. if
270 * @c img is an edje file).
271 *
272 * @return @c true on success, @c false otherwise
273 *
274 * @ingroup Elm_Toolbar_Item_Group
275 */
276EAPI Eina_Bool elm_toolbar_item_icon_memfile_set(Elm_Toolbar_Item *obj, const void *img, size_t size, const char *format, const char *key);
277
278/**
279 * @brief Set the icon associated with @c item to an image in a binary buffer.
280 *
281 * @note The icon image set by this function can be changed by
282 * elm_toolbar_item_icon_set().
283 *
284 * @param[in] obj The object.
285 * @param[in] file The file that contains the image.
286 * @param[in] key Optional key of @c img to pass to the image loader (eg. if
287 * @c img is an edje file).
288 *
289 * @return @c true on success, @c false otherwise
290 *
291 * @ingroup Elm_Toolbar_Item_Group
292 */
293EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Toolbar_Item *obj, const char *file, const char *key);
294
295/**
296 * @brief Add a new state to @c item.
297 *
298 * Toolbar will load icon image from fdo or current theme. This behavior can be
299 * set by elm_toolbar_icon_order_lookup_set function. If an absolute path is
300 * provided it will load it direct from a file.
301 *
302 * States created with this function can be removed with
303 * @ref elm_toolbar_item_state_del.
304 *
305 * @param[in] obj The object.
306 * @param[in] icon A string with icon name or the absolute path of an image
307 * file.
308 * @param[in] label The label of the new state.
309 * @param[in] func The function to call when the item is clicked when this
310 * state is selected.
311 * @param[in] data The data to associate with the state.
312 *
313 * @return The toolbar item state, or @c null upon failure.
314 *
315 * @ingroup Elm_Toolbar_Item_Group
316 */
317EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_add(Elm_Toolbar_Item *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
318
319/**
320 * @brief Delete a previously added state to @c item.
321 *
322 * @param[in] obj The object.
323 * @param[in] state The state to be deleted.
324 *
325 * @return @c true on success or @c false on failure.
326 *
327 * @ingroup Elm_Toolbar_Item_Group
328 */
329EAPI Eina_Bool elm_toolbar_item_state_del(Elm_Toolbar_Item *obj, Elm_Toolbar_Item_State *state);
330
331/**
332 * @brief Get the state after selected state in toolbar's @c item.
333 *
334 * If last state is selected, this function will return first state.
335 *
336 * @param[in] obj The object.
337 *
338 * @return The state after current state, or @c null on failure.
339 *
340 * @ingroup Elm_Toolbar_Item_Group
341 */
342EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Toolbar_Item *obj);
343
344/**
345 * @brief Get the state before selected state in toolbar's @c item.
346 *
347 * If first state is selected, this function will return last state.
348 *
349 * @param[in] obj The object.
350 *
351 * @return The state before current state, or @c null on failure.
352 *
353 * @ingroup Elm_Toolbar_Item_Group
354 */
355EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Toolbar_Item *obj);
356
357