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:15:18 -0800
commitbb85bb6b1df3e201f26d20569974c642fc3d4c72 (patch)
tree75e41a392e578623a2725af4b0d01719e6bcb7b8
parentbb3e70352395192ff86e9ee0953dd3c0e291009e (diff)
elm_gengrid*: 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/D8169
-rw-r--r--src/Makefile_Efl_Mono.am2
-rw-r--r--src/Makefile_Elementary.am14
-rw-r--r--src/lib/elementary/elc_fileselector.c2
-rw-r--r--src/lib/elementary/elm_focus_legacy.c2
-rw-r--r--src/lib/elementary/elm_gengrid.c12
-rw-r--r--src/lib/elementary/elm_gengrid.eo553
-rw-r--r--src/lib/elementary/elm_gengrid_eo.c517
-rw-r--r--src/lib/elementary/elm_gengrid_eo.h782
-rw-r--r--src/lib/elementary/elm_gengrid_eo.legacy.c228
-rw-r--r--src/lib/elementary/elm_gengrid_eo.legacy.h627
-rw-r--r--src/lib/elementary/elm_gengrid_item.eo236
-rw-r--r--src/lib/elementary/elm_gengrid_item_eo.c243
-rw-r--r--src/lib/elementary/elm_gengrid_item_eo.h315
-rw-r--r--src/lib/elementary/elm_gengrid_item_eo.legacy.c102
-rw-r--r--src/lib/elementary/elm_gengrid_item_eo.legacy.h308
-rw-r--r--src/lib/elementary/elm_gengrid_legacy.h4
-rw-r--r--src/lib/elementary/elm_gengrid_pan.eo18
-rw-r--r--src/lib/elementary/elm_gengrid_pan_eo.c67
-rw-r--r--src/lib/elementary/elm_gengrid_pan_eo.h24
-rw-r--r--src/lib/elementary/elm_gengrid_pan_eo.legacy.h17
-rw-r--r--src/lib/elementary/elm_main.c2
-rw-r--r--src/lib/elementary/elm_widget_item_static_focus.c2
-rw-r--r--src/lib/elementary/meson.build9
23 files changed, 3260 insertions, 826 deletions
diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am
index 56c03fb..7784abd 100644
--- a/src/Makefile_Efl_Mono.am
+++ b/src/Makefile_Efl_Mono.am
@@ -176,7 +176,7 @@ lib/elementary/elm_list.eo.cs \
176lib/elementary/elm_genlist.eo.cs \ 176lib/elementary/elm_genlist.eo.cs \
177lib/elementary/elm_view_list.eo.cs \ 177lib/elementary/elm_view_list.eo.cs \
178lib/elementary/elm_genlist_item.eo.cs \ 178lib/elementary/elm_genlist_item.eo.cs \
179lib/elementary/elm_gengrid.eo.cs \ 179lib/elementary/elm_gengrid_eo.cs \
180lib/elementary/elm_glview.eo.cs 180lib/elementary/elm_glview.eo.cs
181 181
182efl_mono_blacklisted_files = \ 182efl_mono_blacklisted_files = \
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 69e65ad..8be3b90 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -187,8 +187,6 @@ elm_private_eolian_files = \
187elm_legacy_eolian_files = \ 187elm_legacy_eolian_files = \
188 lib/elementary/efl_ui_clock_legacy.eo \ 188 lib/elementary/efl_ui_clock_legacy.eo \
189 lib/elementary/elm_interface_fileselector.eo \ 189 lib/elementary/elm_interface_fileselector.eo \
190 lib/elementary/elm_gengrid.eo \
191 lib/elementary/elm_gengrid_pan.eo \
192 lib/elementary/elm_genlist.eo \ 190 lib/elementary/elm_genlist.eo \
193 lib/elementary/elm_genlist_pan.eo \ 191 lib/elementary/elm_genlist_pan.eo \
194 lib/elementary/elm_gesture_layer.eo \ 192 lib/elementary/elm_gesture_layer.eo \
@@ -215,7 +213,6 @@ elm_legacy_eolian_files = \
215 lib/elementary/elm_index_item.eo \ 213 lib/elementary/elm_index_item.eo \
216 lib/elementary/elm_widget_item_static_focus.eo \ 214 lib/elementary/elm_widget_item_static_focus.eo \
217 lib/elementary/elm_genlist_item.eo \ 215 lib/elementary/elm_genlist_item.eo \
218 lib/elementary/elm_gengrid_item.eo \
219 lib/elementary/elm_list_item.eo \ 216 lib/elementary/elm_list_item.eo \
220 lib/elementary/elm_popup_item.eo \ 217 lib/elementary/elm_popup_item.eo \
221 lib/elementary/elm_ctxpopup_part.eo \ 218 lib/elementary/elm_ctxpopup_part.eo \
@@ -349,6 +346,11 @@ lib/elementary/elm_flipselector_eo.legacy.c \
349lib/elementary/elm_flipselector_eo.c \ 346lib/elementary/elm_flipselector_eo.c \
350lib/elementary/elm_flipselector_item_eo.legacy.c \ 347lib/elementary/elm_flipselector_item_eo.legacy.c \
351lib/elementary/elm_flipselector_item_eo.c \ 348lib/elementary/elm_flipselector_item_eo.c \
349lib/elementary/elm_gengrid_eo.legacy.c \
350lib/elementary/elm_gengrid_eo.c \
351lib/elementary/elm_gengrid_item_eo.legacy.c \
352lib/elementary/elm_gengrid_item_eo.c \
353lib/elementary/elm_gengrid_pan_eo.c \
352lib/elementary/elm_hoversel_eo.c \ 354lib/elementary/elm_hoversel_eo.c \
353lib/elementary/elm_hoversel_item_eo.c \ 355lib/elementary/elm_hoversel_item_eo.c \
354lib/elementary/elm_hoversel_item_eo.legacy.c 356lib/elementary/elm_hoversel_item_eo.legacy.c
@@ -444,6 +446,12 @@ lib/elementary/elm_flipselector_eo.h \
444lib/elementary/elm_flipselector_eo.legacy.h \ 446lib/elementary/elm_flipselector_eo.legacy.h \
445lib/elementary/elm_flipselector_item_eo.h \ 447lib/elementary/elm_flipselector_item_eo.h \
446lib/elementary/elm_flipselector_item_eo.legacy.h \ 448lib/elementary/elm_flipselector_item_eo.legacy.h \
449lib/elementary/elm_gengrid_eo.h \
450lib/elementary/elm_gengrid_eo.legacy.h \
451lib/elementary/elm_gengrid_item_eo.h \
452lib/elementary/elm_gengrid_item_eo.legacy.h \
453lib/elementary/elm_gengrid_pan_eo.h \
454lib/elementary/elm_gengrid_pan_eo.legacy.h \
447lib/elementary/elm_hoversel_eo.h \ 455lib/elementary/elm_hoversel_eo.h \
448lib/elementary/elm_hoversel_eo.legacy.h \ 456lib/elementary/elm_hoversel_eo.legacy.h \
449lib/elementary/elm_hoversel_item_eo.h \ 457lib/elementary/elm_hoversel_item_eo.h \
diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c
index 9df3e4a..cf6b58e 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -24,7 +24,7 @@
24#include "elm_entry_eo.h" 24#include "elm_entry_eo.h"
25#include "elm_fileselector_eo.h" 25#include "elm_fileselector_eo.h"
26#include "elm_genlist.eo.h" 26#include "elm_genlist.eo.h"
27#include "elm_gengrid.eo.h" 27#include "elm_gengrid_eo.h"
28 28
29#include "elm_fileselector_part.eo.h" 29#include "elm_fileselector_part.eo.h"
30#include "elm_part_helper.h" 30#include "elm_part_helper.h"
diff --git a/src/lib/elementary/elm_focus_legacy.c b/src/lib/elementary/elm_focus_legacy.c
index df9c90b..3a3db6e 100644
--- a/src/lib/elementary/elm_focus_legacy.c
+++ b/src/lib/elementary/elm_focus_legacy.c
@@ -7,7 +7,7 @@
7 7
8//we need those for legacy compatible code 8//we need those for legacy compatible code
9#include "elm_genlist.eo.h" 9#include "elm_genlist.eo.h"
10#include "elm_gengrid.eo.h" 10#include "elm_gengrid_eo.h"
11 11
12#define API_ENTRY()\ 12#define API_ENTRY()\
13 EINA_SAFETY_ON_NULL_RETURN(obj); \ 13 EINA_SAFETY_ON_NULL_RETURN(obj); \
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index a88d110..fe0d426 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -15,9 +15,9 @@
15#include "elm_interface_scrollable.h" 15#include "elm_interface_scrollable.h"
16#include "efl_ui_focus_parent_provider_gen.eo.h" 16#include "efl_ui_focus_parent_provider_gen.eo.h"
17#include "efl_ui_focus_composition_adapter.eo.h" 17#include "efl_ui_focus_composition_adapter.eo.h"
18#include "elm_gengrid_item.eo.h" 18#include "elm_gengrid_item_eo.h"
19#include "elm_gengrid_pan.eo.h" 19#include "elm_gengrid_pan_eo.h"
20#include "elm_gengrid.eo.h" 20#include "elm_gengrid_eo.h"
21 21
22#define MY_PAN_CLASS ELM_GENGRID_PAN_CLASS 22#define MY_PAN_CLASS ELM_GENGRID_PAN_CLASS
23 23
@@ -2307,7 +2307,7 @@ _elm_gengrid_pan_class_constructor(Efl_Class *klass)
2307 evas_smart_legacy_type_register(MY_PAN_CLASS_NAME_LEGACY, klass); 2307 evas_smart_legacy_type_register(MY_PAN_CLASS_NAME_LEGACY, klass);
2308} 2308}
2309 2309
2310#include "elm_gengrid_pan.eo.c" 2310#include "elm_gengrid_pan_eo.c"
2311 2311
2312static void 2312static void
2313_elm_gengrid_item_focused(Elm_Object_Item *eo_it) 2313_elm_gengrid_item_focused(Elm_Object_Item *eo_it)
@@ -5865,5 +5865,5 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_gengrid, Elm_Gengrid_Data)
5865 ELM_LAYOUT_SIZING_EVAL_OPS(elm_gengrid), \ 5865 ELM_LAYOUT_SIZING_EVAL_OPS(elm_gengrid), \
5866 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_gengrid) 5866 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_gengrid)
5867 5867
5868#include "elm_gengrid.eo.c" 5868#include "elm_gengrid_eo.c"
5869#include "elm_gengrid_item.eo.c" 5869#include "elm_gengrid_item_eo.c"
diff --git a/src/lib/elementary/elm_gengrid.eo b/src/lib/elementary/elm_gengrid.eo
deleted file mode 100644
index 3ec2adb..0000000
--- a/src/lib/elementary/elm_gengrid.eo
+++ /dev/null
@@ -1,553 +0,0 @@
1import elm_general;
2
3type @extern Ecore_Pos_Map: __undefined_type; [[External ecore position map]]
4
5enum Elm.Gengrid.Reorder_Type
6{
7 [[Gengrid reorder modes]]
8 normal, [[Normal reorder type]]
9 swap [[Swap reorder type]]
10}
11
12class Elm.Gengrid extends Efl.Ui.Layout_Base implements Efl.Ui.Focus.Composition, Elm.Interface_Scrollable,
13 Efl.Ui.Clickable, Efl.Access.Widget.Action,
14 Efl.Access.Selection, Efl.Ui.Legacy, Elm.Widget_Item_Container
15{
16 [[Elementary gengrid class]]
17 legacy_prefix: elm_gengrid;
18 eo_prefix: elm_obj_gengrid;
19 event_prefix: elm_gengrid;
20 methods {
21 @property align {
22 set {
23 [[Set the items grid's alignment within a given gengrid widget.
24
25 This sets the alignment of the whole grid of items of a gengrid
26 within its given viewport. By default, those values are both
27 0.5, meaning that the gengrid will have its items grid placed
28 exactly in the middle of its viewport.
29
30 Note: If given alignment values are out of the cited ranges,
31 they'll be changed to the nearest boundary values on the valid
32 ranges.
33 ]]
34 }
35 get {
36 [[Get the items grid's alignment values within a given gengrid
37 widget.
38
39 Note: Use $null pointers on the alignment values you're not
40 interested in: they'll be ignored by the function.
41 ]]
42 }
43 values {
44 align_x: double; [[Alignment in the horizontal axis (0 <= align_x <= 1).]]
45 align_y: double; [[Alignment in the vertical axis (0 <= align_y <= 1).]]
46 }
47 }
48 @property filled {
49 set {
50 [[Set how the items grid's filled within a given gengrid widget
51
52 This sets the fill state of the whole grid of items of a
53 gengrid within its given viewport. By default, this value
54 is false, meaning that if the first line of items grid's
55 isn't filled, the items are centered with the alignment.
56 ]]
57 }
58 get {
59 [[Get how the items grid's filled within a given gengrid widget
60
61 Note: Use $null pointers on the alignment values you're not
62 interested in: they'll be ignored by the function.
63 ]]
64 }
65 values {
66 fill: bool; [[$true if the grid is filled, $false otherwise]]
67 }
68 }
69 @property multi_select {
70 set {
71 [[Enable or disable multi-selection in a given gengrid widget.
72
73 Multi-selection is the ability to have more than one item
74 selected, on a given gengrid, simultaneously. When it is
75 enabled, a sequence of clicks on different items will make
76 them all selected, progressively. A click on an already
77 selected item will unselect it. If interacting via the
78 keyboard, multi-selection is enabled while holding the
79 "Shift" key.
80
81 Note: By default, multi-selection is disabled on gengrids.
82 ]]
83 }
84 get {
85 [[Get whether multi-selection is enabled or disabled for a given
86 gengrid widget.
87 ]]
88 }
89 values {
90 multi: bool; [[$true if multislect is enabled, $false otherwise]]
91 }
92 }
93 @property group_item_size {
94 set {
95 [[Set the size for the group items of a given gengrid widget.
96
97 A gengrid, after creation, has still no information on the size
98 to give to each of its cells. So, you most probably will end up
99 with squares one \@ref Fingers "finger" wide, the default
100 size. Use this function to force a custom size for you group
101 items, making them as big as you wish.
102 ]]
103 }
104 get {
105 [[Get the size set for the group items of a given gengrid widget.
106
107 Note: Use $null pointers on the size values you're not
108 interested in: they'll be ignored by the function.
109 ]]
110 }
111 values {
112 w: int; [[The group items' width.]]
113 h: int; [[The group items' height.]]
114 }
115 }
116 @property select_mode {
117 set {
118 [[Set the gengrid select mode.
119
120 This changes item select mode in the gengrid widget.
121 #ELM_OBJECT_SELECT_MODE_DEFAULT means that items will only
122 call their selection func and callback when first becoming
123 selected. Any further clicks will do nothing, unless you set
124 always select mode. #ELM_OBJECT_SELECT_MODE_ALWAYS means that
125 even if selected, every click will make the selected callbacks
126 be called. #ELM_OBJECT_SELECT_MODE_NONE will turn off the
127 ability to select items entirely and they will neither appear
128 selected nor call selected callback functions.
129 ]]
130 }
131 get {
132 [[Get the gengrid select mode.]]
133 }
134 values {
135 mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The select mode.]]
136 }
137 }
138 @property reorder_mode {
139 set {
140 [[Set whether a given gengrid widget is or not able have items
141 reordered.
142
143 If a gengrid is set to allow reordering, a click held for more
144 than 0.5 over a given item will highlight it specially,
145 signaling the gengrid has entered the reordering state. From
146 that time on, the user will be able to, while still holding the
147 mouse button down, move the item freely in the gengrid's
148 viewport, replacing to said item to the locations it goes to.
149 The replacements will be animated and, whenever the user
150 releases the mouse button, the item being replaced gets a new
151 definitive place in the grid.
152 ]]
153 }
154 get {
155 [[Get whether a given gengrid widget is or not able have items
156 reordered.
157 ]]
158 }
159 values {
160 reorder_mode: bool; [[Use $true to turn reordering on,
161 $false to turn it off.]]
162 }
163 }
164 @property highlight_mode {
165 [[Control whether the gengrid items' should be highlighted when
166 item selected.
167 ]]
168 set {}
169 get {}
170 values {
171 highlight: bool; [[$true if item will be highlighted, $false otherwise]]
172 }
173 }
174 @property reorder_type {
175 set {
176 [[ Set the Gengrid reorder type
177 @since 1.11
178 ]]
179 }
180 values {
181 type: Elm.Gengrid.Reorder_Type; [[ Reorder type value ]]
182 }
183 }
184 @property item_size {
185 set {
186 [[Set the size for the items of a given gengrid widget.
187
188 A gengrid, after creation, has still no information on the size
189 to give to each of its cells. So, you most probably will end up
190 with squares one \@ref Fingers "finger" wide, the default
191 size. Use this function to force a custom size for you items,
192 making them as big as you wish.
193 ]]
194 }
195 get {
196 [[Get the size set for the items of a given gengrid widget.
197
198 Note: Use $null pointers on the size values you're not
199 interested in: they'll be ignored by the function.
200 ]]
201 }
202 values {
203 w: int; [[The items' width.]]
204 h: int; [[The items' height.]]
205 }
206 }
207 @property multi_select_mode {
208 set {
209 [[Set the gengrid multi select mode.
210
211 #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that
212 select/unselect items whenever each item is clicked.
213 #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL means that
214 only one item will be selected although multi-selection
215 is enabled, if clicked without pressing control key. This
216 mode is only available with multi-selection.
217
218 @since 1.8
219 ]]
220 }
221 get {
222 [[Get the gengrid multi select mode.
223
224 If getting mode fails, it returns
225 #ELM_OBJECT_MULTI_SELECT_MODE_MAX.
226
227 @since 1.8
228 ]]
229 }
230 values {
231 mode: Elm.Object.Multi_Select_Mode(Elm.Object.Multi_Select_Mode.max); [[The multi select mode.]]
232 }
233 }
234 @property horizontal {
235 set {
236 [[Set the direction in which a given gengrid widget will
237 expand while placing its items.
238
239 When in "horizontal mode" ($true), items will be placed in
240 columns, from top to bottom and, when the space for a column
241 is filled, another one is started on the right, thus expanding
242 the grid horizontally. When in "vertical mode" ($false),
243 though, items will be placed in rows, from left to right
244 and, when the space for a row is filled, another one is
245 started below, thus expanding the grid vertically.
246
247 Note: By default, gengrid is in vertical mode, $false.
248 ]]
249 }
250 get {
251 [[Get for what direction a given gengrid widget will expand while
252 placing its items.
253 ]]
254 }
255 values {
256 horizontal: bool; [[$true to make the gengrid expand horizontally,
257 $false to expand vertically.]]
258 }
259 }
260 @property selected_item {
261 get {
262 [[Get the selected item in a given gengrid widget.
263
264 This returns the selected item in $obj. If multi selection is
265 enabled on $obj (See @.multi_select.set), only the first item
266 in the list is selected, which might not be very useful. For
267 that case, see @.selected_items.get.
268 ]]
269 return: Elm.Widget.Item; [[The selected item's handle or $null
270 if none is selected at the moment
271 (and on errors).]]
272 }
273 }
274 @property realized_items {
275 get {
276 [[Get a list of realized items in gengrid.
277
278 This returns a list of the realized items in the gengrid. The
279 list contains gengrid item pointers. The list must be freed by
280 the caller when done with eina_list_free(). The item pointers
281 in the list are only valid so long as those items are not
282 deleted or the gengrid is not deleted.
283 ]]
284 return: list<ptr(Elm_Gen_Item)> @owned @warn_unused; [[
285 The list of realized items or $null if none are realized.
286 ]]
287 }
288 }
289 @property first_item {
290 get {
291 [[Get the first item in a given gengrid widget.
292
293 This returns the first item in the $obj's internal list of
294 items.
295 ]]
296 return: Elm.Widget.Item; [[
297 The first item's handle or $null, if there are no
298 items in $obj (and on errors)
299 ]]
300 }
301 }
302 @property selected_items {
303 get {
304 [[Get a list of selected items in a given gengrid.
305
306 This returns a list of the selected items, in the order that
307 they appear in the grid. This list is only valid as long as no
308 more items are selected or unselected (or unselected implicitly
309 by deletion). The list contains Gengrid item pointers as
310 data, naturally.
311 ]]
312 return: const(list<Elm.Widget.Item>); [[
313 The list of selected items or $null, if none is
314 selected at the moment (and on errors).
315 ]]
316 }
317 }
318 @property last_item {
319 get {
320 [[Get the last item in a given gengrid widget.
321
322 This returns the last item in the $obj's internal list of
323 items.
324 ]]
325 return: Elm.Widget.Item; [[The last item's handle or $null
326 if there are no items in $obj
327 (and on errors).]]
328 }
329 }
330 item_insert_before {
331 [[Insert an item before another in a gengrid widget.
332
333 This inserts an item before another in the gengrid.
334 ]]
335 return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
336 params {
337 @cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
338 @in data: const(void_ptr); [[The item data.]]
339 @in relative: Elm.Widget.Item; [[The item to place this new one before.]]
340 @in func: Evas_Smart_Cb @optional; [[Convenience function called
341 when the item is selected.]]
342 @in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
343 }
344 }
345 realized_items_update {
346 [[Update the contents of all realized items.
347
348 This updates all realized items by calling all the item class
349 functions again to get the contents, texts and states. Use this
350 when the original item data has changed and the changes are
351 desired to be reflected.
352
353 To update just one item, use \@ref elm_gengrid_item_update.
354 ]]
355 }
356 item_insert_after {
357 [[Insert an item after another in a gengrid widget.
358
359 This inserts an item after another in the gengrid.
360 ]]
361 return: Elm.Widget.Item; [[A handle to the item added or $null on error.]]
362 params {
363 @cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
364 @in data: const(void_ptr); [[The item data.]]
365 @in relative: Elm.Widget.Item; [[The item to place this new one after.]]
366 @in func: Evas_Smart_Cb @optional; [[Convenience function called
367 when the item is selected.]]
368 @in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
369 }
370 }
371 items_count @const {
372 [[Return how many items are currently in a list
373
374 This behavior is O(1) and includes items which may or may not
375 be realized.
376 ]]
377 return: uint; [[Items in list]]
378 }
379 at_xy_item_get @const {
380 [[Get the item that is at the x, y canvas coords.
381
382 This returns the item at the given coordinates (which are canvas
383 relative, not object-relative). If an item is at that coordinate,
384 that item handle is returned, and if $xposret is not $null, the
385 integer pointed to is set to a value of -1, 0 or 1, depending if
386 the coordinate is on the left portion of that item (-1), on the
387 middle section (0) or on the right part (1).
388
389 If $yposret is not $null, the integer pointed to is set to a
390 value of -1, 0 or 1, depending if the coordinate is on the upper
391 portion of that item (-1), on the middle section (0) or on the
392 lower part (1). If NULL is returned as an item (no item found
393 there), then posret may indicate -1 or 1 based if the coordinate
394 is above or below all items respectively in the gengrid.
395 ]]
396 return: Elm.Widget.Item; [[The item at the coordinates or $null if none.]]
397 params {
398 @in x: int; [[The input x coordinate.]]
399 @in y: int; [[The input y coordinate.]]
400 @out xposret: int; [[The position relative to the item returned here.]]
401 @out yposret: int; [[The position relative to the item returned here.]]
402 }
403 }
404 item_append {
405 [[Append a new item in a given gengrid widget.
406
407 This adds an item to the beginning of the gengrid.
408 ]]
409 return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
410 params {
411 @cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
412 @in data: const(void_ptr); [[The item data.]]
413 @in func: Evas_Smart_Cb @optional; [[Convenience function called
414 when the item is selected.]]
415 @in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
416 }
417 }
418 item_prepend {
419 [[Prepend a new item in a given gengrid widget.
420
421 This adds an item to the end of the gengrid.
422 ]]
423 return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
424 params {
425 @cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
426 @in data: const(void_ptr); [[The item data.]]
427 @in func: Evas_Smart_Cb @optional; [[Convenience function called
428 when the item is selected.]]
429 @in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
430 }
431 }
432 clear {
433 [[Remove all items from a given gengrid widget.
434
435 This removes (and deletes) all items in $obj, leaving it empty.
436
437 See \@ref elm_gengrid_item_del to remove just one item.
438 ]]
439 }
440 item_sorted_insert {
441 [[Insert an item in a gengrid widget using a user-defined sort
442 function.
443
444 This inserts an item in the gengrid based on user defined
445 comparison function. The two arguments passed to the function
446 $func are gengrid item handles to compare.
447 ]]
448 return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
449 params {
450 @cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
451 @in data: const(void_ptr); [[The item data.]]
452 @in comp: Eina_Compare_Cb; [[User defined comparison function
453 that defines the sort order based
454 on gengrid item and its data.
455 ]]
456 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
457 @in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
458 }
459 }
460 search_by_text_item_get {
461 [[Get gengrid item by given string.
462
463 It takes pointer to the gengrid item that will be used to start
464 search from it.
465
466 This function uses globs (like "*.jpg") for searching and takes
467 search flags as last parameter That is a bitfield with values
468 to be ored together or 0 for no flags.
469
470 @since 1.11
471 ]]
472 return: Elm.Widget.Item; [[Pointer to the gengrid item which matches
473 search_string in case of success,
474 otherwise $null.]]
475 params {
476 @in item_to_search_from: Elm.Widget.Item @optional; [[
477 Pointer to item to start search from. If $null, search will
478 be started from the first item of the gengrid.
479 ]]
480 @in part_name: string; [[Name of the TEXT part of gengrid item to search string in. If $null, search by "elm.text" parts.]]
481 @in pattern: string; [[The search pattern.]]
482 @in flags: Elm.Glob.Match_Flags; [[Search flags.]]
483 }
484 }
485 reorder_mode_start {
486 [[
487 Starts the reorder mode of Gengrid
488 @since 1.10
489 ]]
490 params {
491 @in tween_mode: Ecore_Pos_Map; [[ Position mappings for animation ]]
492 }
493 }
494 reorder_mode_stop {
495 [[
496 Stops the reorder mode of Gengrid
497 @since 1.10
498 ]]
499 }
500 }
501 implements {
502 class.constructor;
503 Efl.Object.constructor;
504 Efl.Object.provider_find;
505 Efl.Gfx.Entity.position { set; }
506 Efl.Gfx.Entity.size { set; }
507 Efl.Canvas.Group.group_member_add;
508 Efl.Ui.Widget.theme_apply;
509 Efl.Ui.Widget.on_access_update;
510 Efl.Ui.Widget.interest_region { get; }
511 Efl.Ui.Widget.widget_input_event_handler;
512 Efl.Ui.Widget.focus_highlight_geometry { get; }
513 Elm.Widget_Item_Container.focused_item { get; }
514 Elm.Interface_Scrollable.item_loop_enabled { get; set; }
515 Elm.Interface_Scrollable.bounce_allow { set; }
516 Elm.Interface_Scrollable.policy { get; set; }
517 Efl.Access.Object.access_children { get; }
518 Efl.Access.Object.state_set { get; }
519 Efl.Access.Widget.Action.elm_actions { get; }
520 Efl.Access.Selection.selected_children_count { get; }
521 Efl.Access.Selection.selected_child { get; }
522 Efl.Access.Selection.selected_child_deselect;
523 Efl.Access.Selection.child_select;
524 Efl.Access.Selection.child_deselect;
525 Efl.Access.Selection.is_child_selected;
526 Efl.Access.Selection.all_children_select;
527 Efl.Access.Selection.access_selection_clear;
528 Efl.Ui.Focus.Composition.prepare;
529 Efl.Ui.Widget.focus_state_apply;
530 Efl.Ui.Focus.Manager.setup_on_first_touch;
531 Efl.Ui.Focus.Manager.manager_focus { get; }
532 Efl.Ui.Focus.Manager.move;
533 }
534 events {
535 realized: Efl.Object; [[Called when gengrid realized]]
536 unrealized: Efl.Object; [[Called when gengrid unrealized]]
537 index,update: Efl.Object; [[Called on gengrid index update]]
538 scroll,page,changed: void; [[Called when scroll page changed]]
539 edge,bottom: void; [[Called when bottom edge is reached]]
540 edge,top: void; [[Called when top edge is reached]]
541 edge,right: void; [[Called when right edge is reached]]
542 edge,left: void; [[Called when left edge is reached]]
543 item,focused: Efl.Object; [[Called when item got focus]]
544 item,unfocused: Efl.Object; [[Called when item no longer has focus]]
545 item,reorder,anim,start: Efl.Object; [[Called when item reorder animation started]]
546 item,reorder,anim,stop: Efl.Object; [[Called when item reorder animation stopped]]
547 activated: Efl.Object; [[Called when gengrid got activated]]
548 highlighted: Efl.Object; [[Called when gengrid is highlighted]]
549 unhighlighted: Efl.Object; [[Called when gengrid is no longer highlighted]]
550 released: Efl.Object; [[Called when gengrid is released]]
551 moved: Efl.Object; [[Called when gengrid item moved]]
552 }
553}
diff --git a/src/lib/elementary/elm_gengrid_eo.c b/src/lib/elementary/elm_gengrid_eo.c
new file mode 100644
index 0000000..e22bd63
--- /dev/null
+++ b/src/lib/elementary/elm_gengrid_eo.c
@@ -0,0 +1,517 @@
1EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_REALIZED =
2 EFL_EVENT_DESCRIPTION("realized");
3EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_UNREALIZED =
4 EFL_EVENT_DESCRIPTION("unrealized");
5EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_INDEX_UPDATE =
6 EFL_EVENT_DESCRIPTION("index,update");
7EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED =
8 EFL_EVENT_DESCRIPTION("scroll,page,changed");
9EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_BOTTOM =
10 EFL_EVENT_DESCRIPTION("edge,bottom");
11EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_TOP =
12 EFL_EVENT_DESCRIPTION("edge,top");
13EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_RIGHT =
14 EFL_EVENT_DESCRIPTION("edge,right");
15EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_LEFT =
16 EFL_EVENT_DESCRIPTION("edge,left");
17EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_FOCUSED =
18 EFL_EVENT_DESCRIPTION("item,focused");
19EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_UNFOCUSED =
20 EFL_EVENT_DESCRIPTION("item,unfocused");
21EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START =
22 EFL_EVENT_DESCRIPTION("item,reorder,anim,start");
23EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP =
24 EFL_EVENT_DESCRIPTION("item,reorder,anim,stop");
25EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ACTIVATED =
26 EFL_EVENT_DESCRIPTION("activated");
27EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_HIGHLIGHTED =
28 EFL_EVENT_DESCRIPTION("highlighted");
29EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_UNHIGHLIGHTED =
30 EFL_EVENT_DESCRIPTION("unhighlighted");
31EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_RELEASED =
32 EFL_EVENT_DESCRIPTION("released");
33EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_MOVED =
34 EFL_EVENT_DESCRIPTION("moved");
35
36void _elm_gengrid_align_set(Eo *obj, Elm_Gengrid_Data *pd, double align_x, double align_y);
37
38EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_align_set, EFL_FUNC_CALL(align_x, align_y), double align_x, double align_y);
39
40void _elm_gengrid_align_get(const Eo *obj, Elm_Gengrid_Data *pd, double *align_x, double *align_y);
41
42EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_align_get, EFL_FUNC_CALL(align_x, align_y), double *align_x, double *align_y);
43
44void _elm_gengrid_filled_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool fill);
45
46
47static Eina_Error
48__eolian_elm_gengrid_filled_set_reflect(Eo *obj, Eina_Value val)
49{
50 Eina_Error r = 0; Eina_Bool cval;
51 if (!eina_value_bool_convert(&val, &cval))
52 {
53 r = EINA_ERROR_VALUE_FAILED;
54 goto end;
55 }
56 elm_obj_gengrid_filled_set(obj, cval);
57 end:
58 eina_value_flush(&val);
59 return r;
60}
61
62EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_filled_set, EFL_FUNC_CALL(fill), Eina_Bool fill);
63
64Eina_Bool _elm_gengrid_filled_get(const Eo *obj, Elm_Gengrid_Data *pd);
65
66
67static Eina_Value
68__eolian_elm_gengrid_filled_get_reflect(Eo *obj)
69{
70 Eina_Bool val = elm_obj_gengrid_filled_get(obj);
71 return eina_value_bool_init(val);
72}
73
74EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_filled_get, Eina_Bool, 0);
75
76void _elm_gengrid_multi_select_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool multi);
77
78
79static Eina_Error
80__eolian_elm_gengrid_multi_select_set_reflect(Eo *obj, Eina_Value val)
81{
82 Eina_Error r = 0; Eina_Bool cval;
83 if (!eina_value_bool_convert(&val, &cval))
84 {
85 r = EINA_ERROR_VALUE_FAILED;
86 goto end;
87 }
88 elm_obj_gengrid_multi_select_set(obj, cval);
89 end:
90 eina_value_flush(&val);
91 return r;
92}
93
94EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_multi_select_set, EFL_FUNC_CALL(multi), Eina_Bool multi);
95
96Eina_Bool _elm_gengrid_multi_select_get(const Eo *obj, Elm_Gengrid_Data *pd);
97
98
99static Eina_Value
100__eolian_elm_gengrid_multi_select_get_reflect(Eo *obj)
101{
102 Eina_Bool val = elm_obj_gengrid_multi_select_get(obj);
103 return eina_value_bool_init(val);
104}
105
106EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_multi_select_get, Eina_Bool, 0);
107
108void _elm_gengrid_group_item_size_set(Eo *obj, Elm_Gengrid_Data *pd, int w, int h);
109
110EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_group_item_size_set, EFL_FUNC_CALL(w, h), int w, int h);
111
112void _elm_gengrid_group_item_size_get(const Eo *obj, Elm_Gengrid_Data *pd, int *w, int *h);
113
114EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_group_item_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
115
116void _elm_gengrid_select_mode_set(Eo *obj, Elm_Gengrid_Data *pd, Elm_Object_Select_Mode mode);
117
118EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_select_mode_set, EFL_FUNC_CALL(mode), Elm_Object_Select_Mode mode);
119
120Elm_Object_Select_Mode _elm_gengrid_select_mode_get(const Eo *obj, Elm_Gengrid_Data *pd);
121
122EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_select_mode_get, Elm_Object_Select_Mode, 4 /* Elm.Object.Select_Mode.max */);
123
124void _elm_gengrid_reorder_mode_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool reorder_mode);
125
126
127static Eina_Error
128__eolian_elm_gengrid_reorder_mode_set_reflect(Eo *obj, Eina_Value val)
129{
130 Eina_Error r = 0; Eina_Bool cval;
131 if (!eina_value_bool_convert(&val, &cval))
132 {
133 r = EINA_ERROR_VALUE_FAILED;
134 goto end;
135 }
136 elm_obj_gengrid_reorder_mode_set(obj, cval);
137 end:
138 eina_value_flush(&val);
139 return r;
140}
141
142EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_reorder_mode_set, EFL_FUNC_CALL(reorder_mode), Eina_Bool reorder_mode);
143
144Eina_Bool _elm_gengrid_reorder_mode_get(const Eo *obj, Elm_Gengrid_Data *pd);
145
146
147static Eina_Value
148__eolian_elm_gengrid_reorder_mode_get_reflect(Eo *obj)
149{
150 Eina_Bool val = elm_obj_gengrid_reorder_mode_get(obj);
151 return eina_value_bool_init(val);
152}
153
154EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_reorder_mode_get, Eina_Bool, 0);
155
156void _elm_gengrid_highlight_mode_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool highlight);
157
158
159static Eina_Error
160__eolian_elm_gengrid_highlight_mode_set_reflect(Eo *obj, Eina_Value val)
161{
162 Eina_Error r = 0; Eina_Bool cval;
163 if (!eina_value_bool_convert(&val, &cval))
164 {
165 r = EINA_ERROR_VALUE_FAILED;
166 goto end;
167 }
168 elm_obj_gengrid_highlight_mode_set(obj, cval);
169 end:
170 eina_value_flush(&val);
171 return r;
172}
173
174EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_highlight_mode_set, EFL_FUNC_CALL(highlight), Eina_Bool highlight);
175
176Eina_Bool _elm_gengrid_highlight_mode_get(const Eo *obj, Elm_Gengrid_Data *pd);
177
178
179static Eina_Value
180__eolian_elm_gengrid_highlight_mode_get_reflect(Eo *obj)
181{
182 Eina_Bool val = elm_obj_gengrid_highlight_mode_get(obj);
183 return eina_value_bool_init(val);
184}
185
186EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_highlight_mode_get, Eina_Bool, 0);
187
188void _elm_gengrid_reorder_type_set(Eo *obj, Elm_Gengrid_Data *pd, Elm_Gengrid_Reorder_Type type);
189
190EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_reorder_type_set, EFL_FUNC_CALL(type), Elm_Gengrid_Reorder_Type type);
191
192void _elm_gengrid_item_size_set(Eo *obj, Elm_Gengrid_Data *pd, int w, int h);
193
194EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_size_set, EFL_FUNC_CALL(w, h), int w, int h);
195
196void _elm_gengrid_item_size_get(const Eo *obj, Elm_Gengrid_Data *pd, int *w, int *h);
197
198EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_item_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
199
200void _elm_gengrid_multi_select_mode_set(Eo *obj, Elm_Gengrid_Data *pd, Elm_Object_Multi_Select_Mode mode);
201
202EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_multi_select_mode_set, EFL_FUNC_CALL(mode), Elm_Object_Multi_Select_Mode mode);
203
204Elm_Object_Multi_Select_Mode _elm_gengrid_multi_select_mode_get(const Eo *obj, Elm_Gengrid_Data *pd);
205
206EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_multi_select_mode_get, Elm_Object_Multi_Select_Mode, 2 /* Elm.Object.Multi_Select_Mode.max */);
207
208void _elm_gengrid_horizontal_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool horizontal);
209
210
211static Eina_Error
212__eolian_elm_gengrid_horizontal_set_reflect(Eo *obj, Eina_Value val)
213{
214 Eina_Error r = 0; Eina_Bool cval;
215 if (!eina_value_bool_convert(&val, &cval))
216 {
217 r = EINA_ERROR_VALUE_FAILED;
218 goto end;
219 }
220 elm_obj_gengrid_horizontal_set(obj, cval);
221 end:
222 eina_value_flush(&val);
223 return r;
224}
225
226EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_horizontal_set, EFL_FUNC_CALL(horizontal), Eina_Bool horizontal);
227
228Eina_Bool _elm_gengrid_horizontal_get(const Eo *obj, Elm_Gengrid_Data *pd);
229
230
231static Eina_Value
232__eolian_elm_gengrid_horizontal_get_reflect(Eo *obj)
233{
234 Eina_Bool val = elm_obj_gengrid_horizontal_get(obj);
235 return eina_value_bool_init(val);
236}
237
238EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_horizontal_get, Eina_Bool, 0);
239
240Elm_Widget_Item *_elm_gengrid_selected_item_get(const Eo *obj, Elm_Gengrid_Data *pd);
241
242EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_selected_item_get, Elm_Widget_Item *, NULL);
243
244Eina_List *_elm_gengrid_realized_items_get(const Eo *obj, Elm_Gengrid_Data *pd);
245
246EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_realized_items_get, Eina_List *, NULL);
247
248Elm_Widget_Item *_elm_gengrid_first_item_get(const Eo *obj, Elm_Gengrid_Data *pd);
249
250EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_first_item_get, Elm_Widget_Item *, NULL);
251
252const Eina_List *_elm_gengrid_selected_items_get(const Eo *obj, Elm_Gengrid_Data *pd);
253
254EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_selected_items_get, const Eina_List *, NULL);
255
256Elm_Widget_Item *_elm_gengrid_last_item_get(const Eo *obj, Elm_Gengrid_Data *pd);
257
258EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_last_item_get, Elm_Widget_Item *, NULL);
259
260Elm_Widget_Item *_elm_gengrid_item_insert_before(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
261
262EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_insert_before, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, relative, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
263
264void _elm_gengrid_realized_items_update(Eo *obj, Elm_Gengrid_Data *pd);
265
266EOAPI EFL_VOID_FUNC_BODY(elm_obj_gengrid_realized_items_update);
267
268Elm_Widget_Item *_elm_gengrid_item_insert_after(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
269
270EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_insert_after, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, relative, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
271
272unsigned int _elm_gengrid_items_count(const Eo *obj, Elm_Gengrid_Data *pd);
273
274EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_items_count, unsigned int, 0);
275
276Elm_Widget_Item *_elm_gengrid_at_xy_item_get(const Eo *obj, Elm_Gengrid_Data *pd, int x, int y, int *xposret, int *yposret);
277
278EOAPI EFL_FUNC_BODYV_CONST(elm_obj_gengrid_at_xy_item_get, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(x, y, xposret, yposret), int x, int y, int *xposret, int *yposret);
279
280Elm_Widget_Item *_elm_gengrid_item_append(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
281
282EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_append, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
283
284Elm_Widget_Item *_elm_gengrid_item_prepend(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
285
286EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_prepend, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
287
288void _elm_gengrid_clear(Eo *obj, Elm_Gengrid_Data *pd);
289
290EOAPI EFL_VOID_FUNC_BODY(elm_obj_gengrid_clear);
291
292Elm_Widget_Item *_elm_gengrid_item_sorted_insert(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
293
294EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_sorted_insert, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, comp, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
295
296Elm_Widget_Item *_elm_gengrid_search_by_text_item_get(Eo *obj, Elm_Gengrid_Data *pd, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags);
297
298EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_search_by_text_item_get, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(item_to_search_from, part_name, pattern, flags), Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags);
299
300void _elm_gengrid_reorder_mode_start(Eo *obj, Elm_Gengrid_Data *pd, Ecore_Pos_Map tween_mode);
301
302EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_reorder_mode_start, EFL_FUNC_CALL(tween_mode), Ecore_Pos_Map tween_mode);
303
304void _elm_gengrid_reorder_mode_stop(Eo *obj, Elm_Gengrid_Data *pd);
305
306EOAPI EFL_VOID_FUNC_BODY(elm_obj_gengrid_reorder_mode_stop);
307
308Efl_Object *_elm_gengrid_efl_object_constructor(Eo *obj, Elm_Gengrid_Data *pd);
309
310
311Efl_Object *_elm_gengrid_efl_object_provider_find(const Eo *obj, Elm_Gengrid_Data *pd, const Efl_Class *klass);
312
313
314void _elm_gengrid_efl_gfx_entity_position_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Position2D pos);
315
316
317void _elm_gengrid_efl_gfx_entity_size_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Size2D size);
318
319
320void _elm_gengrid_efl_canvas_group_group_member_add(Eo *obj, Elm_Gengrid_Data *pd, Efl_Canvas_Object *sub_obj);
321
322
323Eina_Error _elm_gengrid_efl_ui_widget_theme_apply(Eo *obj, Elm_Gengrid_Data *pd);
324
325
326void _elm_gengrid_efl_ui_widget_on_access_update(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool enable);
327
328
329Eina_Rect _elm_gengrid_efl_ui_widget_interest_region_get(const Eo *obj, Elm_Gengrid_Data *pd);
330
331
332Eina_Bool _elm_gengrid_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Gengrid_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source);
333
334
335Eina_Rect _elm_gengrid_efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Gengrid_Data *pd);
336
337
338Elm_Widget_Item *_elm_gengrid_elm_widget_item_container_focused_item_get(const Eo *obj, Elm_Gengrid_Data *pd);
339
340
341void _elm_gengrid_elm_interface_scrollable_item_loop_enabled_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool enable);
342
343
344Eina_Bool _elm_gengrid_elm_interface_scrollable_item_loop_enabled_get(const Eo *obj, Elm_Gengrid_Data *pd);
345
346
347void _elm_gengrid_elm_interface_scrollable_bounce_allow_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool horiz, Eina_Bool vert);
348
349
350void _elm_gengrid_elm_interface_scrollable_policy_set(Eo *obj, Elm_Gengrid_Data *pd, Elm_Scroller_Policy hbar, Elm_Scroller_Policy vbar);
351
352
353void _elm_gengrid_elm_interface_scrollable_policy_get(const Eo *obj, Elm_Gengrid_Data *pd, Elm_Scroller_Policy *hbar, Elm_Scroller_Policy *vbar);
354
355
356Eina_List *_elm_gengrid_efl_access_object_access_children_get(const Eo *obj, Elm_Gengrid_Data *pd);
357
358
359Efl_Access_State_Set _elm_gengrid_efl_access_object_state_set_get(const Eo *obj, Elm_Gengrid_Data *pd);
360
361
362const Efl_Access_Action_Data *_elm_gengrid_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Gengrid_Data *pd);
363
364
365int _elm_gengrid_efl_access_selection_selected_children_count_get(const Eo *obj, Elm_Gengrid_Data *pd);
366
367
368Efl_Object *_elm_gengrid_efl_access_selection_selected_child_get(const Eo *obj, Elm_Gengrid_Data *pd, int selected_child_index);
369
370
371Eina_Bool _elm_gengrid_efl_access_selection_selected_child_deselect(Eo *obj, Elm_Gengrid_Data *pd, int child_index);
372
373
374Eina_Bool _elm_gengrid_efl_access_selection_child_select(Eo *obj, Elm_Gengrid_Data *pd, int child_index);
375
376
377Eina_Bool _elm_gengrid_efl_access_selection_child_deselect(Eo *obj, Elm_Gengrid_Data *pd, int child_index);
378
379
380Eina_Bool _elm_gengrid_efl_access_selection_is_child_selected(Eo *obj, Elm_Gengrid_Data *pd, int child_index);
381
382
383Eina_Bool _elm_gengrid_efl_access_selection_all_children_select(Eo *obj, Elm_Gengrid_Data *pd);
384
385
386Eina_Bool _elm_gengrid_efl_access_selection_access_selection_clear(Eo *obj, Elm_Gengrid_Data *pd);
387
388
389void _elm_gengrid_efl_ui_focus_composition_prepare(Eo *obj, Elm_Gengrid_Data *pd);
390
391
392Eina_Bool _elm_gengrid_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect);
393
394
395void _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Focus_Direction direction, Efl_Ui_Focus_Object *entry);
396
397
398Efl_Ui_Focus_Object *_elm_gengrid_efl_ui_focus_manager_manager_focus_get(const Eo *obj, Elm_Gengrid_Data *pd);
399
400
401Efl_Ui_Focus_Object *_elm_gengrid_efl_ui_focus_manager_move(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Focus_Direction direction);
402
403
404static Eina_Bool
405_elm_gengrid_class_initializer(Efl_Class *klass)
406{
407 const Efl_Object_Ops *opsp = NULL;
408
409 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
410
411#ifndef ELM_GENGRID_EXTRA_OPS
412#define ELM_GENGRID_EXTRA_OPS
413#endif
414
415 EFL_OPS_DEFINE(ops,
416 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_align_set, _elm_gengrid_align_set),
417 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_align_get, _elm_gengrid_align_get),
418 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_filled_set, _elm_gengrid_filled_set),
419 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_filled_get, _elm_gengrid_filled_get),
420 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_set, _elm_gengrid_multi_select_set),
421 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_get, _elm_gengrid_multi_select_get),
422 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_group_item_size_set, _elm_gengrid_group_item_size_set),
423 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_group_item_size_get, _elm_gengrid_group_item_size_get),
424 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_select_mode_set, _elm_gengrid_select_mode_set),
425 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_select_mode_get, _elm_gengrid_select_mode_get),
426 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_set, _elm_gengrid_reorder_mode_set),
427 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_get, _elm_gengrid_reorder_mode_get),
428 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_highlight_mode_set, _elm_gengrid_highlight_mode_set),
429 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_highlight_mode_get, _elm_gengrid_highlight_mode_get),
430 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_type_set, _elm_gengrid_reorder_type_set),
431 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_size_set, _elm_gengrid_item_size_set),
432 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_size_get, _elm_gengrid_item_size_get),
433 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_mode_set, _elm_gengrid_multi_select_mode_set),
434 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_mode_get, _elm_gengrid_multi_select_mode_get),
435 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_horizontal_set, _elm_gengrid_horizontal_set),
436 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_horizontal_get, _elm_gengrid_horizontal_get),
437 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_selected_item_get, _elm_gengrid_selected_item_get),
438 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_realized_items_get, _elm_gengrid_realized_items_get),
439 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_first_item_get, _elm_gengrid_first_item_get),
440 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_selected_items_get, _elm_gengrid_selected_items_get),
441 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_last_item_get, _elm_gengrid_last_item_get),
442 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_insert_before, _elm_gengrid_item_insert_before),
443 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_realized_items_update, _elm_gengrid_realized_items_update),
444 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_insert_after, _elm_gengrid_item_insert_after),
445 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_items_count, _elm_gengrid_items_count),
446 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_at_xy_item_get, _elm_gengrid_at_xy_item_get),
447 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_append, _elm_gengrid_item_append),
448 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_prepend, _elm_gengrid_item_prepend),
449 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_clear, _elm_gengrid_clear),
450 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_sorted_insert, _elm_gengrid_item_sorted_insert),
451 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_search_by_text_item_get, _elm_gengrid_search_by_text_item_get),
452 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_start, _elm_gengrid_reorder_mode_start),
453 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_stop, _elm_gengrid_reorder_mode_stop),
454 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_gengrid_efl_object_constructor),
455 EFL_OBJECT_OP_FUNC(efl_provider_find, _elm_gengrid_efl_object_provider_find),
456 EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_gengrid_efl_gfx_entity_position_set),
457 EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_gengrid_efl_gfx_entity_size_set),
458 EFL_OBJECT_OP_FUNC(efl_canvas_group_member_add, _elm_gengrid_efl_canvas_group_group_member_add),
459 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_gengrid_efl_ui_widget_theme_apply),
460 EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_gengrid_efl_ui_widget_on_access_update),
461 EFL_OBJECT_OP_FUNC(efl_ui_widget_interest_region_get, _elm_gengrid_efl_ui_widget_interest_region_get),
462 EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_gengrid_efl_ui_widget_widget_input_event_handler),
463 EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_highlight_geometry_get, _elm_gengrid_efl_ui_widget_focus_highlight_geometry_get),
464 EFL_OBJECT_OP_FUNC(elm_widget_item_container_focused_item_get, _elm_gengrid_elm_widget_item_container_focused_item_get),
465 EFL_OBJECT_OP_FUNC(elm_interface_scrollable_item_loop_enabled_set, _elm_gengrid_elm_interface_scrollable_item_loop_enabled_set),
466 EFL_OBJECT_OP_FUNC(elm_interface_scrollable_item_loop_enabled_get, _elm_gengrid_elm_interface_scrollable_item_loop_enabled_get),
467 EFL_OBJECT_OP_FUNC(elm_interface_scrollable_bounce_allow_set, _elm_gengrid_elm_interface_scrollable_bounce_allow_set),
468 EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_set, _elm_gengrid_elm_interface_scrollable_policy_set),
469 EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_get, _elm_gengrid_elm_interface_scrollable_policy_get),
470 EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_gengrid_efl_access_object_access_children_get),
471 EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_gengrid_efl_access_object_state_set_get),
472 EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_gengrid_efl_access_widget_action_elm_actions_get),
473 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_children_count_get, _elm_gengrid_efl_access_selection_selected_children_count_get),
474 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_get, _elm_gengrid_efl_access_selection_selected_child_get),
475 EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_deselect, _elm_gengrid_efl_access_selection_selected_child_deselect),
476 EFL_OBJECT_OP_FUNC(efl_access_selection_child_select, _elm_gengrid_efl_access_selection_child_select),
477 EFL_OBJECT_OP_FUNC(efl_access_selection_child_deselect, _elm_gengrid_efl_access_selection_child_deselect),
478 EFL_OBJECT_OP_FUNC(efl_access_selection_is_child_selected, _elm_gengrid_efl_access_selection_is_child_selected),
479 EFL_OBJECT_OP_FUNC(efl_access_selection_all_children_select, _elm_gengrid_efl_access_selection_all_children_select),
480 EFL_OBJECT_OP_FUNC(efl_access_selection_clear, _elm_gengrid_efl_access_selection_access_selection_clear),
481 EFL_OBJECT_OP_FUNC(efl_ui_focus_composition_prepare, _elm_gengrid_efl_ui_focus_composition_prepare),
482 EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_state_apply, _elm_gengrid_efl_ui_widget_focus_state_apply),
483 EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_setup_on_first_touch, _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch),
484 EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_focus_get, _elm_gengrid_efl_ui_focus_manager_manager_focus_get),
485 EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_move, _elm_gengrid_efl_ui_focus_manager_move),
486 ELM_GENGRID_EXTRA_OPS
487 );
488 opsp = &ops;
489
490 static const Efl_Object_Property_Reflection refl_table[] = {
491 {"filled", __eolian_elm_gengrid_filled_set_reflect, __eolian_elm_gengrid_filled_get_reflect},
492 {"multi_select", __eolian_elm_gengrid_multi_select_set_reflect, __eolian_elm_gengrid_multi_select_get_reflect},
493 {"reorder_mode", __eolian_elm_gengrid_reorder_mode_set_reflect, __eolian_elm_gengrid_reorder_mode_get_reflect},
494 {"highlight_mode", __eolian_elm_gengrid_highlight_mode_set_reflect, __eolian_elm_gengrid_highlight_mode_get_reflect},
495 {"horizontal", __eolian_elm_gengrid_horizontal_set_reflect, __eolian_elm_gengrid_horizontal_get_reflect},
496 };
497 static const Efl_Object_Property_Reflection_Ops rops = {
498 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
499 };
500 ropsp = &rops;
501
502 return efl_class_functions_set(klass, opsp, ropsp);
503}
504
505static const Efl_Class_Description _elm_gengrid_class_desc = {
506 EO_VERSION,
507 "Elm.Gengrid",
508 EFL_CLASS_TYPE_REGULAR,
509 sizeof(Elm_Gengrid_Data),
510 _elm_gengrid_class_initializer,
511 _elm_gengrid_class_constructor,
512 NULL
513};
514
515EFL_DEFINE_CLASS(elm_gengrid_class_get, &_elm_gengrid_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_FOCUS_COMPOSITION_MIXIN, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_ACCESS_SELECTION_INTERFACE, EFL_UI_LEGACY_INTERFACE, ELM_WIDGET_ITEM_CONTAINER_INTERFACE, NULL);
516
517#include "elm_gengrid_eo.legacy.c"
diff --git a/src/lib/elementary/elm_gengrid_eo.h b/src/lib/elementary/elm_gengrid_eo.h
new file mode 100644
index 0000000..340a273
--- /dev/null
+++ b/src/lib/elementary/elm_gengrid_eo.h
@@ -0,0 +1,782 @@
1#ifndef _ELM_GENGRID_EO_H_
2#define _ELM_GENGRID_EO_H_
3
4#ifndef _ELM_GENGRID_EO_CLASS_TYPE
5#define _ELM_GENGRID_EO_CLASS_TYPE
6
7typedef Eo Elm_Gengrid;
8
9#endif
10
11#ifndef _ELM_GENGRID_EO_TYPES
12#define _ELM_GENGRID_EO_TYPES
13
14/** Gengrid reorder modes
15 *
16 * @ingroup Elm_Gengrid
17 */
18typedef enum
19{
20 ELM_GENGRID_REORDER_TYPE_NORMAL = 0, /**< Normal reorder type */
21 ELM_GENGRID_REORDER_TYPE_SWAP /**< Swap reorder type */
22} Elm_Gengrid_Reorder_Type;
23
24
25#endif
26/** Elementary gengrid class
27 *
28 * @ingroup Elm_Gengrid
29 */
30#define ELM_GENGRID_CLASS elm_gengrid_class_get()
31
32EWAPI const Efl_Class *elm_gengrid_class_get(void);
33
34/**
35 * @brief Set the items grid's alignment within a given gengrid widget.
36 *
37 * This sets the alignment of the whole grid of items of a gengrid within its
38 * given viewport. By default, those values are both 0.5, meaning that the
39 * gengrid will have its items grid placed exactly in the middle of its
40 * viewport.
41 *
42 * @note If given alignment values are out of the cited ranges, they'll be
43 * changed to the nearest boundary values on the valid ranges.
44 *
45 * @param[in] obj The object.
46 * @param[in] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
47 * @param[in] align_y Alignment in the vertical axis (0 <= align_y <= 1).
48 *
49 * @ingroup Elm_Gengrid
50 */
51EOAPI void elm_obj_gengrid_align_set(Eo *obj, double align_x, double align_y);
52
53/**
54 * @brief Get the items grid's alignment values within a given gengrid widget.
55 *
56 * @note Use @c null pointers on the alignment values you're not interested in:
57 * they'll be ignored by the function.
58 *
59 * @param[in] obj The object.
60 * @param[out] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
61 * @param[out] align_y Alignment in the vertical axis (0 <= align_y <= 1).
62 *
63 * @ingroup Elm_Gengrid
64 */
65EOAPI void elm_obj_gengrid_align_get(const Eo *obj, double *align_x, double *align_y);
66
67/**
68 * @brief Set how the items grid's filled within a given gengrid widget
69 *
70 * This sets the fill state of the whole grid of items of a gengrid within its
71 * given viewport. By default, this value is false, meaning that if the first
72 * line of items grid's isn't filled, the items are centered with the
73 * alignment.
74 *
75 * @param[in] obj The object.
76 * @param[in] fill @c true if the grid is filled, @c false otherwise
77 *
78 * @ingroup Elm_Gengrid
79 */
80EOAPI void elm_obj_gengrid_filled_set(Eo *obj, Eina_Bool fill);
81
82/**
83 * @brief Get how the items grid's filled within a given gengrid widget
84 *
85 * @note Use @c null pointers on the alignment values you're not interested in:
86 * they'll be ignored by the function.
87 *
88 * @param[in] obj The object.
89 *
90 * @return @c true if the grid is filled, @c false otherwise
91 *
92 * @ingroup Elm_Gengrid
93 */
94EOAPI Eina_Bool elm_obj_gengrid_filled_get(const Eo *obj);
95
96/**
97 * @brief Enable or disable multi-selection in a given gengrid widget.
98 *
99 * Multi-selection is the ability to have more than one item selected, on a
100 * given gengrid, simultaneously. When it is enabled, a sequence of clicks on
101 * different items will make them all selected, progressively. A click on an
102 * already selected item will unselect it. If interacting via the keyboard,
103 * multi-selection is enabled while holding the "Shift" key.
104 *
105 * @note By default, multi-selection is disabled on gengrids.
106 *
107 * @param[in] obj The object.
108 * @param[in] multi @c true if multislect is enabled, @c false otherwise
109 *
110 * @ingroup Elm_Gengrid
111 */
112EOAPI void elm_obj_gengrid_multi_select_set(Eo *obj, Eina_Bool multi);
113
114/**
115 * @brief Get whether multi-selection is enabled or disabled for a given
116 * gengrid widget.
117 *
118 * @param[in] obj The object.
119 *
120 * @return @c true if multislect is enabled, @c false otherwise
121 *
122 * @ingroup Elm_Gengrid
123 */
124EOAPI Eina_Bool elm_obj_gengrid_multi_select_get(const Eo *obj);
125
126/**
127 * @brief Set the size for the group items of a given gengrid widget.
128 *
129 * A gengrid, after creation, has still no information on the size to give to
130 * each of its cells. So, you most probably will end up with squares one @ref
131 * Fingers "finger" wide, the default size. Use this function to force a custom
132 * size for you group items, making them as big as you wish.
133 *
134 * @param[in] obj The object.
135 * @param[in] w The group items' width.
136 * @param[in] h The group items' height.
137 *
138 * @ingroup Elm_Gengrid
139 */
140EOAPI void elm_obj_gengrid_group_item_size_set(Eo *obj, int w, int h);
141
142/**
143 * @brief Get the size set for the group items of a given gengrid widget.
144 *
145 * @note Use @c null pointers on the size values you're not interested in:
146 * they'll be ignored by the function.
147 *
148 * @param[in] obj The object.
149 * @param[out] w The group items' width.
150 * @param[out] h The group items' height.
151 *
152 * @ingroup Elm_Gengrid
153 */
154EOAPI void elm_obj_gengrid_group_item_size_get(const Eo *obj, int *w, int *h);
155
156/**
157 * @brief Set the gengrid select mode.
158 *
159 * This changes item select mode in the gengrid widget.
160 * #ELM_OBJECT_SELECT_MODE_DEFAULT means that items will only call their
161 * selection func and callback when first becoming selected. Any further clicks
162 * will do nothing, unless you set always select mode.
163 * #ELM_OBJECT_SELECT_MODE_ALWAYS means that even if selected, every click will
164 * make the selected callbacks be called. #ELM_OBJECT_SELECT_MODE_NONE will
165 * turn off the ability to select items entirely and they will neither appear
166 * selected nor call selected callback functions.
167 *
168 * @param[in] obj The object.
169 * @param[in] mode The select mode.
170 *
171 * @ingroup Elm_Gengrid
172 */
173EOAPI void elm_obj_gengrid_select_mode_set(Eo *obj, Elm_Object_Select_Mode mode);
174
175/**
176 * @brief Get the gengrid select mode.
177 *
178 * @param[in] obj The object.
179 *
180 * @return The select mode.
181 *
182 * @ingroup Elm_Gengrid
183 */
184EOAPI Elm_Object_Select_Mode elm_obj_gengrid_select_mode_get(const Eo *obj);
185
186/**
187 * @brief Set whether a given gengrid widget is or not able have items
188 * reordered.
189 *
190 * If a gengrid is set to allow reordering, a click held for more than 0.5 over
191 * a given item will highlight it specially, signaling the gengrid has entered
192 * the reordering state. From that time on, the user will be able to, while
193 * still holding the mouse button down, move the item freely in the gengrid's
194 * viewport, replacing to said item to the locations it goes to. The
195 * replacements will be animated and, whenever the user releases the mouse
196 * button, the item being replaced gets a new definitive place in the grid.
197 *
198 * @param[in] obj The object.
199 * @param[in] reorder_mode Use @c true to turn reordering on, @c false to turn
200 * it off.
201 *
202 * @ingroup Elm_Gengrid
203 */
204EOAPI void elm_obj_gengrid_reorder_mode_set(Eo *obj, Eina_Bool reorder_mode);
205
206/**
207 * @brief Get whether a given gengrid widget is or not able have items
208 * reordered.
209 *
210 * @param[in] obj The object.
211 *
212 * @return Use @c true to turn reordering on, @c false to turn it off.
213 *
214 * @ingroup Elm_Gengrid
215 */
216EOAPI Eina_Bool elm_obj_gengrid_reorder_mode_get(const Eo *obj);
217
218/**
219 * @brief Control whether the gengrid items' should be highlighted when item
220 * selected.
221 *
222 * @param[in] obj The object.
223 * @param[in] highlight @c true if item will be highlighted, @c false otherwise
224 *
225 * @ingroup Elm_Gengrid
226 */
227EOAPI void elm_obj_gengrid_highlight_mode_set(Eo *obj, Eina_Bool highlight);
228
229/**
230 * @brief Control whether the gengrid items' should be highlighted when item
231 * selected.
232 *
233 * @param[in] obj The object.
234 *
235 * @return @c true if item will be highlighted, @c false otherwise
236 *
237 * @ingroup Elm_Gengrid
238 */
239EOAPI Eina_Bool elm_obj_gengrid_highlight_mode_get(const Eo *obj);
240
241/**
242 * @brief Set the Gengrid reorder type
243 *
244 * @param[in] obj The object.
245 * @param[in] type Reorder type value
246 *
247 * @since 1.11
248 *
249 * @ingroup Elm_Gengrid
250 */
251EOAPI void elm_obj_gengrid_reorder_type_set(Eo *obj, Elm_Gengrid_Reorder_Type type);
252
253/**
254 * @brief Set the size for the items of a given gengrid widget.
255 *
256 * A gengrid, after creation, has still no information on the size to give to
257 * each of its cells. So, you most probably will end up with squares one @ref
258 * Fingers "finger" wide, the default size. Use this function to force a custom
259 * size for you items, making them as big as you wish.
260 *
261 * @param[in] obj The object.
262 * @param[in] w The items' width.
263 * @param[in] h The items' height.
264 *
265 * @ingroup Elm_Gengrid
266 */
267EOAPI void elm_obj_gengrid_item_size_set(Eo *obj, int w, int h);
268
269/**
270 * @brief Get the size set for the items of a given gengrid widget.
271 *
272 * @note Use @c null pointers on the size values you're not interested in:
273 * they'll be ignored by the function.
274 *
275 * @param[in] obj The object.
276 * @param[out] w The items' width.
277 * @param[out] h The items' height.
278 *
279 * @ingroup Elm_Gengrid
280 */
281EOAPI void elm_obj_gengrid_item_size_get(const Eo *obj, int *w, int *h);
282
283/**
284 * @brief Set the gengrid multi select mode.
285 *
286 * #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that select/unselect items
287 * whenever each item is clicked. #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL
288 * means that only one item will be selected although multi-selection is
289 * enabled, if clicked without pressing control key. This mode is only
290 * available with multi-selection.
291 *
292 * @param[in] obj The object.
293 * @param[in] mode The multi select mode.
294 *
295 * @since 1.8
296 *
297 * @ingroup Elm_Gengrid
298 */
299EOAPI void elm_obj_gengrid_multi_select_mode_set(Eo *obj, Elm_Object_Multi_Select_Mode mode);
300
301/**
302 * @brief Get the gengrid multi select mode.
303 *
304 * If getting mode fails, it returns #ELM_OBJECT_MULTI_SELECT_MODE_MAX.
305 *
306 * @param[in] obj The object.
307 *
308 * @return The multi select mode.
309 *
310 * @since 1.8
311 *
312 * @ingroup Elm_Gengrid
313 */
314EOAPI Elm_Object_Multi_Select_Mode elm_obj_gengrid_multi_select_mode_get(const Eo *obj);
315
316/**
317 * @brief Set the direction in which a given gengrid widget will expand while
318 * placing its items.
319 *
320 * When in "horizontal mode" ($true), items will be placed in columns, from top
321 * to bottom and, when the space for a column is filled, another one is started
322 * on the right, thus expanding the grid horizontally. When in "vertical mode"
323 * ($false), though, items will be placed in rows, from left to right and, when
324 * the space for a row is filled, another one is started below, thus expanding
325 * the grid vertically.
326 *
327 * @note By default, gengrid is in vertical mode, @c false.
328 *
329 * @param[in] obj The object.
330 * @param[in] horizontal @c true to make the gengrid expand horizontally,
331 * @c false to expand vertically.
332 *
333 * @ingroup Elm_Gengrid
334 */
335EOAPI void elm_obj_gengrid_horizontal_set(Eo *obj, Eina_Bool horizontal);
336
337/**
338 * @brief Get for what direction a given gengrid widget will expand while
339 * placing its items.
340 *
341 * @param[in] obj The object.
342 *
343 * @return @c true to make the gengrid expand horizontally, @c false to expand
344 * vertically.
345 *
346 * @ingroup Elm_Gengrid
347 */
348EOAPI Eina_Bool elm_obj_gengrid_horizontal_get(const Eo *obj);
349
350/**
351 * @brief Get the selected item in a given gengrid widget.
352 *
353 * This returns the selected item in @c obj. If multi selection is enabled on
354 * @c obj (See @ref elm_obj_gengrid_multi_select_set), only the first item in
355 * the list is selected, which might not be very useful. For that case, see
356 * @ref elm_obj_gengrid_selected_items_get.
357 *
358 * @param[in] obj The object.
359 *
360 * @return The selected item's handle or @c null if none is selected at the
361 * moment (and on errors).
362 *
363 * @ingroup Elm_Gengrid
364 */
365EOAPI Elm_Widget_Item *elm_obj_gengrid_selected_item_get(const Eo *obj);
366
367/**
368 * @brief Get a list of realized items in gengrid.
369 *
370 * This returns a list of the realized items in the gengrid. The list contains
371 * gengrid item pointers. The list must be freed by the caller when done with
372 * eina_list_free(). The item pointers in the list are only valid so long as
373 * those items are not deleted or the gengrid is not deleted.
374 *
375 * @param[in] obj The object.
376 *
377 * @return The list of realized items or @c null if none are realized.
378 *
379 * @ingroup Elm_Gengrid
380 */
381EOAPI Eina_List *elm_obj_gengrid_realized_items_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
382
383/**
384 * @brief Get the first item in a given gengrid widget.
385 *
386 * This returns the first item in the @c obj's internal list of items.
387 *
388 * @param[in] obj The object.
389 *
390 * @return The first item's handle or @c null, if there are no items in @c obj
391 * (and on errors)
392 *
393 * @ingroup Elm_Gengrid
394 */
395EOAPI Elm_Widget_Item *elm_obj_gengrid_first_item_get(const Eo *obj);
396
397/**
398 * @brief Get a list of selected items in a given gengrid.
399 *
400 * This returns a list of the selected items, in the order that they appear in
401 * the grid. This list is only valid as long as no more items are selected or
402 * unselected (or unselected implicitly by deletion). The list contains Gengrid
403 * item pointers as data, naturally.
404 *
405 * @param[in] obj The object.
406 *
407 * @return The list of selected items or @c null, if none is selected at the
408 * moment (and on errors).
409 *
410 * @ingroup Elm_Gengrid
411 */
412EOAPI const Eina_List *elm_obj_gengrid_selected_items_get(const Eo *obj);
413
414/**
415 * @brief Get the last item in a given gengrid widget.
416 *
417 * This returns the last item in the @c obj's internal list of items.
418 *
419 * @param[in] obj The object.
420 *
421 * @return The last item's handle or @c null if there are no items in @c obj
422 * (and on errors).
423 *
424 * @ingroup Elm_Gengrid
425 */
426EOAPI Elm_Widget_Item *elm_obj_gengrid_last_item_get(const Eo *obj);
427
428/**
429 * @brief Insert an item before another in a gengrid widget.
430 *
431 * This inserts an item before another in the gengrid.
432 *
433 * @param[in] obj The object.
434 * @param[in] itc The item class for the item.
435 * @param[in] data The item data.
436 * @param[in] relative The item to place this new one before.
437 * @param[in] func Convenience function called when the item is selected.
438 * @param[in] func_data Data to be passed to @c func.
439 *
440 * @return A handle to the item added or @c null on errors.
441 *
442 * @ingroup Elm_Gengrid
443 */
444EOAPI Elm_Widget_Item *elm_obj_gengrid_item_insert_before(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
445
446/**
447 * @brief Update the contents of all realized items.
448 *
449 * This updates all realized items by calling all the item class functions
450 * again to get the contents, texts and states. Use this when the original item
451 * data has changed and the changes are desired to be reflected.
452 *
453 * To update just one item, use @ref elm_gengrid_item_update.
454 * @param[in] obj The object.
455 *
456 * @ingroup Elm_Gengrid
457 */
458EOAPI void elm_obj_gengrid_realized_items_update(Eo *obj);
459
460/**
461 * @brief Insert an item after another in a gengrid widget.
462 *
463 * This inserts an item after another in the gengrid.
464 *
465 * @param[in] obj The object.
466 * @param[in] itc The item class for the item.
467 * @param[in] data The item data.
468 * @param[in] relative The item to place this new one after.
469 * @param[in] func Convenience function called when the item is selected.
470 * @param[in] func_data Data to be passed to @c func.
471 *
472 * @return A handle to the item added or @c null on error.
473 *
474 * @ingroup Elm_Gengrid
475 */
476EOAPI Elm_Widget_Item *elm_obj_gengrid_item_insert_after(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
477
478/**
479 * @brief Return how many items are currently in a list
480 *
481 * This behavior is O(1) and includes items which may or may not be realized.
482 *
483 * @param[in] obj The object.
484 *
485 * @return Items in list
486 *
487 * @ingroup Elm_Gengrid
488 */
489EOAPI unsigned int elm_obj_gengrid_items_count(const Eo *obj);
490
491/**
492 * @brief Get the item that is at the x, y canvas coords.
493 *
494 * This returns the item at the given coordinates (which are canvas relative,
495 * not object-relative). If an item is at that coordinate, that item handle is
496 * returned, and if @c xposret is not @c null, the integer pointed to is set to
497 * a value of -1, 0 or 1, depending if the coordinate is on the left portion of
498 * that item (-1), on the middle section (0) or on the right part (1).
499 *
500 * If @c yposret is not @c null, the integer pointed to is set to a value of
501 * -1, 0 or 1, depending if the coordinate is on the upper portion of that item
502 * (-1), on the middle section (0) or on the lower part (1). If NULL is
503 * returned as an item (no item found there), then posret may indicate -1 or 1
504 * based if the coordinate is above or below all items respectively in the
505 * gengrid.
506 *
507 * @param[in] obj The object.
508 * @param[in] x The input x coordinate.
509 * @param[in] y The input y coordinate.
510 * @param[out] xposret The position relative to the item returned here.
511 * @param[out] yposret The position relative to the item returned here.
512 *
513 * @return The item at the coordinates or @c null if none.
514 *
515 * @ingroup Elm_Gengrid
516 */
517EOAPI Elm_Widget_Item *elm_obj_gengrid_at_xy_item_get(const Eo *obj, int x, int y, int *xposret, int *yposret);
518
519/**
520 * @brief Append a new item in a given gengrid widget.
521 *
522 * This adds an item to the beginning of the gengrid.
523 *
524 * @param[in] obj The object.
525 * @param[in] itc The item class for the item.
526 * @param[in] data The item data.
527 * @param[in] func Convenience function called when the item is selected.
528 * @param[in] func_data Data to be passed to @c func.
529 *
530 * @return A handle to the item added or @c null on errors.
531 *
532 * @ingroup Elm_Gengrid
533 */
534EOAPI Elm_Widget_Item *elm_obj_gengrid_item_append(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
535
536/**
537 * @brief Prepend a new item in a given gengrid widget.
538 *
539 * This adds an item to the end of the gengrid.
540 *
541 * @param[in] obj The object.
542 * @param[in] itc The item class for the item.
543 * @param[in] data The item data.
544 * @param[in] func Convenience function called when the item is selected.
545 * @param[in] func_data Data to be passed to @c func.
546 *
547 * @return A handle to the item added or @c null on errors.
548 *
549 * @ingroup Elm_Gengrid
550 */
551EOAPI Elm_Widget_Item *elm_obj_gengrid_item_prepend(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
552
553/**
554 * @brief Remove all items from a given gengrid widget.
555 *
556 * This removes (and deletes) all items in @c obj, leaving it empty.
557 *
558 * See @ref elm_gengrid_item_del to remove just one item.
559 * @param[in] obj The object.
560 *
561 * @ingroup Elm_Gengrid
562 */
563EOAPI void elm_obj_gengrid_clear(Eo *obj);
564
565/**
566 * @brief Insert an item in a gengrid widget using a user-defined sort
567 * function.
568 *
569 * This inserts an item in the gengrid based on user defined comparison
570 * function. The two arguments passed to the function @c func are gengrid item
571 * handles to compare.
572 *
573 * @param[in] obj The object.
574 * @param[in] itc The item class for the item.
575 * @param[in] data The item data.
576 * @param[in] comp User defined comparison function that defines the sort order
577 * based on gengrid item and its data.
578 * @param[in] func Convenience function called when the item is selected.
579 * @param[in] func_data Data to be passed to @c func.
580 *
581 * @return A handle to the item added or @c null on errors.
582 *
583 * @ingroup Elm_Gengrid
584 */
585EOAPI Elm_Widget_Item *elm_obj_gengrid_item_sorted_insert(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
586
587/**
588 * @brief Get gengrid item by given string.
589 *
590 * It takes pointer to the gengrid item that will be used to start search from
591 * it.
592 *
593 * This function uses globs (like "*.jpg") for searching and takes search flags
594 * as last parameter That is a bitfield with values to be ored together or 0
595 * for no flags.
596 *
597 * @param[in] obj The object.
598 * @param[in] item_to_search_from Pointer to item to start search from. If
599 * @c null, search will be started from the first item of the gengrid.
600 * @param[in] part_name Name of the TEXT part of gengrid item to search string
601 * in. If @c null, search by "elm.text" parts.
602 * @param[in] pattern The search pattern.
603 * @param[in] flags Search flags.
604 *
605 * @return Pointer to the gengrid item which matches search_string in case of
606 * success, otherwise @c null.
607 *
608 * @since 1.11
609 *
610 * @ingroup Elm_Gengrid
611 */
612EOAPI Elm_Widget_Item *elm_obj_gengrid_search_by_text_item_get(Eo *obj, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags);
613
614/**
615 * @brief Starts the reorder mode of Gengrid
616 *
617 * @param[in] obj The object.
618 * @param[in] tween_mode Position mappings for animation
619 *
620 * @since 1.10
621 *
622 * @ingroup Elm_Gengrid
623 */
624EOAPI void elm_obj_gengrid_reorder_mode_start(Eo *obj, Ecore_Pos_Map tween_mode);
625
626/** Stops the reorder mode of Gengrid
627 *
628 * @since 1.10
629 *
630 * @ingroup Elm_Gengrid
631 */
632EOAPI void elm_obj_gengrid_reorder_mode_stop(Eo *obj);
633
634EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_REALIZED;
635
636/** Called when gengrid realized
637 * @return Efl_Object *
638 *
639 * @ingroup Elm_Gengrid
640 */
641#define ELM_GENGRID_EVENT_REALIZED (&(_ELM_GENGRID_EVENT_REALIZED))
642
643EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_UNREALIZED;
644
645/** Called when gengrid unrealized
646 * @return Efl_Object *
647 *
648 * @ingroup Elm_Gengrid
649 */
650#define ELM_GENGRID_EVENT_UNREALIZED (&(_ELM_GENGRID_EVENT_UNREALIZED))
651
652EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_INDEX_UPDATE;
653
654/** Called on gengrid index update
655 * @return Efl_Object *
656 *
657 * @ingroup Elm_Gengrid
658 */
659#define ELM_GENGRID_EVENT_INDEX_UPDATE (&(_ELM_GENGRID_EVENT_INDEX_UPDATE))
660
661EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED;
662
663/** Called when scroll page changed
664 *
665 * @ingroup Elm_Gengrid
666 */
667#define ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED (&(_ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED))
668
669EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_BOTTOM;
670
671/** Called when bottom edge is reached
672 *
673 * @ingroup Elm_Gengrid
674 */
675#define ELM_GENGRID_EVENT_EDGE_BOTTOM (&(_ELM_GENGRID_EVENT_EDGE_BOTTOM))
676
677EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_TOP;
678
679/** Called when top edge is reached
680 *
681 * @ingroup Elm_Gengrid
682 */
683#define ELM_GENGRID_EVENT_EDGE_TOP (&(_ELM_GENGRID_EVENT_EDGE_TOP))
684
685EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_RIGHT;
686
687/** Called when right edge is reached
688 *
689 * @ingroup Elm_Gengrid
690 */
691#define ELM_GENGRID_EVENT_EDGE_RIGHT (&(_ELM_GENGRID_EVENT_EDGE_RIGHT))
692
693EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_LEFT;
694
695/** Called when left edge is reached
696 *
697 * @ingroup Elm_Gengrid
698 */
699#define ELM_GENGRID_EVENT_EDGE_LEFT (&(_ELM_GENGRID_EVENT_EDGE_LEFT))
700
701EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_FOCUSED;
702
703/** Called when item got focus
704 * @return Efl_Object *
705 *
706 * @ingroup Elm_Gengrid
707 */
708#define ELM_GENGRID_EVENT_ITEM_FOCUSED (&(_ELM_GENGRID_EVENT_ITEM_FOCUSED))
709
710EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_UNFOCUSED;
711
712/** Called when item no longer has focus
713 * @return Efl_Object *
714 *
715 * @ingroup Elm_Gengrid
716 */
717#define ELM_GENGRID_EVENT_ITEM_UNFOCUSED (&(_ELM_GENGRID_EVENT_ITEM_UNFOCUSED))
718
719EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START;
720
721/** Called when item reorder animation started
722 * @return Efl_Object *
723 *
724 * @ingroup Elm_Gengrid
725 */
726#define ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START (&(_ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START))
727
728EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP;
729
730/** Called when item reorder animation stopped
731 * @return Efl_Object *
732 *
733 * @ingroup Elm_Gengrid
734 */
735#define ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP (&(_ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP))
736
737EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ACTIVATED;
738
739/** Called when gengrid got activated
740 * @return Efl_Object *
741 *
742 * @ingroup Elm_Gengrid
743 */
744#define ELM_GENGRID_EVENT_ACTIVATED (&(_ELM_GENGRID_EVENT_ACTIVATED))
745
746EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_HIGHLIGHTED;
747
748/** Called when gengrid is highlighted
749 * @return Efl_Object *
750 *
751 * @ingroup Elm_Gengrid
752 */
753#define ELM_GENGRID_EVENT_HIGHLIGHTED (&(_ELM_GENGRID_EVENT_HIGHLIGHTED))
754
755EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_UNHIGHLIGHTED;
756
757/** Called when gengrid is no longer highlighted
758 * @return Efl_Object *
759 *
760 * @ingroup Elm_Gengrid
761 */
762#define ELM_GENGRID_EVENT_UNHIGHLIGHTED (&(_ELM_GENGRID_EVENT_UNHIGHLIGHTED))
763
764EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_RELEASED;
765
766/** Called when gengrid is released
767 * @return Efl_Object *
768 *
769 * @ingroup Elm_Gengrid
770 */
771#define ELM_GENGRID_EVENT_RELEASED (&(_ELM_GENGRID_EVENT_RELEASED))
772
773EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_MOVED;
774
775/** Called when gengrid item moved
776 * @return Efl_Object *
777 *
778 * @ingroup Elm_Gengrid
779 */
780#define ELM_GENGRID_EVENT_MOVED (&(_ELM_GENGRID_EVENT_MOVED))
781
782#endif
diff --git a/src/lib/elementary/elm_gengrid_eo.legacy.c b/src/lib/elementary/elm_gengrid_eo.legacy.c
new file mode 100644
index 0000000..b823e8d
--- /dev/null
+++ b/src/lib/elementary/elm_gengrid_eo.legacy.c
@@ -0,0 +1,228 @@
1
2EAPI void
3elm_gengrid_align_set(Elm_Gengrid *obj, double align_x, double align_y)
4{
5 elm_obj_gengrid_align_set(obj, align_x, align_y);
6}
7
8EAPI void
9elm_gengrid_align_get(const Elm_Gengrid *obj, double *align_x, double *align_y)
10{
11 elm_obj_gengrid_align_get(obj, align_x, align_y);
12}
13
14EAPI void
15elm_gengrid_filled_set(Elm_Gengrid *obj, Eina_Bool fill)
16{
17 elm_obj_gengrid_filled_set(obj, fill);
18}
19
20EAPI Eina_Bool
21elm_gengrid_filled_get(const Elm_Gengrid *obj)
22{
23 return elm_obj_gengrid_filled_get(obj);
24}
25
26EAPI void
27elm_gengrid_multi_select_set(Elm_Gengrid *obj, Eina_Bool multi)
28{
29 elm_obj_gengrid_multi_select_set(obj, multi);
30}
31
32EAPI Eina_Bool
33elm_gengrid_multi_select_get(const Elm_Gengrid *obj)
34{
35 return elm_obj_gengrid_multi_select_get(obj);
36}
37
38EAPI void
39elm_gengrid_group_item_size_set(Elm_Gengrid *obj, int w, int h)
40{
41 elm_obj_gengrid_group_item_size_set(obj, w, h);
42}
43
44EAPI void
45elm_gengrid_group_item_size_get(const Elm_Gengrid *obj, int *w, int *h)
46{
47 elm_obj_gengrid_group_item_size_get(obj, w, h);
48}
49
50EAPI void
51elm_gengrid_select_mode_set(Elm_Gengrid *obj, Elm_Object_Select_Mode mode)
52{
53 elm_obj_gengrid_select_mode_set(obj, mode);
54}
55
56EAPI Elm_Object_Select_Mode
57elm_gengrid_select_mode_get(const Elm_Gengrid *obj)
58{
59 return elm_obj_gengrid_select_mode_get(obj);
60}
61
62EAPI void
63elm_gengrid_reorder_mode_set(Elm_Gengrid *obj, Eina_Bool reorder_mode)
64{
65 elm_obj_gengrid_reorder_mode_set(obj, reorder_mode);
66}
67
68EAPI Eina_Bool
69elm_gengrid_reorder_mode_get(const Elm_Gengrid *obj)
70{
71 return elm_obj_gengrid_reorder_mode_get(obj);
72}
73
74EAPI void
75elm_gengrid_highlight_mode_set(Elm_Gengrid *obj, Eina_Bool highlight)
76{
77 elm_obj_gengrid_highlight_mode_set(obj, highlight);
78}
79
80EAPI Eina_Bool
81elm_gengrid_highlight_mode_get(const Elm_Gengrid *obj)
82{
83 return elm_obj_gengrid_highlight_mode_get(obj);
84}
85
86EAPI void
87elm_gengrid_reorder_type_set(Elm_Gengrid *obj, Elm_Gengrid_Reorder_Type type)
88{
89 elm_obj_gengrid_reorder_type_set(obj, type);
90}
91
92EAPI void
93elm_gengrid_item_size_set(Elm_Gengrid *obj, int w, int h)
94{
95 elm_obj_gengrid_item_size_set(obj, w, h);
96}
97
98EAPI void
99elm_gengrid_item_size_get(const Elm_Gengrid *obj, int *w, int *h)
100{
101 elm_obj_gengrid_item_size_get(obj, w, h);
102}
103
104EAPI void
105elm_gengrid_multi_select_mode_set(Elm_Gengrid *obj, Elm_Object_Multi_Select_Mode mode)
106{
107 elm_obj_gengrid_multi_select_mode_set(obj, mode);
108}
109
110EAPI Elm_Object_Multi_Select_Mode
111elm_gengrid_multi_select_mode_get(const Elm_Gengrid *obj)
112{
113 return elm_obj_gengrid_multi_select_mode_get(obj);
114}
115
116EAPI void
117elm_gengrid_horizontal_set(Elm_Gengrid *obj, Eina_Bool horizontal)
118{
119 elm_obj_gengrid_horizontal_set(obj, horizontal);
120}
121
122EAPI Eina_Bool
123elm_gengrid_horizontal_get(const Elm_Gengrid *obj)
124{
125 return elm_obj_gengrid_horizontal_get(obj);
126}
127
128EAPI Elm_Widget_Item *
129elm_gengrid_selected_item_get(const Elm_Gengrid *obj)
130{
131 return elm_obj_gengrid_selected_item_get(obj);
132}
133
134EAPI Eina_List *
135elm_gengrid_realized_items_get(const Elm_Gengrid *obj)
136{
137 return elm_obj_gengrid_realized_items_get(obj);
138}
139
140EAPI Elm_Widget_Item *
141elm_gengrid_first_item_get(const Elm_Gengrid *obj)
142{
143 return elm_obj_gengrid_first_item_get(obj);
144}
145
146EAPI const Eina_List *
147elm_gengrid_selected_items_get(const Elm_Gengrid *obj)
148{
149 return elm_obj_gengrid_selected_items_get(obj);
150}
151
152EAPI Elm_Widget_Item *
153elm_gengrid_last_item_get(const Elm_Gengrid *obj)
154{
155 return elm_obj_gengrid_last_item_get(obj);
156}
157
158EAPI Elm_Widget_Item *
159elm_gengrid_item_insert_before(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data)
160{
161 return elm_obj_gengrid_item_insert_before(obj, itc, data, relative, func, func_data);
162}
163
164EAPI void
165elm_gengrid_realized_items_update(Elm_Gengrid *obj)
166{
167 elm_obj_gengrid_realized_items_update(obj);
168}
169
170EAPI Elm_Widget_Item *
171elm_gengrid_item_insert_after(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data)
172{
173 return elm_obj_gengrid_item_insert_after(obj, itc, data, relative, func, func_data);
174}
175
176EAPI unsigned int
177elm_gengrid_items_count(const Elm_Gengrid *obj)
178{
179 return elm_obj_gengrid_items_count(obj);
180}
181
182EAPI Elm_Widget_Item *
183elm_gengrid_at_xy_item_get(const Elm_Gengrid *obj, int x, int y, int *xposret, int *yposret)
184{
185 return elm_obj_gengrid_at_xy_item_get(obj, x, y, xposret, yposret);
186}
187
188EAPI Elm_Widget_Item *
189elm_gengrid_item_append(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
190{
191 return elm_obj_gengrid_item_append(obj, itc, data, func, func_data);
192}
193
194EAPI Elm_Widget_Item *
195elm_gengrid_item_prepend(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
196{
197 return elm_obj_gengrid_item_prepend(obj, itc, data, func, func_data);
198}
199
200EAPI void
201elm_gengrid_clear(Elm_Gengrid *obj)
202{
203 elm_obj_gengrid_clear(obj);
204}
205
206EAPI Elm_Widget_Item *
207elm_gengrid_item_sorted_insert(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data)
208{
209 return elm_obj_gengrid_item_sorted_insert(obj, itc, data, comp, func, func_data);
210}
211
212EAPI Elm_Widget_Item *
213elm_gengrid_search_by_text_item_get(Elm_Gengrid *obj, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags)
214{
215 return elm_obj_gengrid_search_by_text_item_get(obj, item_to_search_from, part_name, pattern, flags);
216}
217
218EAPI void
219elm_gengrid_reorder_mode_start(Elm_Gengrid *obj, Ecore_Pos_Map tween_mode)
220{
221 elm_obj_gengrid_reorder_mode_start(obj, tween_mode);
222}
223
224EAPI void
225elm_gengrid_reorder_mode_stop(Elm_Gengrid *obj)
226{
227 elm_obj_gengrid_reorder_mode_stop(obj);
228}
diff --git a/src/lib/elementary/elm_gengrid_eo.legacy.h b/src/lib/elementary/elm_gengrid_eo.legacy.h
new file mode 100644
index 0000000..b454ac0
--- /dev/null
+++ b/src/lib/elementary/elm_gengrid_eo.legacy.h
@@ -0,0 +1,627 @@
1#ifndef _ELM_GENGRID_EO_LEGACY_H_
2#define _ELM_GENGRID_EO_LEGACY_H_
3
4#ifndef _ELM_GENGRID_EO_CLASS_TYPE
5#define _ELM_GENGRID_EO_CLASS_TYPE
6
7typedef Eo Elm_Gengrid;
8
9#endif
10
11#ifndef _ELM_GENGRID_EO_TYPES
12#define _ELM_GENGRID_EO_TYPES
13
14/** Gengrid reorder modes
15 *
16 * @ingroup Elm_Gengrid
17 */
18typedef enum
19{
20 ELM_GENGRID_REORDER_TYPE_NORMAL = 0, /**< Normal reorder type */
21 ELM_GENGRID_REORDER_TYPE_SWAP /**< Swap reorder type */
22} Elm_Gengrid_Reorder_Type;
23
24
25#endif
26
27/**
28 * @brief Set the items grid's alignment within a given gengrid widget.
29 *
30 * This sets the alignment of the whole grid of items of a gengrid within its
31 * given viewport. By default, those values are both 0.5, meaning that the
32 * gengrid will have its items grid placed exactly in the middle of its
33 * viewport.
34 *
35 * @note If given alignment values are out of the cited ranges, they'll be
36 * changed to the nearest boundary values on the valid ranges.
37 *
38 * @param[in] obj The object.
39 * @param[in] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
40 * @param[in] align_y Alignment in the vertical axis (0 <= align_y <= 1).
41 *
42 * @ingroup Elm_Gengrid_Group
43 */
44EAPI void elm_gengrid_align_set(Elm_Gengrid *obj, double align_x, double align_y);
45
46/**
47 * @brief Get the items grid's alignment values within a given gengrid widget.
48 *
49 * @note Use @c null pointers on the alignment values you're not interested in:
50 * they'll be ignored by the function.
51 *
52 * @param[in] obj The object.
53 * @param[out] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
54 * @param[out] align_y Alignment in the vertical axis (0 <= align_y <= 1).
55 *
56 * @ingroup Elm_Gengrid_Group
57 */
58EAPI void elm_gengrid_align_get(const Elm_Gengrid *obj, double *align_x, double *align_y);
59
60/**
61 * @brief Set how the items grid's filled within a given gengrid widget
62 *
63 * This sets the fill state of the whole grid of items of a gengrid within its
64 * given viewport. By default, this value is false, meaning that if the first
65 * line of items grid's isn't filled, the items are centered with the
66 * alignment.
67 *
68 * @param[in] obj The object.
69 * @param[in] fill @c true if the grid is filled, @c false otherwise
70 *
71 * @ingroup Elm_Gengrid_Group
72 */
73EAPI void elm_gengrid_filled_set(Elm_Gengrid *obj, Eina_Bool fill);
74
75/**
76 * @brief Get how the items grid's filled within a given gengrid widget
77 *
78 * @note Use @c null pointers on the alignment values you're not interested in:
79 * they'll be ignored by the function.
80 *
81 * @param[in] obj The object.
82 *
83 * @return @c true if the grid is filled, @c false otherwise
84 *
85 * @ingroup Elm_Gengrid_Group
86 */
87EAPI Eina_Bool elm_gengrid_filled_get(const Elm_Gengrid *obj);
88
89/**
90 * @brief Enable or disable multi-selection in a given gengrid widget.
91 *
92 * Multi-selection is the ability to have more than one item selected, on a
93 * given gengrid, simultaneously. When it is enabled, a sequence of clicks on
94 * different items will make them all selected, progressively. A click on an
95 * already selected item will unselect it. If interacting via the keyboard,
96 * multi-selection is enabled while holding the "Shift" key.
97 *
98 * @note By default, multi-selection is disabled on gengrids.
99 *
100 * @param[in] obj The object.
101 * @param[in] multi @c true if multislect is enabled, @c false otherwise
102 *
103 * @ingroup Elm_Gengrid_Group
104 */
105EAPI void elm_gengrid_multi_select_set(Elm_Gengrid *obj, Eina_Bool multi);
106
107/**
108 * @brief Get whether multi-selection is enabled or disabled for a given
109 * gengrid widget.
110 *
111 * @param[in] obj The object.
112 *
113 * @return @c true if multislect is enabled, @c false otherwise
114 *
115 * @ingroup Elm_Gengrid_Group
116 */
117EAPI Eina_Bool elm_gengrid_multi_select_get(const Elm_Gengrid *obj);
118
119/**
120 * @brief Set the size for the group items of a given gengrid widget.
121 *
122 * A gengrid, after creation, has still no information on the size to give to
123 * each of its cells. So, you most probably will end up with squares one @ref
124 * Fingers "finger" wide, the default size. Use this function to force a custom
125 * size for you group items, making them as big as you wish.
126 *
127 * @param[in] obj The object.
128 * @param[in] w The group items' width.
129 * @param[in] h The group items' height.
130 *
131 * @ingroup Elm_Gengrid_Group
132 */
133EAPI void elm_gengrid_group_item_size_set(Elm_Gengrid *obj, int w, int h);
134
135/**
136 * @brief Get the size set for the group items of a given gengrid widget.
137 *
138 * @note Use @c null pointers on the size values you're not interested in:
139 * they'll be ignored by the function.
140 *
141 * @param[in] obj The object.
142 * @param[out] w The group items' width.
143 * @param[out] h The group items' height.
144 *
145 * @ingroup Elm_Gengrid_Group
146 */
147EAPI void elm_gengrid_group_item_size_get(const Elm_Gengrid *obj, int *w, int *h);
148
149/**
150 * @brief Set the gengrid select mode.
151 *
152 * This changes item select mode in the gengrid widget.
153 * #ELM_OBJECT_SELECT_MODE_DEFAULT means that items will only call their
154 * selection func and callback when first becoming selected. Any further clicks
155 * will do nothing, unless you set always select mode.
156 * #ELM_OBJECT_SELECT_MODE_ALWAYS means that even if selected, every click will
157 * make the selected callbacks be called. #ELM_OBJECT_SELECT_MODE_NONE will
158 * turn off the ability to select items entirely and they will neither appear
159 * selected nor call selected callback functions.
160 *
161 * @param[in] obj The object.
162 * @param[in] mode The select mode.
163 *
164 * @ingroup Elm_Gengrid_Group
165 */
166EAPI void elm_gengrid_select_mode_set(Elm_Gengrid *obj, Elm_Object_Select_Mode mode);
167
168/**
169 * @brief Get the gengrid select mode.
170 *
171 * @param[in] obj The object.
172 *
173 * @return The select mode.
174 *
175 * @ingroup Elm_Gengrid_Group
176 */
177EAPI Elm_Object_Select_Mode elm_gengrid_select_mode_get(const Elm_Gengrid *obj);
178
179/**
180 * @brief Set whether a given gengrid widget is or not able have items
181 * reordered.
182 *
183 * If a gengrid is set to allow reordering, a click held for more than 0.5 over
184 * a given item will highlight it specially, signaling the gengrid has entered
185 * the reordering state. From that time on, the user will be able to, while
186 * still holding the mouse button down, move the item freely in the gengrid's
187 * viewport, replacing to said item to the locations it goes to. The
188 * replacements will be animated and, whenever the user releases the mouse
189 * button, the item being replaced gets a new definitive place in the grid.
190 *
191 * @param[in] obj The object.
192 * @param[in] reorder_mode Use @c true to turn reordering on, @c false to turn
193 * it off.
194 *
195 * @ingroup Elm_Gengrid_Group
196 */
197EAPI void elm_gengrid_reorder_mode_set(Elm_Gengrid *obj, Eina_Bool reorder_mode);
198
199/**
200 * @brief Get whether a given gengrid widget is or not able have items
201 * reordered.
202 *
203 * @param[in] obj The object.
204 *
205 * @return Use @c true to turn reordering on, @c false to turn it off.
206 *
207 * @ingroup Elm_Gengrid_Group
208 */
209EAPI Eina_Bool elm_gengrid_reorder_mode_get(const Elm_Gengrid *obj);
210
211/**
212 * @brief Control whether the gengrid items' should be highlighted when item
213 * selected.
214 *
215 * @param[in] obj The object.
216 * @param[in] highlight @c true if item will be highlighted, @c false otherwise
217 *
218 * @ingroup Elm_Gengrid_Group
219 */
220EAPI void elm_gengrid_highlight_mode_set(Elm_Gengrid *obj, Eina_Bool highlight);
221
222/**
223 * @brief Control whether the gengrid items' should be highlighted when item
224 * selected.
225 *
226 * @param[in] obj The object.
227 *
228 * @return @c true if item will be highlighted, @c false otherwise
229 *
230 * @ingroup Elm_Gengrid_Group
231 */
232EAPI Eina_Bool elm_gengrid_highlight_mode_get(const Elm_Gengrid *obj);
233
234/**
235 * @brief Set the Gengrid reorder type
236 *
237 * @param[in] obj The object.
238 * @param[in] type Reorder type value
239 *
240 * @since 1.11
241 *
242 * @ingroup Elm_Gengrid_Group
243 */
244EAPI void elm_gengrid_reorder_type_set(Elm_Gengrid *obj, Elm_Gengrid_Reorder_Type type);
245
246/**
247 * @brief Set the size for the items of a given gengrid widget.
248 *
249 * A gengrid, after creation, has still no information on the size to give to
250 * each of its cells. So, you most probably will end up with squares one @ref
251 * Fingers "finger" wide, the default size. Use this function to force a custom
252 * size for you items, making them as big as you wish.
253 *
254 * @param[in] obj The object.
255 * @param[in] w The items' width.
256 * @param[in] h The items' height.
257 *
258 * @ingroup Elm_Gengrid_Group
259 */
260EAPI void elm_gengrid_item_size_set(Elm_Gengrid *obj, int w, int h);
261
262/**
263 * @brief Get the size set for the items of a given gengrid widget.
264 *
265 * @note Use @c null pointers on the size values you're not interested in:
266 * they'll be ignored by the function.
267 *
268 * @param[in] obj The object.
269 * @param[out] w The items' width.
270 * @param[out] h The items' height.
271 *
272 * @ingroup Elm_Gengrid_Group
273 */
274EAPI void elm_gengrid_item_size_get(const Elm_Gengrid *obj, int *w, int *h);
275
276/**
277 * @brief Set the gengrid multi select mode.
278 *
279 * #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that select/unselect items
280 * whenever each item is clicked. #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL
281 * means that only one item will be selected although multi-selection is
282 * enabled, if clicked without pressing control key. This mode is only
283 * available with multi-selection.
284 *
285 * @param[in] obj The object.
286 * @param[in] mode The multi select mode.
287 *
288 * @since 1.8
289 *
290 * @ingroup Elm_Gengrid_Group
291 */
292EAPI void elm_gengrid_multi_select_mode_set(Elm_Gengrid *obj, Elm_Object_Multi_Select_Mode mode);
293
294/**
295 * @brief Get the gengrid multi select mode.
296 *
297 * If getting mode fails, it returns #ELM_OBJECT_MULTI_SELECT_MODE_MAX.
298 *
299 * @param[in] obj The object.
300 *
301 * @return The multi select mode.
302 *
303 * @since 1.8
304 *
305 * @ingroup Elm_Gengrid_Group
306 */
307EAPI Elm_Object_Multi_Select_Mode elm_gengrid_multi_select_mode_get(const Elm_Gengrid *obj);
308
309/**
310 * @brief Set the direction in which a given gengrid widget will expand while
311 * placing its items.
312 *
313 * When in "horizontal mode" ($true), items will be placed in columns, from top
314 * to bottom and, when the space for a column is filled, another one is started
315 * on the right, thus expanding the grid horizontally. When in "vertical mode"
316 * ($false), though, items will be placed in rows, from left to right and, when
317 * the space for a row is filled, another one is started below, thus expanding
318 * the grid vertically.
319 *
320 * @note By default, gengrid is in vertical mode, @c false.
321 *
322 * @param[in] obj The object.
323 * @param[in] horizontal @c true to make the gengrid expand horizontally,
324 * @c false to expand vertically.
325 *
326 * @ingroup Elm_Gengrid_Group
327 */
328EAPI void elm_gengrid_horizontal_set(Elm_Gengrid *obj, Eina_Bool horizontal);
329
330/**
331 * @brief Get for what direction a given gengrid widget will expand while
332 * placing its items.
333 *
334 * @param[in] obj The object.
335 *
336 * @return @c true to make the gengrid expand horizontally, @c false to expand
337 * vertically.
338 *
339 * @ingroup Elm_Gengrid_Group
340 */
341EAPI Eina_Bool elm_gengrid_horizontal_get(const Elm_Gengrid *obj);
342
343/**
344 * @brief Get the selected item in a given gengrid widget.
345 *
346 * This returns the selected item in @c obj. If multi selection is enabled on
347 * @c obj (See @ref elm_gengrid_multi_select_set), only the first item in the
348 * list is selected, which might not be very useful. For that case, see
349 * @ref elm_gengrid_selected_items_get.
350 *
351 * @param[in] obj The object.
352 *
353 * @return The selected item's handle or @c null if none is selected at the
354 * moment (and on errors).
355 *
356 * @ingroup Elm_Gengrid_Group
357 */
358EAPI Elm_Widget_Item *elm_gengrid_selected_item_get(const Elm_Gengrid *obj);
359
360/**
361 * @brief Get a list of realized items in gengrid.
362 *
363 * This returns a list of the realized items in the gengrid. The list contains
364 * gengrid item pointers. The list must be freed by the caller when done with
365 * eina_list_free(). The item pointers in the list are only valid so long as
366 * those items are not deleted or the gengrid is not deleted.
367 *
368 * @param[in] obj The object.
369 *
370 * @return The list of realized items or @c null if none are realized.
371 *
372 * @ingroup Elm_Gengrid_Group
373 */
374EAPI Eina_List *elm_gengrid_realized_items_get(const Elm_Gengrid *obj) EINA_WARN_UNUSED_RESULT;
375
376/**
377 * @brief Get the first item in a given gengrid widget.
378 *
379 * This returns the first item in the @c obj's internal list of items.
380 *
381 * @param[in] obj The object.
382 *
383 * @return The first item's handle or @c null, if there are no items in @c obj
384 * (and on errors)
385 *
386 * @ingroup Elm_Gengrid_Group
387 */
388EAPI Elm_Widget_Item *elm_gengrid_first_item_get(const Elm_Gengrid *obj);
389
390/**
391 * @brief Get a list of selected items in a given gengrid.
392 *
393 * This returns a list of the selected items, in the order that they appear in
394 * the grid. This list is only valid as long as no more items are selected or
395 * unselected (or unselected implicitly by deletion). The list contains Gengrid
396 * item pointers as data, naturally.
397 *
398 * @param[in] obj The object.
399 *
400 * @return The list of selected items or @c null, if none is selected at the
401 * moment (and on errors).
402 *
403 * @ingroup Elm_Gengrid_Group
404 */
405EAPI const Eina_List *elm_gengrid_selected_items_get(const Elm_Gengrid *obj);
406
407/**
408 * @brief Get the last item in a given gengrid widget.
409 *
410 * This returns the last item in the @c obj's internal list of items.
411 *
412 * @param[in] obj The object.
413 *
414 * @return The last item's handle or @c null if there are no items in @c obj
415 * (and on errors).
416 *
417 * @ingroup Elm_Gengrid_Group
418 */
419EAPI Elm_Widget_Item *elm_gengrid_last_item_get(const Elm_Gengrid *obj);
420
421/**
422 * @brief Insert an item before another in a gengrid widget.
423 *
424 * This inserts an item before another in the gengrid.
425 *
426 * @param[in] obj The object.
427 * @param[in] itc The item class for the item.
428 * @param[in] data The item data.
429 * @param[in] relative The item to place this new one before.
430 * @param[in] func Convenience function called when the item is selected.
431 * @param[in] func_data Data to be passed to @c func.
432 *
433 * @return A handle to the item added or @c null on errors.
434 *
435 * @ingroup Elm_Gengrid_Group
436 */
437EAPI Elm_Widget_Item *elm_gengrid_item_insert_before(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
438
439/**
440 * @brief Update the contents of all realized items.
441 *
442 * This updates all realized items by calling all the item class functions
443 * again to get the contents, texts and states. Use this when the original item
444 * data has changed and the changes are desired to be reflected.
445 *
446 * To update just one item, use @ref elm_gengrid_item_update.
447 * @param[in] obj The object.
448 *
449 * @ingroup Elm_Gengrid_Group
450 */
451EAPI void elm_gengrid_realized_items_update(Elm_Gengrid *obj);
452
453/**
454 * @brief Insert an item after another in a gengrid widget.
455 *
456 * This inserts an item after another in the gengrid.
457 *
458 * @param[in] obj The object.
459 * @param[in] itc The item class for the item.
460 * @param[in] data The item data.
461 * @param[in] relative The item to place this new one after.
462 * @param[in] func Convenience function called when the item is selected.
463 * @param[in] func_data Data to be passed to @c func.
464 *
465 * @return A handle to the item added or @c null on error.
466 *
467 * @ingroup Elm_Gengrid_Group
468 */
469EAPI Elm_Widget_Item *elm_gengrid_item_insert_after(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
470
471/**
472 * @brief Return how many items are currently in a list
473 *
474 * This behavior is O(1) and includes items which may or may not be realized.
475 *
476 * @param[in] obj The object.
477 *
478 * @return Items in list
479 *
480 * @ingroup Elm_Gengrid_Group
481 */
482EAPI unsigned int elm_gengrid_items_count(const Elm_Gengrid *obj);
483
484/**
485 * @brief Get the item that is at the x, y canvas coords.
486 *
487 * This returns the item at the given coordinates (which are canvas relative,
488 * not object-relative). If an item is at that coordinate, that item handle is
489 * returned, and if @c xposret is not @c null, the integer pointed to is set to
490 * a value of -1, 0 or 1, depending if the coordinate is on the left portion of
491 * that item (-1), on the middle section (0) or on the right part (1).
492 *
493 * If @c yposret is not @c null, the integer pointed to is set to a value of
494 * -1, 0 or 1, depending if the coordinate is on the upper portion of that item
495 * (-1), on the middle section (0) or on the lower part (1). If NULL is
496 * returned as an item (no item found there), then posret may indicate -1 or 1
497 * based if the coordinate is above or below all items respectively in the
498 * gengrid.
499 *
500 * @param[in] obj The object.
501 * @param[in] x The input x coordinate.
502 * @param[in] y The input y coordinate.
503 * @param[out] xposret The position relative to the item returned here.
504 * @param[out] yposret The position relative to the item returned here.
505 *
506 * @return The item at the coordinates or @c null if none.
507 *
508 * @ingroup Elm_Gengrid_Group
509 */
510EAPI Elm_Widget_Item *elm_gengrid_at_xy_item_get(const Elm_Gengrid *obj, int x, int y, int *xposret, int *yposret);
511
512/**
513 * @brief Append a new item in a given gengrid widget.
514 *
515 * This adds an item to the beginning of the gengrid.
516 *
517 * @param[in] obj The object.
518 * @param[in] itc The item class for the item.
519 * @param[in] data The item data.
520 * @param[in] func Convenience function called when the item is selected.
521 * @param[in] func_data Data to be passed to @c func.
522 *
523 * @return A handle to the item added or @c null on errors.
524 *
525 * @ingroup Elm_Gengrid_Group
526 */
527EAPI Elm_Widget_Item *elm_gengrid_item_append(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
528
529/**
530 * @brief Prepend a new item in a given gengrid widget.
531 *
532 * This adds an item to the end of the gengrid.
533 *
534 * @param[in] obj The object.
535 * @param[in] itc The item class for the item.
536 * @param[in] data The item data.
537 * @param[in] func Convenience function called when the item is selected.
538 * @param[in] func_data Data to be passed to @c func.
539 *
540 * @return A handle to the item added or @c null on errors.
541 *
542 * @ingroup Elm_Gengrid_Group
543 */
544EAPI Elm_Widget_Item *elm_gengrid_item_prepend(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
545
546/**
547 * @brief Remove all items from a given gengrid widget.
548 *
549 * This removes (and deletes) all items in @c obj, leaving it empty.
550 *
551 * See @ref elm_gengrid_item_del to remove just one item.
552 * @param[in] obj The object.
553 *
554 * @ingroup Elm_Gengrid_Group
555 */
556EAPI void elm_gengrid_clear(Elm_Gengrid *obj);
557
558/**
559 * @brief Insert an item in a gengrid widget using a user-defined sort
560 * function.
561 *
562 * This inserts an item in the gengrid based on user defined comparison
563 * function. The two arguments passed to the function @c func are gengrid item
564 * handles to compare.
565 *
566 * @param[in] obj The object.
567 * @param[in] itc The item class for the item.
568 * @param[in] data The item data.
569 * @param[in] comp User defined comparison function that defines the sort order
570 * based on gengrid item and its data.
571 * @param[in] func Convenience function called when the item is selected.
572 * @param[in] func_data Data to be passed to @c func.
573 *
574 * @return A handle to the item added or @c null on errors.
575 *
576 * @ingroup Elm_Gengrid_Group
577 */
578EAPI Elm_Widget_Item *elm_gengrid_item_sorted_insert(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
579
580/**
581 * @brief Get gengrid item by given string.
582 *
583 * It takes pointer to the gengrid item that will be used to start search from
584 * it.
585 *
586 * This function uses globs (like "*.jpg") for searching and takes search flags
587 * as last parameter That is a bitfield with values to be ored together or 0
588 * for no flags.
589 *
590 * @param[in] obj The object.
591 * @param[in] item_to_search_from Pointer to item to start search from. If
592 * @c null, search will be started from the first item of the gengrid.
593 * @param[in] part_name Name of the TEXT part of gengrid item to search string
594 * in. If @c null, search by "elm.text" parts.
595 * @param[in] pattern The search pattern.
596 * @param[in] flags Search flags.
597 *
598 * @return Pointer to the gengrid item which matches search_string in case of
599 * success, otherwise @c null.
600 *
601 * @since 1.11
602 *
603 * @ingroup Elm_Gengrid_Group
604 */
605EAPI Elm_Widget_Item *elm_gengrid_search_by_text_item_get(Elm_Gengrid *obj, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags);
606
607/**
608 * @brief Starts the reorder mode of Gengrid
609 *
610 * @param[in] obj The object.
611 * @param[in] tween_mode Position mappings for animation
612 *
613 * @since 1.10
614 *
615 * @ingroup Elm_Gengrid_Group
616 */
617EAPI void elm_gengrid_reorder_mode_start(Elm_Gengrid *obj, Ecore_Pos_Map tween_mode);
618
619/** Stops the reorder mode of Gengrid
620 *
621 * @since 1.10
622 *
623 * @ingroup Elm_Gengrid_Group
624 */
625EAPI void elm_gengrid_reorder_mode_stop(Elm_Gengrid *obj);
626
627#endif
diff --git a/src/lib/elementary/elm_gengrid_item.eo b/src/lib/elementary/elm_gengrid_item.eo
deleted file mode 100644
index 87ddbbc..0000000
--- a/src/lib/elementary/elm_gengrid_item.eo
+++ /dev/null
@@ -1,236 +0,0 @@
1import elm_general;
2
3class Elm.Gengrid.Item extends Elm.Widget.Item.Static_Focus implements Efl.Ui.Focus.Object, Efl.Ui.Legacy
4{
5 [[Elementary gengrid item class]]
6 legacy_prefix: elm_gengrid_item;
7 eo_prefix: elm_obj_gengrid_item;
8 data: Elm_Gen_Item;
9 methods {
10 @property prev {
11 get {
12 [[Get the previous item in a gengrid widget's internal list of items, given a handle to one of those items.
13
14 This returns the item placed before the $item, on the container
15 gengrid.]]
16 }
17 values {
18 item: Elm.Widget.Item; [[The item before $item, or $NULL if there's none (and on errors)]]
19 }
20 }
21 @property next {
22 get {
23 [[Get the next item in a gengrid widget's internal list of items,
24 given a handle to one of those items.
25
26 This returns the item placed after the $item, on the container
27 gengrid.]]
28 }
29 values {
30 item: Elm.Widget.Item; [[The item after $item, or $NULL if there's none (and on errors)]]
31 }
32 }
33 @property selected {
34 [[Control whether a given gengrid item is selected or not
35
36 This API returns true for all the items selected in multi-select mode as well.
37
38 This sets the selected state of an item. If multi-selection is
39 not enabled on the containing gengrid and $selected is
40 true, any other previously selected items will get
41 unselected in favor of this new one.]]
42 get {
43 }
44 set {
45 }
46 values {
47 selected: bool; [[The selected state ($true selected, $false not selected)]]
48 }
49 }
50 @property item_class {
51 get {
52 [[Get the Gengrid Item class for the given Gengrid Item.
53
54 This returns the Gengrid_Item_Class for the given item. It can be used to examine
55 the function pointers and item_style.]]
56 }
57 values {
58 @cref itc: Elm.Gengrid.Item.Class; [[Gengrid Item class for the given item]]
59 }
60 }
61 @property index {
62 get {
63 [[Get the index of the item. It is only valid once displayed.]]
64 }
65 values {
66 index: int(-1); [[The position inside the list of item.]]
67 }
68 }
69 @property pos {
70 get {
71 [[Get a given gengrid item's position, relative to the whole gengrid's grid area.
72
73 This returns the "logical" position of the item within the
74 gengrid. For example, $(0, 1) would stand for first row,
75 second column.]]
76 }
77 values {
78 x: uint; [[Pointer to variable to store the item's <b>row number</b>.]]
79 y: uint; [[Pointer to variable to store the item's <b>column number</b>.]]
80 }
81 }
82 @property select_mode {
83 [[Control the gengrid item's select mode.
84
85 (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
86
87 elm_gengrid_select_mode_set() changes item's select mode.
88 - ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection func and
89 callback when first becoming selected. Any further clicks will
90 do nothing, unless you set always select mode.
91 - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
92 every click will make the selected callbacks be called.
93 - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select the item
94 entirely and they will neither appear selected nor call selected
95 callback functions.
96 - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY : This will apply no-finger-size rule
97 with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be
98 smaller than lower limit. Clickable objects should be bigger than
99 human touch point device (your finger) for some touch or
100 small screen devices. So it is enabled, the item can be shrink than
101 predefined finger-size value. And the item will be updated.]]
102 get {
103 }
104 set {
105 }
106 values {
107 mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The selected mode]]
108 }
109 }
110 @property custom_size {
111 [[Custom size mode for non-homogeneous gengrid. ]]
112 get {
113 [[Get the dimensions of a gengrid item.
114
115 Gives the dimensions set with elm_gengrid_item_custom_size_set(). If the item
116 has not been modified values set with elm_gengrid_item_size_set() are obtained.
117
118 @since 1.19]]
119 }
120 set {
121 [[Resize dimensions of a gengrid item.
122
123 In case of a horizontal grid, only the widths only be resized and
124 in case of vertical only the heights can be resized. Item size
125 should be set by elm_gengrid_item_size_set() beforehand.
126
127 The values set by elm_gengrid_item_size_set() will be used for the
128 dimension that remains fixed.
129
130 @since 1.19]]
131 }
132 values {
133 w : int; [[The item's width.]]
134 h : int; [[The item's height.]]
135 }
136 }
137 /* init { FIXME
138 params {
139 Evas_Smart_Cb func;
140 const(void_ptr) data;
141 }
142 }*/
143 show {
144 [[Show the portion of a gengrid's internal grid containing a given
145 item, immediately.
146
147 This causes gengrid to redraw its viewport's contents to the
148 region containing the given $item item, if it is not fully
149 visible.]]
150 params {
151 @in type: Elm.Gengrid.Item.Scrollto_Type; [[Where to position the item in the viewport.]]
152 }
153 }
154 bring_in {
155 [[Animatedly bring in, to the visible area of a gengrid, a given item on it.
156
157 This causes gengrid to jump to the given $item and show
158 it (by scrolling), if it is not fully visible. This will use
159 animation to do so and take a period of time to complete.]]
160 params {
161 @in type: Elm.Gengrid.Item.Scrollto_Type; [[Where to position the item in the viewport.]]
162 }
163 }
164 update {
165 [[Update the contents of a given gengrid item
166
167 This updates an item by calling all the item class functions
168 again to get the contents, texts and states. Use this when the
169 original item data has changed and you want the changes to be
170 reflected.]]
171 }
172 fields_update {
173 [[Update the part of an item
174
175 This updates an item's part by calling item's fetching functions again
176 to get the contents, texts and states. Use this when the original
177 item data has changed and the changes are desired to be reflected.
178 Second parts argument is used for globbing to match '*', '?', and '.'
179 It can be used at updating multi fields.
180
181 Use elm_gengrid_realized_items_update() to update an item's all
182 property.
183
184 @since 1.15]]
185 params {
186 @in parts: string; [[The name of item's part]]
187 @in itf: Elm.Gengrid.Item.Field_Type; [[The type of item's part type]]
188 }
189 }
190 item_class_update {
191 [[Update the item class of a gengrid item.
192
193 This sets another class of the item, changing the way that it is
194 displayed. After changing the item class, elm_gengrid_item_update() is
195 called on the item $it.]]
196 params {
197 @cref itc: Elm.Gengrid.Item.Class; [[The gengrid item class describing the function pointers and the item style.]]
198 }
199 }
200 all_contents_unset{
201
202 [[Unset all contents fetched by the item class
203
204 This instructs gengrid to release references to contents in the item,
205 meaning that they will no longer be managed by gengrid and are
206 floating "orphans" that can be re-used elsewhere if the user wants
207 to.
208
209 @since 1.18
210 ]]
211 params {
212 @out l: list<Efl.Canvas.Object> @owned; [[The contents list to return.]]
213 }
214 }
215 }
216 implements {
217 Efl.Object.constructor;
218 Elm.Widget.Item.del_pre;
219 Elm.Widget.Item.disable;
220 Elm.Widget.Item.signal_emit;
221 Elm.Widget.Item.item_focus { get; set; }
222 Elm.Widget.Item.part_text { get; }
223 Elm.Widget.Item.part_content { get; }
224 Elm.Widget.Item.tooltip_text_set;
225 Elm.Widget.Item.tooltip_style { get; set; }
226 Elm.Widget.Item.tooltip_window_mode { get; set; }
227 Elm.Widget.Item.tooltip_content_cb_set;
228 Elm.Widget.Item.tooltip_unset;
229 Elm.Widget.Item.cursor { set; }
230 Elm.Widget.Item.cursor_unset;
231 Efl.Access.Object.i18n_name { get; }
232 Efl.Access.Object.state_set { get; }
233 Efl.Ui.Focus.Object.setup_order_non_recursive;
234 Efl.Ui.Focus.Object.focus_parent { get; }
235 }
236}
diff --git a/src/lib/elementary/elm_gengrid_item_eo.c b/src/lib/elementary/elm_gengrid_item_eo.c
new file mode 100644
index 0000000..fec70ea
--- /dev/null
+++ b/src/lib/elementary/elm_gengrid_item_eo.c
@@ -0,0 +1,243 @@
1
2Elm_Widget_Item *_elm_gengrid_item_prev_get(const Eo *obj, Elm_Gen_Item *pd);
3
4EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_prev_get, Elm_Widget_Item *, NULL);
5
6Elm_Widget_Item *_elm_gengrid_item_next_get(const Eo *obj, Elm_Gen_Item *pd);
7
8EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_next_get, Elm_Widget_Item *, NULL);
9
10void _elm_gengrid_item_selected_set(Eo *obj, Elm_Gen_Item *pd, Eina_Bool selected);
11
12
13static Eina_Error
14__eolian_elm_gengrid_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_gengrid_item_selected_set(obj, cval);
23 end:
24 eina_value_flush(&val);
25 return r;
26}
27
28EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_selected_set, EFL_FUNC_CALL(selected), Eina_Bool selected);
29
30Eina_Bool _elm_gengrid_item_selected_get(const Eo *obj, Elm_Gen_Item *pd);
31
32
33static Eina_Value
34__eolian_elm_gengrid_item_selected_get_reflect(Eo *obj)
35{
36 Eina_Bool val = elm_obj_gengrid_item_selected_get(obj);
37 return eina_value_bool_init(val);
38}
39
40EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_selected_get, Eina_Bool, 0);
41
42const Elm_Gengrid_Item_Class *_elm_gengrid_item_item_class_get(const Eo *obj, Elm_Gen_Item *pd);
43
44EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_class_get, const Elm_Gengrid_Item_Class *, NULL);
45
46int _elm_gengrid_item_index_get(const Eo *obj, Elm_Gen_Item *pd);
47
48
49static Eina_Value
50__eolian_elm_gengrid_item_index_get_reflect(Eo *obj)
51{
52 int val = elm_obj_gengrid_item_index_get(obj);
53 return eina_value_int_init(val);
54}
55
56EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_index_get, int, -1 /* +1 */);
57
58void _elm_gengrid_item_pos_get(const Eo *obj, Elm_Gen_Item *pd, unsigned int *x, unsigned int *y);
59
60EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_item_pos_get, EFL_FUNC_CALL(x, y), unsigned int *x, unsigned int *y);
61
62void _elm_gengrid_item_select_mode_set(Eo *obj, Elm_Gen_Item *pd, Elm_Object_Select_Mode mode);
63
64EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_select_mode_set, EFL_FUNC_CALL(mode), Elm_Object_Select_Mode mode);
65
66Elm_Object_Select_Mode _elm_gengrid_item_select_mode_get(const Eo *obj, Elm_Gen_Item *pd);
67
68EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_select_mode_get, Elm_Object_Select_Mode, 4 /* Elm.Object.Select_Mode.max */);
69
70void _elm_gengrid_item_custom_size_set(Eo *obj, Elm_Gen_Item *pd, int w, int h);
71
72EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_custom_size_set, EFL_FUNC_CALL(w, h), int w, int h);
73
74void _elm_gengrid_item_custom_size_get(const Eo *obj, Elm_Gen_Item *pd, int *w, int *h);
75
76EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_item_custom_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
77
78void _elm_gengrid_item_show(Eo *obj, Elm_Gen_Item *pd, Elm_Gengrid_Item_Scrollto_Type type);
79
80EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_show, EFL_FUNC_CALL(type), Elm_Gengrid_Item_Scrollto_Type type);
81
82void _elm_gengrid_item_bring_in(Eo *obj, Elm_Gen_Item *pd, Elm_Gengrid_Item_Scrollto_Type type);
83
84EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_bring_in, EFL_FUNC_CALL(type), Elm_Gengrid_Item_Scrollto_Type type);
85
86void _elm_gengrid_item_update(Eo *obj, Elm_Gen_Item *pd);
87
88EOAPI EFL_VOID_FUNC_BODY(elm_obj_gengrid_item_update);
89
90void _elm_gengrid_item_fields_update(Eo *obj, Elm_Gen_Item *pd, const char *parts, Elm_Gengrid_Item_Field_Type itf);
91
92EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_fields_update, EFL_FUNC_CALL(parts, itf), const char *parts, Elm_Gengrid_Item_Field_Type itf);
93
94void _elm_gengrid_item_item_class_update(Eo *obj, Elm_Gen_Item *pd, const Elm_Gengrid_Item_Class *itc);
95
96EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_class_update, EFL_FUNC_CALL(itc), const Elm_Gengrid_Item_Class *itc);
97
98void _elm_gengrid_item_all_contents_unset(Eo *obj, Elm_Gen_Item *pd, Eina_List **l);
99
100EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_all_contents_unset, EFL_FUNC_CALL(l), Eina_List **l);
101
102Efl_Object *_elm_gengrid_item_efl_object_constructor(Eo *obj, Elm_Gen_Item *pd);
103
104
105void _elm_gengrid_item_elm_widget_item_del_pre(Eo *obj, Elm_Gen_Item *pd);
106
107
108void _elm_gengrid_item_elm_widget_item_disable(Eo *obj, Elm_Gen_Item *pd);
109
110
111void _elm_gengrid_item_elm_widget_item_signal_emit(Eo *obj, Elm_Gen_Item *pd, const char *emission, const char *source);
112
113
114void _elm_gengrid_item_elm_widget_item_item_focus_set(Eo *obj, Elm_Gen_Item *pd, Eina_Bool focused);
115
116
117Eina_Bool _elm_gengrid_item_elm_widget_item_item_focus_get(const Eo *obj, Elm_Gen_Item *pd);
118
119
120const char *_elm_gengrid_item_elm_widget_item_part_text_get(const Eo *obj, Elm_Gen_Item *pd, const char *part);
121
122
123Efl_Canvas_Object *_elm_gengrid_item_elm_widget_item_part_content_get(const Eo *obj, Elm_Gen_Item *pd, const char *part);
124
125
126void _elm_gengrid_item_elm_widget_item_tooltip_text_set(Eo *obj, Elm_Gen_Item *pd, const char *text);
127
128
129void _elm_gengrid_item_elm_widget_item_tooltip_style_set(Eo *obj, Elm_Gen_Item *pd, const char *style);
130
131
132const char *_elm_gengrid_item_elm_widget_item_tooltip_style_get(const Eo *obj, Elm_Gen_Item *pd);
133
134
135Eina_Bool _elm_gengrid_item_elm_widget_item_tooltip_window_mode_set(Eo *obj, Elm_Gen_Item *pd, Eina_Bool disable);
136
137
138Eina_Bool _elm_gengrid_item_elm_widget_item_tooltip_window_mode_get(const Eo *obj, Elm_Gen_Item *pd);
139
140
141void _elm_gengrid_item_elm_widget_item_tooltip_content_cb_set(Eo *obj, Elm_Gen_Item *pd, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
142
143
144void _elm_gengrid_item_elm_widget_item_tooltip_unset(Eo *obj, Elm_Gen_Item *pd);
145
146
147void _elm_gengrid_item_elm_widget_item_cursor_set(Eo *obj, Elm_Gen_Item *pd, const char *cursor);
148
149
150void _elm_gengrid_item_elm_widget_item_cursor_unset(Eo *obj, Elm_Gen_Item *pd);
151
152
153const char *_elm_gengrid_item_efl_access_object_i18n_name_get(const Eo *obj, Elm_Gen_Item *pd);
154
155
156Efl_Access_State_Set _elm_gengrid_item_efl_access_object_state_set_get(const Eo *obj, Elm_Gen_Item *pd);
157
158
159void _elm_gengrid_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen_Item *pd);
160
161
162Efl_Ui_Focus_Object *_elm_gengrid_item_efl_ui_focus_object_focus_parent_get(const Eo *obj, Elm_Gen_Item *pd);
163
164
165static Eina_Bool
166_elm_gengrid_item_class_initializer(Efl_Class *klass)
167{
168 const Efl_Object_Ops *opsp = NULL;
169
170 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
171
172#ifndef ELM_GENGRID_ITEM_EXTRA_OPS
173#define ELM_GENGRID_ITEM_EXTRA_OPS
174#endif
175
176 EFL_OPS_DEFINE(ops,
177 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_prev_get, _elm_gengrid_item_prev_get),
178 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_next_get, _elm_gengrid_item_next_get),
179 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_selected_set, _elm_gengrid_item_selected_set),
180 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_selected_get, _elm_gengrid_item_selected_get),
181 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_class_get, _elm_gengrid_item_item_class_get),
182 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_index_get, _elm_gengrid_item_index_get),
183 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_pos_get, _elm_gengrid_item_pos_get),
184 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_select_mode_set, _elm_gengrid_item_select_mode_set),
185 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_select_mode_get, _elm_gengrid_item_select_mode_get),
186 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_custom_size_set, _elm_gengrid_item_custom_size_set),
187 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_custom_size_get, _elm_gengrid_item_custom_size_get),
188 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_show, _elm_gengrid_item_show),
189 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_bring_in, _elm_gengrid_item_bring_in),
190 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_update, _elm_gengrid_item_update),
191 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_fields_update, _elm_gengrid_item_fields_update),
192 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_class_update, _elm_gengrid_item_item_class_update),
193 EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_all_contents_unset, _elm_gengrid_item_all_contents_unset),
194 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_gengrid_item_efl_object_constructor),
195 EFL_OBJECT_OP_FUNC(elm_wdg_item_del_pre, _elm_gengrid_item_elm_widget_item_del_pre),
196 EFL_OBJECT_OP_FUNC(elm_wdg_item_disable, _elm_gengrid_item_elm_widget_item_disable),
197 EFL_OBJECT_OP_FUNC(elm_wdg_item_signal_emit, _elm_gengrid_item_elm_widget_item_signal_emit),
198 EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_set, _elm_gengrid_item_elm_widget_item_item_focus_set),
199 EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_get, _elm_gengrid_item_elm_widget_item_item_focus_get),
200 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_gengrid_item_elm_widget_item_part_text_get),
201 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_get, _elm_gengrid_item_elm_widget_item_part_content_get),
202 EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_text_set, _elm_gengrid_item_elm_widget_item_tooltip_text_set),
203 EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_style_set, _elm_gengrid_item_elm_widget_item_tooltip_style_set),
204 EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_style_get, _elm_gengrid_item_elm_widget_item_tooltip_style_get),
205 EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_window_mode_set, _elm_gengrid_item_elm_widget_item_tooltip_window_mode_set),
206 EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_window_mode_get, _elm_gengrid_item_elm_widget_item_tooltip_window_mode_get),
207 EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_content_cb_set, _elm_gengrid_item_elm_widget_item_tooltip_content_cb_set),
208 EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_unset, _elm_gengrid_item_elm_widget_item_tooltip_unset),
209 EFL_OBJECT_OP_FUNC(elm_wdg_item_cursor_set, _elm_gengrid_item_elm_widget_item_cursor_set),
210 EFL_OBJECT_OP_FUNC(elm_wdg_item_cursor_unset, _elm_gengrid_item_elm_widget_item_cursor_unset),
211 EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_gengrid_item_efl_access_object_i18n_name_get),
212 EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_gengrid_item_efl_access_object_state_set_get),
213 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_setup_order_non_recursive, _elm_gengrid_item_efl_ui_focus_object_setup_order_non_recursive),
214 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_focus_parent_get, _elm_gengrid_item_efl_ui_focus_object_focus_parent_get),
215 ELM_GENGRID_ITEM_EXTRA_OPS
216 );
217 opsp = &ops;
218
219 static const Efl_Object_Property_Reflection refl_table[] = {
220 {"selected", __eolian_elm_gengrid_item_selected_set_reflect, __eolian_elm_gengrid_item_selected_get_reflect},
221 {"index", NULL, __eolian_elm_gengrid_item_index_get_reflect},
222 };
223 static const Efl_Object_Property_Reflection_Ops rops = {
224 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
225 };
226 ropsp = &rops;
227
228 return efl_class_functions_set(klass, opsp, ropsp);
229}
230
231static const Efl_Class_Description _elm_gengrid_item_class_desc = {
232 EO_VERSION,
233 "Elm.Gengrid.Item",
234 EFL_CLASS_TYPE_REGULAR,
235 sizeof(Elm_Gen_Item),
236 _elm_gengrid_item_class_initializer,
237 NULL,
238 NULL
239};
240
241EFL_DEFINE_CLASS(elm_gengrid_item_class_get, &_elm_gengrid_item_class_desc, ELM_WIDGET_ITEM_STATIC_FOCUS_CLASS, EFL_UI_FOCUS_OBJECT_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL);
242
243#include "elm_gengrid_item_eo.legacy.c"
diff --git a/src/lib/elementary/elm_gengrid_item_eo.h b/src/lib/elementary/elm_gengrid_item_eo.h
new file mode 100644
index 0000000..b11d264
--- /dev/null
+++ b/src/lib/elementary/elm_gengrid_item_eo.h
@@ -0,0 +1,315 @@
1#ifndef _ELM_GENGRID_ITEM_EO_H_
2#define _ELM_GENGRID_ITEM_EO_H_
3
4#ifndef _ELM_GENGRID_ITEM_EO_CLASS_TYPE
5#define _ELM_GENGRID_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Gengrid_Item;
8
9#endif
10
11#ifndef _ELM_GENGRID_ITEM_EO_TYPES
12#define _ELM_GENGRID_ITEM_EO_TYPES
13
14
15#endif
16/** Elementary gengrid item class
17 *
18 * @ingroup Elm_Gengrid_Item
19 */
20#define ELM_GENGRID_ITEM_CLASS elm_gengrid_item_class_get()
21
22EWAPI const Efl_Class *elm_gengrid_item_class_get(void);
23
24/**
25 * @brief Get the previous item in a gengrid widget's internal list of items,
26 * given a handle to one of those items.
27 *
28 * This returns the item placed before the @c item, on the container gengrid.
29 *
30 * @param[in] obj The object.
31 *
32 * @return The item before @c item, or @c NULL if there's none (and on errors)
33 *
34 * @ingroup Elm_Gengrid_Item
35 */
36EOAPI Elm_Widget_Item *elm_obj_gengrid_item_prev_get(const Eo *obj);
37
38/**
39 * @brief Get the next item in a gengrid widget's internal list of items, given
40 * a handle to one of those items.
41 *
42 * This returns the item placed after the @c item, on the container gengrid.
43 *
44 * @param[in] obj The object.
45 *
46 * @return The item after @c item, or @c NULL if there's none (and on errors)
47 *
48 * @ingroup Elm_Gengrid_Item
49 */
50EOAPI Elm_Widget_Item *elm_obj_gengrid_item_next_get(const Eo *obj);
51
52/**
53 * @brief Control whether a given gengrid item is selected or not
54 *
55 * This API returns true for all the items selected in multi-select mode as
56 * well.
57 *
58 * This sets the selected state of an item. If multi-selection is not enabled
59 * on the containing gengrid and @c selected is true, any other previously
60 * selected items will get unselected in favor of this new one.
61 *
62 * @param[in] obj The object.
63 * @param[in] selected The selected state ($true selected, @c false not
64 * selected)
65 *
66 * @ingroup Elm_Gengrid_Item
67 */
68EOAPI void elm_obj_gengrid_item_selected_set(Eo *obj, Eina_Bool selected);
69
70/**
71 * @brief Control whether a given gengrid item is selected or not
72 *
73 * This API returns true for all the items selected in multi-select mode as
74 * well.
75 *
76 * This sets the selected state of an item. If multi-selection is not enabled
77 * on the containing gengrid and @c selected is true, any other previously
78 * selected items will get unselected in favor of this new one.
79 *
80 * @param[in] obj The object.
81 *
82 * @return The selected state ($true selected, @c false not selected)
83 *
84 * @ingroup Elm_Gengrid_Item
85 */
86EOAPI Eina_Bool elm_obj_gengrid_item_selected_get(const Eo *obj);
87
88/**
89 * @brief Get the Gengrid Item class for the given Gengrid Item.
90 *
91 * This returns the Gengrid_Item_Class for the given item. It can be used to
92 * examine the function pointers and item_style.
93 *
94 * @param[in] obj The object.
95 *
96 * @return Gengrid Item class for the given item
97 *
98 * @ingroup Elm_Gengrid_Item
99 */
100EOAPI const Elm_Gengrid_Item_Class *elm_obj_gengrid_item_class_get(const Eo *obj);
101
102/**
103 * @brief Get the index of the item. It is only valid once displayed.
104 *
105 * @param[in] obj The object.
106 *
107 * @return The position inside the list of item.
108 *
109 * @ingroup Elm_Gengrid_Item
110 */
111EOAPI int elm_obj_gengrid_item_index_get(const Eo *obj);
112
113/**
114 * @brief Get a given gengrid item's position, relative to the whole gengrid's
115 * grid area.
116 *
117 * This returns the "logical" position of the item within the gengrid. For
118 * example, $(0, 1) would stand for first row, second column.
119 *
120 * @param[in] obj The object.
121 * @param[out] x Pointer to variable to store the item's <b>row number</b>.
122 * @param[out] y Pointer to variable to store the item's <b>column number</b>.
123 *
124 * @ingroup Elm_Gengrid_Item
125 */
126EOAPI void elm_obj_gengrid_item_pos_get(const Eo *obj, unsigned int *x, unsigned int *y);
127
128/**
129 * @brief Control the gengrid item's select mode.
130 *
131 * (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
132 *
133 * elm_gengrid_select_mode_set() changes item's select mode. -
134 * ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection
135 * func and callback when first becoming selected. Any further clicks will do
136 * nothing, unless you set always select mode. - ELM_OBJECT_SELECT_MODE_ALWAYS
137 * : This means that, even if selected, every click will make the selected
138 * callbacks be called. - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the
139 * ability to select the item entirely and they will neither appear selected
140 * nor call selected callback functions. - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
141 * : This will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE.
142 * No-finger-size rule makes an item can be smaller than lower limit. Clickable
143 * objects should be bigger than human touch point device (your finger) for
144 * some touch or small screen devices. So it is enabled, the item can be shrink
145 * than predefined finger-size value. And the item will be updated.
146 *
147 * @param[in] obj The object.
148 * @param[in] mode The selected mode
149 *
150 * @ingroup Elm_Gengrid_Item
151 */
152EOAPI void elm_obj_gengrid_item_select_mode_set(Eo *obj, Elm_Object_Select_Mode mode);
153
154/**
155 * @brief Control the gengrid item's select mode.
156 *
157 * (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
158 *
159 * elm_gengrid_select_mode_set() changes item's select mode. -
160 * ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection
161 * func and callback when first becoming selected. Any further clicks will do
162 * nothing, unless you set always select mode. - ELM_OBJECT_SELECT_MODE_ALWAYS
163 * : This means that, even if selected, every click will make the selected
164 * callbacks be called. - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the
165 * ability to select the item entirely and they will neither appear selected
166 * nor call selected callback functions. - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
167 * : This will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE.
168 * No-finger-size rule makes an item can be smaller than lower limit. Clickable
169 * objects should be bigger than human touch point device (your finger) for
170 * some touch or small screen devices. So it is enabled, the item can be shrink
171 * than predefined finger-size value. And the item will be updated.
172 *
173 * @param[in] obj The object.
174 *
175 * @return The selected mode
176 *
177 * @ingroup Elm_Gengrid_Item
178 */
179EOAPI Elm_Object_Select_Mode elm_obj_gengrid_item_select_mode_get(const Eo *obj);
180
181/**
182 * @brief Custom size mode for non-homogeneous gengrid.
183 *
184 * Resize dimensions of a gengrid item.
185 *
186 * In case of a horizontal grid, only the widths only be resized and in case of
187 * vertical only the heights can be resized. Item size should be set by
188 * elm_gengrid_item_size_set() beforehand.
189 *
190 * The values set by elm_gengrid_item_size_set() will be used for the dimension
191 * that remains fixed.
192 *
193 * @param[in] obj The object.
194 * @param[in] w The item's width.
195 * @param[in] h The item's height.
196 *
197 * @since 1.19
198 *
199 * @ingroup Elm_Gengrid_Item
200 */
201EOAPI void elm_obj_gengrid_item_custom_size_set(Eo *obj, int w, int h);
202
203/**
204 * @brief Custom size mode for non-homogeneous gengrid.
205 *
206 * Get the dimensions of a gengrid item.
207 *
208 * Gives the dimensions set with elm_gengrid_item_custom_size_set(). If the
209 * item has not been modified values set with elm_gengrid_item_size_set() are
210 * obtained.
211 *
212 * @param[in] obj The object.
213 * @param[out] w The item's width.
214 * @param[out] h The item's height.
215 *
216 * @since 1.19
217 *
218 * @ingroup Elm_Gengrid_Item
219 */
220EOAPI void elm_obj_gengrid_item_custom_size_get(const Eo *obj, int *w, int *h);
221
222/**
223 * @brief Show the portion of a gengrid's internal grid containing a given
224 * item, immediately.
225 *
226 * This causes gengrid to redraw its viewport's contents to the region
227 * containing the given @c item item, if it is not fully visible.
228 *
229 * @param[in] obj The object.
230 * @param[in] type Where to position the item in the viewport.
231 *
232 * @ingroup Elm_Gengrid_Item
233 */
234EOAPI void elm_obj_gengrid_item_show(Eo *obj, Elm_Gengrid_Item_Scrollto_Type type);
235
236/**
237 * @brief Animatedly bring in, to the visible area of a gengrid, a given item
238 * on it.
239 *
240 * This causes gengrid to jump to the given @c item and show it (by scrolling),
241 * if it is not fully visible. This will use animation to do so and take a
242 * period of time to complete.
243 *
244 * @param[in] obj The object.
245 * @param[in] type Where to position the item in the viewport.
246 *
247 * @ingroup Elm_Gengrid_Item
248 */
249EOAPI void elm_obj_gengrid_item_bring_in(Eo *obj, Elm_Gengrid_Item_Scrollto_Type type);
250
251/**
252 * @brief Update the contents of a given gengrid item
253 *
254 * This updates an item by calling all the item class functions again to get
255 * the contents, texts and states. Use this when the original item data has
256 * changed and you want the changes to be reflected.
257 * @param[in] obj The object.
258 *
259 * @ingroup Elm_Gengrid_Item
260 */
261EOAPI void elm_obj_gengrid_item_update(Eo *obj);
262
263/**
264 * @brief Update the part of an item
265 *
266 * This updates an item's part by calling item's fetching functions again to
267 * get the contents, texts and states. Use this when the original item data has
268 * changed and the changes are desired to be reflected. Second parts argument
269 * is used for globbing to match '*', '?', and '.' It can be used at updating
270 * multi fields.
271 *
272 * Use elm_gengrid_realized_items_update() to update an item's all property.
273 *
274 * @param[in] obj The object.
275 * @param[in] parts The name of item's part
276 * @param[in] itf The type of item's part type
277 *
278 * @since 1.15
279 *
280 * @ingroup Elm_Gengrid_Item
281 */
282EOAPI void elm_obj_gengrid_item_fields_update(Eo *obj, const char *parts, Elm_Gengrid_Item_Field_Type itf);
283
284/**
285 * @brief Update the item class of a gengrid item.
286 *
287 * This sets another class of the item, changing the way that it is displayed.
288 * After changing the item class, elm_gengrid_item_update() is called on the
289 * item @c it.
290 *
291 * @param[in] obj The object.
292 * @param[in] itc The gengrid item class describing the function pointers and
293 * the item style.
294 *