summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_genlist.eo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_genlist.eo')
-rw-r--r--src/lib/elementary/elm_genlist.eo598
1 files changed, 0 insertions, 598 deletions
diff --git a/src/lib/elementary/elm_genlist.eo b/src/lib/elementary/elm_genlist.eo
deleted file mode 100644
index 2ef3817..0000000
--- a/src/lib/elementary/elm_genlist.eo
+++ /dev/null
@@ -1,598 +0,0 @@
1import elm_general;
2
3class Elm.Genlist extends Efl.Ui.Layout implements Elm.Interface_Scrollable, Efl.Ui.Clickable,
4 Efl.Access.Widget.Action, Efl.Access.Selection,
5 Efl.Ui.Selectable, Efl.Ui.Legacy
6{
7 [[Elementary genlist class]]
8 legacy_prefix: elm_genlist;
9 eo_prefix: elm_obj_genlist;
10 event_prefix: elm_genlist;
11 methods {
12 @property homogeneous {
13 set {
14 [[Enable/disable homogeneous mode.
15
16 This will enable the homogeneous mode where items are of the
17 same height and width so that genlist may do the lazy-loading
18 at its maximum (which increases the performance for scrolling
19 the list). In the normal mode, genlist will pre-calculate all
20 the items' sizes even though they are not in use. So items'
21 callbacks are called many times than expected. But homogeneous
22 mode will skip the item size pre-calculation process so
23 items' callbacks are called only when the item is needed.
24
25 Note: This also works well with group index.
26 ]]
27 }
28 get {
29 [[Get whether the homogeneous mode is enabled.]]
30 }
31 values {
32 homogeneous: bool; [[Assume the items within the genlist are of
33 the same height and width. Default is $false.]]
34 }
35 }
36 @property select_mode {
37 set {
38 [[Set the genlist select mode.
39
40 #ELM_OBJECT_SELECT_MODE_DEFAULT means that items will call
41 their selection func and callback once when first becoming
42 selected. Any further clicks will do nothing, unless you set
43 always select mode. ELM_OBJECT_SELECT_MODE_ALWAYS means that
44 even if selected, every click will make the selected callbacks
45 be called. #ELM_OBJECT_SELECT_MODE_NONE will turn off the
46 ability to select items entirely and they will neither appear
47 selected nor call selected callback functions.
48 ]]
49 }
50 get {
51 [[Get the genlist select mode.]]
52 }
53 values {
54 mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The select mode.]]
55 }
56 }
57 @property focus_on_selection {
58 set {
59 [[Set focus upon items selection mode
60
61 When enabled, every selection of an item inside the genlist
62 will automatically set focus to its first focusable widget
63 from the left. This is true of course if the selection was
64 made by clicking an unfocusable area in an item or selecting
65 it with a key movement. Clicking on a focusable widget inside
66 an item will cause this particular item to get focus as usual.
67 ]]
68 }
69 get {
70 [[Get whether focus upon item's selection mode is enabled.]]
71 }
72 values {
73 enabled: bool; [[The tree effect status.]]
74 }
75 }
76 @property longpress_timeout {
77 set {
78 [[Set the timeout in seconds for the longpress event.
79
80 This option will change how long it takes to send an event
81 "longpressed" after the mouse down signal is sent to the list.
82 If this event occurs, no "clicked" event will be sent.
83
84 Warning: If you set the longpress timeout value with this API,
85 your genlist will not be affected by the longpress value of
86 elementary config value later.
87 ]]
88 }
89 get {
90 [[Get the timeout in seconds for the longpress event.]]
91 }
92 values {
93 timeout: double; [[Timeout in seconds. Default is elm config value (1.0).]]
94 }
95 }
96 @property multi_select {
97 set {
98 [[Enable or disable multi-selection in the genlist.
99
100 This enables ($true) or disables ($false) multi-selection in
101 the list. This allows more than 1 item to be selected. To
102 retrieve the list of selected items, use @.selected_items.get.
103 ]]
104 }
105 get {
106 [[Get if multi-selection in genlist is enabled or disabled.]]
107 }
108 values {
109 multi: bool; [[Multi-select enable/disable. Default is disabled.]]
110 }
111 }
112 @property reorder_mode {
113 set {
114 [[Set reorder mode.
115
116 After turning on the reorder mode, longpress on normal item
117 will trigger reordering of the item. You can move the item
118 up and down. However, reorder does not work with group item.
119 ]]
120 }
121 get {
122 [[Get the reorder mode.]]
123 }
124 values {
125 reorder_mode: bool; [[The reorder mode.]]
126 }
127 }
128 @property decorate_mode {
129 set {
130 [[Set Genlist decorate mode.
131
132 This sets Genlist decorate mode to all items.
133 ]]
134 }
135 get {
136 [[Get Genlist decorate mode.]]
137 }
138 values {
139 decorated: bool; [[The decorate mode status.]]
140 }
141 }
142 @property multi_select_mode {
143 set {
144 [[Set the genlist multi select mode.
145
146 #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that
147 select/unselect items whenever each item is clicked.
148 #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL means that only
149 one item will be selected although multi-selection is enabled,
150 if clicked without pressing control key. This mode is only
151 available with multi-selection.
152
153 @since 1.8
154 ]]
155 }
156 get {
157 [[Get the genlist multi select mode.
158
159 @since 1.8
160 ]]
161 }
162 values {
163 mode: Elm.Object.Multi_Select_Mode(Elm.Object.Multi_Select_Mode.max); [[The multi select mode]]
164 }
165 }
166 @property block_count {
167 set {
168 [[Set the maximum number of items within an item block.
169
170 This will configure the block count to tune to the target
171 with particular performance matrix.
172
173 A block of objects will be used to reduce the number of
174 operations due to many objects in the screen. It can
175 determine the visibility, or if the object has changed,
176 it theme needs to be updated, etc. doing this kind of
177 calculation to the entire block, instead of per object.
178
179 The default value for the block count is enough for most
180 lists, so unless you know you will have a lot of objects
181 visible in the screen at the same time, don't try to
182 change this.
183 ]]
184 }
185 get {
186 [[Get the maximum number of items within an item block.]]
187 }
188 values {
189 count: int; [[Maximum number of items within an item block. Default is 32.]]
190 }
191 }
192 @property tree_effect_enabled {
193 [[Control genlist tree effect.]]
194 set {}
195 get {}
196 values {
197 enabled: bool; [[The tree effect status.]]
198 }
199 }
200 @property highlight_mode {
201 set {
202 [[Set whether the genlist items should be highlighted on item
203 selection.
204
205 This will turn on/off the highlight effect on item selection.
206 The selected and clicked callback functions will still be
207 called.
208
209 Highlight is enabled by default.
210 ]]
211 }
212 get {
213 [[Get whether the genlist items' should be highlighted when
214 item selected.
215 ]]
216 }
217 values {
218 highlight: bool; [[$true to enable highlighting or $false to
219 disable it.]]
220 }
221 }
222 @property mode {
223 set {
224 [[This sets the horizontal stretching mode.
225
226 This sets the mode used for sizing items horizontally. Valid
227 modes are @Elm.List.Mode.limit, @Elm.List.Mode.scroll, and
228 @Elm.List.Mode.compress. The default is @Elm.List.Mode.scroll. This mode
229 means that if items are too wide to fit, the scroller will
230 scroll horizontally. Otherwise items are expanded to fill
231 the width of the viewport of the scroller. If it is
232 @Elm.List.Mode.limit, items will be expanded to the viewport width
233 and limited to that size. If it is @Elm.List.Mode.compress, the
234 item width will be fixed (restricted to a minimum of) to the
235 list width when calculating its size in order to allow the
236 height to be calculated based on it. This allows, for
237 instance, text block to wrap lines if the Edje part is
238 configured with "text.min: 0 1".
239
240 Note: @Elm.List.Mode.compress will make list resize slower as it
241 will have to recalculate every item height again whenever
242 the list width changes!
243
244 Note: Homogeneous mode gives all items in the genlist the
245 same width/height. With @Elm.List.Mode.compress, genlist items
246 initialize fast, but there cannot be any sub-objects in the genlist
247 which require on-the-fly resizing (such as TEXTBLOCK).
248 In this case some dynamic resizable objects in the genlist might not
249 diplay properly.
250 ]]
251 }
252 get {
253 [[Get the horizontal stretching mode.]]
254 }
255 values {
256 mode: Elm.List.Mode(Elm.List.Mode.last); [[The mode to use (one of @Elm.List.Mode.scroll or @Elm.List.Mode.limit).]]
257 }
258 }
259 @property decorated_item {
260 get {
261 [[Get active genlist mode item.
262
263 This function returns the item that was activated with a mode,
264 by the function @.decorate_mode.set.
265 ]]
266 return: Elm.Widget.Item; [[The active item for that current mode.
267 Or $null if no item is activated with any mode.]]
268 }
269 }
270 @property selected_item {
271 get {
272 [[Get the selected item in the genlist.
273
274 This gets the selected item in the list (if multi-selection
275 is enabled, only the item that was first selected in the list
276 is returned - which is not very useful, so see
277 @.selected_items.get for when multi-selection is used).
278
279 If no item is selected, $null is returned.
280 ]]
281 return: Elm.Widget.Item; [[The selected item, or $null if none is selected.]]
282 }
283 }
284 @property first_item {
285 get {
286 [[Get the first item in the genlist.
287
288 This returns the first item in the list.
289
290 If filter is set on genlist, it returns
291 the first filtered item in the list.
292 ]]
293 return: Elm.Widget.Item; [[The first item or $null.]]
294 }
295 }
296 @property realized_items {
297 get {
298 [[Get a list of realized items in genlist.
299
300 This returns a list of the realized items in the genlist.
301 The list contains genlist item pointers. The list must be
302 freed by the caller when done with \@ref eina_list_free. The
303 item pointers in the list are only valid so long as those
304 items are not deleted or the genlist is not deleted.
305 ]]
306 return: list<ptr(Elm_Gen_Item)> @owned @warn_unused; [[List of realized items]]
307 }
308 }
309 @property selected_items {
310 get {
311 [[Get a list of selected items in the genlist.
312
313 It returns a list of the selected items. This list pointer
314 is only valid so long as the selection doesn't change (no
315 items are selected or unselected, or unselected implicitl
316 by deletion). The list contains genlist items pointers. The
317 order of the items in this list is the order which they were
318 selected, i.e. the first item in this list is the first item
319 that was selected, and so on.
320
321 Note: If not in multi-select mode, consider using function
322 @.selected_item.get instead.
323 ]]
324 return: const(list<Elm.Widget.Item>); [[List of selected items]]
325 }
326 }
327 @property last_item {
328 get {
329 [[Get the last item in the genlist
330
331 This returns the last item in the list.
332
333 If filter is set to genlist, it returns
334 last filtered item in the list.
335 ]]
336 return: Elm.Widget.Item; [[Last item in list]]
337 }
338 }
339 item_insert_before {
340 [[Insert an item before another in a genlist widget
341
342 This inserts an item before another in the list. It will be in
343 the same tree level or group as the item it is inserted before.
344 ]]
345 return: Elm.Widget.Item; [[Handle to inserted item]]
346 params {
347 @cref itc: Elm.Genlist.Item.Class; [[The item class for the item.]]
348 @in data: const(void_ptr); [[The item data.]]
349 @in parent: Elm.Widget.Item @nullable; [[The parent item, or $null if none.]]
350 @in before_it: Elm.Widget.Item; [[The item to place this new one before.]]
351 @in type: Elm.Genlist.Item.Type; [[Item type.]]
352 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
353 @in func_data: const(void_ptr) @optional; [[Data passed to $func above.]]
354 }
355 }
356 realized_items_update {
357 [[Update the contents of all realized items.
358
359 This updates all realized items by calling all the item class
360 functions again to get the contents, texts and states. Use this
361 when the original item data has changed and the changes are
362 desired to be reflected.
363
364 To update just one item, use \@ref elm_genlist_item_update.
365 ]]
366 }
367 item_insert_after {
368 [[Insert an item after another in a genlist widget
369
370 This inserts an item after another in the list. It will be in the
371 same tree level or group as the item it is inserted after.
372 ]]
373 return: Elm.Widget.Item; [[Handle to inserted item]]
374 params {
375 @cref itc: Elm.Genlist.Item.Class; [[The item class for the item.]]
376 @in data: const(void_ptr); [[The item data.]]
377 @in parent: Elm.Widget.Item @nullable; [[The parent item, or $null if none.]]
378 @in after_it: Elm.Widget.Item; [[The item to place this new one after.]]
379 @in type: Elm.Genlist.Item.Type; [[Item type.]]
380 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
381 @in func_data: const(void_ptr) @optional; [[Data passed to $func above.]]
382 }
383 }
384 at_xy_item_get @const {
385 [[Get the item that is at the x, y canvas coords.
386
387 This returns the item at the given coordinates (which are canvas
388 relative, not object-relative). If an item is at that coordinate,
389 that item handle is returned, and if $posret is not NULL, the
390 integer pointed to is set to a value of -1, 0 or 1, depending if
391 the coordinate is on the upper portion of that item (-1), on the
392 middle section (0) or on the lower part (1). If NULL is returned
393 as an item (no item found there), then posret may indicate -1 or
394 1 based if the coordinate is above or below all items
395 respectively in the genlist.
396 ]]
397 return: Elm.Widget.Item; [[Item at position]]
398 params {
399 @in x: int; [[The input x coordinate.]]
400 @in y: int; [[The input y coordinate.]]
401 @out posret: int; [[The position relative to the item returned here.]]
402 }
403 }
404 @property filter {
405 set {
406 [[Set filter mode with key.
407
408 This initiates the filter mode of genlist with user/application
409 provided key. If key is NULL, the filter mode is turned off.
410
411 The filter data passed has to be managed by application itself and
412 should not be deleted before genlist is deleted(or while filtering
413 is not done.
414 ]]
415 }
416 values {
417 key: void_ptr; [[Filter key]]
418 }
419 }
420 filter_iterator_new {
421 [[Returns an iterator over the list of filtered items.
422
423 Return NULL if filter is not set. Application must take care
424 of the case while calling the API. Must be freed after use.
425 ]]
426 return: iterator<ptr(Elm_Gen_Item)> @owned; [[Iterator on genlist]]
427 }
428 filtered_items_count @const {
429 [[Return how many items have passed the filter currently.
430
431 This behaviour is O(1) and returns the count of items which
432 are currently passed by the filter. After "filter,done", the
433 call returns total count of the filtered items.
434
435 @since 1.18
436 ]]
437 return: uint; [[Count of items passing the filter]]
438 }
439 items_count @const {
440 [[Return how many items are currently in a list.
441
442 This behavior is O(1) and includes items which may or may not
443 be realized.
444 ]]
445 return: uint; [[Item in list]]
446 }
447 item_prepend {
448 [[Prepend a new item in a given genlist widget.
449
450 This adds an item to the beginning of the list or beginning of
451 the children of the parent if given.
452 ]]
453 return: Elm.Widget.Item; [[Handle to prepended item]]
454 params {
455 @cref itc: Elm.Genlist.Item.Class; [[The item class for the item.]]
456 @in data: const(void_ptr); [[The item data.]]
457 @in parent: Elm.Widget.Item @nullable; [[The parent item, or $null if none.]]
458 @in type: Elm.Genlist.Item.Type; [[Item type.]]
459 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
460 @in func_data: const(void_ptr) @optional; [[Data passed to $func above.]]
461 }
462 }
463 clear {
464 [[Remove all items from a given genlist widget.
465
466 This removes (and deletes) all items in $obj, leaving it empty.
467 ]]
468 }
469 item_append {
470 [[Append a new item in a given genlist widget.
471
472 This adds the given item to the end of the list or the end of
473 the children list if the $parent is given.
474 ]]
475 return: Elm.Widget.Item; [[Handle to appended item]]
476 params {
477 @cref itc: Elm.Genlist.Item.Class; [[The item class for the item.]]
478 @in data: const(void_ptr); [[The item data.]]
479 @in parent: Elm.Widget.Item @nullable; [[The parent item, or $null if none.]]
480 @in type: Elm.Genlist.Item.Type; [[Item type.]]
481 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
482 @in func_data: const(void_ptr) @optional; [[Data passed to $func above.]]
483 }
484 }
485 item_sorted_insert {
486 [[Insert a new item into the sorted genlist object
487
488 This inserts an item in the genlist based on user defined
489 comparison function. The two arguments passed to the function
490 $func are genlist item handles to compare.
491 ]]
492 return: Elm.Widget.Item; [[Handle to inserted item]]
493 params {
494 @cref itc: Elm.Genlist.Item.Class; [[The item class for the item.]]
495 @in data: const(void_ptr); [[The item data.]]
496 @in parent: Elm.Widget.Item @nullable; [[The parent item, or $null if none.]]
497 @in type: Elm.Genlist.Item.Type; [[Item type.]]
498 @in comp: Eina_Compare_Cb; [[The function called for the sort.]]
499 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
500 @in func_data: const(void_ptr) @optional; [[Data passed to $func above.]]
501 }
502 }
503 search_by_text_item_get {
504 [[Get genlist item by given string.
505
506 It takes pointer to the genlist item that will be used to start
507 search from it.
508
509 This function uses globs (like "*.jpg") for searching and takes
510 search flags as last parameter That is a bitfield with values
511 to be ored together or 0 for no flags.
512
513 @since 1.11
514 ]]
515 return: Elm.Widget.Item; [[Searched item]]
516 params {
517 @in item_to_search_from: Elm.Widget.Item @optional; [[
518 Pointer to item to start search from. If $null, search
519 will be started from the first item of the genlist.
520 ]]
521 @in part_name: string; [[Name of the TEXT part of genlist item to search string in.]]
522 @in pattern: string; [[The search pattern.]]
523 @in flags: Elm.Glob.Match_Flags; [[Search flags.]]
524 }
525 }
526 }
527 implements {
528 class.constructor;
529 Efl.Object.constructor;
530 Efl.Gfx.Entity.position { set; }
531 Efl.Gfx.Entity.size { set; }
532 Efl.Canvas.Group.group_member_add;
533 Efl.Object.provider_find;
534 Efl.Ui.Widget.theme_apply;
535 Efl.Ui.Widget.widget_sub_object_add;
536 Efl.Ui.Widget.on_access_update;
537 Efl.Ui.Widget.focus_highlight_geometry { get; }
538 Efl.Ui.Focus.Object.on_focus_update;
539 Efl.Ui.Widget.widget_sub_object_del;
540 Efl.Ui.Widget.widget_event;
541 Efl.Ui.Widget.focused_item { get; }
542 Elm.Interface_Scrollable.item_loop_enabled { get; set; }
543 Elm.Interface_Scrollable.bounce_allow { get; set; }
544 Elm.Interface_Scrollable.policy { get; set; }
545 Efl.Access.Object.access_children { get; }
546 Efl.Access.Object.state_set { get; }
547 Efl.Access.Widget.Action.elm_actions { get; }
548 Efl.Access.Selection.selected_children_count { get; }
549 Efl.Access.Selection.selected_child { get; }
550 Efl.Access.Selection.selected_child_deselect;
551 Efl.Access.Selection.child_select;
552 Efl.Access.Selection.child_deselect;
553 Efl.Access.Selection.is_child_selected;
554 Efl.Access.Selection.all_children_select;
555 Efl.Access.Selection.access_selection_clear;
556 Efl.Ui.Widget.focus_state_apply;
557 Efl.Ui.Focus.Manager.setup_on_first_touch;
558 Efl.Ui.Focus.Manager.manager_focus { get; }
559 Efl.Ui.Focus.Manager.move;
560 }
561 events {
562 item,focused: Efl.Object; [[Called when genlist item got focus]]
563 item,unfocused: Efl.Object; [[Called when genlist item lost focus]]
564 vbar,drag: void; [[Called when vertical bar is dragged]]
565 vbar,press: void; [[Called when vertical bar is pressed]]
566 vbar,unpress: void; [[Called when vertical bar is no longer pressed]]
567 hbar,drag: void; [[Called when horizontal bar is dragged]]
568 hbar,press: void; [[Called when horizontal bar is pressed]]
569 hbar,unpress: void; [[Called when horizontal bar is no longer pressed]]
570 edge,top: void; [[Called when top edge is reached]]
571 edge,bottom: void; [[Called when bottom edge is reached]]
572 edge,left: void; [[Called when left edge is reached]]
573 edge,right: void; [[Called when right edge is reached]]
574 moved: Efl.Object; [[Called when genlist item moved]]
575 moved,before: Efl.Object; [[Called when genlist item moved before]]
576 moved,after: Efl.Object; [[Called when genlist item moved after]]
577 swipe: Efl.Object; [[Called when swipe is detected]]
578 multi,pinch,in: Efl.Object; [[Called when multitouch pinch in detected]]
579 multi,pinch,out: Efl.Object; [[Called when multitouch pinch out detected]]
580 multi,swipe,down: Efl.Object; [[Called when multitouch swipe down detected]]
581 multi,swipe,up: Efl.Object; [[Called when multitouch swipe up detected]]
582 multi,swipe,right: Efl.Object; [[Called when multitouch swipe right detected]]
583 multi,swipe,left: Efl.Object; [[Called when multitouch swipe left detected]]
584 released: Efl.Object; [[Called when genlist is released]]
585 activated: Efl.Object; [[called when genlist is activated]]
586 highlighted: Efl.Object; [[Called when genlist is highlighted]]
587 unhighlighted: Efl.Object; [[Called when genlist is no longer highlighted]]
588 realized: Efl.Object; [[Called when genlist is realized]]
589 unrealized: Efl.Object; [[Called when genlist is unrealized]]
590 contract,request: Efl.Object; [[Called when contract is requested]]
591 expand,request: Efl.Object; [[Called when expand is requested]]
592 contracted: Efl.Object; [[called when genlist is contracted]]
593 expanded: Efl.Object; [[Called when genlist is expanded]]
594 index,update: Efl.Object; [[Called when genlist index updated]]
595 tree,effect,finished: void; [[Called when genlist tree effect finished]]
596 filter,done: void; [[Called when genlist filter is done]]
597 }
598}