summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_gengrid.eo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_gengrid.eo')
-rw-r--r--src/lib/elementary/elm_gengrid.eo553
1 files changed, 0 insertions, 553 deletions
diff --git a/src/lib/elementary/elm_gengrid.eo b/src/lib/elementary/elm_gengrid.eo
deleted file mode 100644
index e397ad4..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 implements Efl.Ui.Focus.Composition, Elm.Interface_Scrollable,
13 Efl.Ui.Clickable, Efl.Access.Widget.Action,
14 Efl.Access.Selection, Efl.Ui.Legacy
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_event;
512 Efl.Ui.Widget.focus_highlight_geometry { get; }
513 Efl.Ui.Widget.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}