summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-08-07 15:47:32 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-08-07 15:47:40 +0100
commit356d1b1d813f9114bda17ee67d1ef36f70e2bb3c (patch)
treecc17cb9f59b4c485b66cd6993d84486d87bd2714
parent8b09403a6af358ea622766b0b8ff45f46093aa33 (diff)
genlist: convert docs
-rw-r--r--src/lib/elm_genlist.eo780
1 files changed, 278 insertions, 502 deletions
diff --git a/src/lib/elm_genlist.eo b/src/lib/elm_genlist.eo
index af26eefe4..a26f8d043 100644
--- a/src/lib/elm_genlist.eo
+++ b/src/lib/elm_genlist.eo
@@ -8,238 +8,153 @@ class Elm.Genlist (Elm.Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
8 methods { 8 methods {
9 @property homogeneous { 9 @property homogeneous {
10 set { 10 set {
11 /*@ 11 [[Enable/disable homogeneous mode.
12 Enable/disable homogeneous mode.
13 12
14 This will enable the homogeneous mode where items are of the same 13 This will enable the homogeneous mode where items are of the
15 height and width so that genlist may do the lazy-loading at its 14 same height and width so that genlist may do the lazy-loading
16 maximum (which increases the performance for scrolling the list). 15 at its maximum (which increases the performance for scrolling
17 In the normal mode, genlist will pre-calculate all the items' sizes even 16 the list). In the normal mode, genlist will pre-calculate all
18 though they are not in use. So items' callbacks are called many times than 17 the items' sizes even though they are not in use. So items'
19 expected. But homogeneous mode will skip the item size pre-calculation 18 callbacks are called many times than expected. But homogeneous
20 process so items' callbacks are called only when the item is needed. 19 mode will skip the item size pre-calculation process so
20 items' callbacks are called only when the item is needed.
21 21
22 @note This also works well with group index. 22 Note: This also works well with group index.
23 23 ]]
24 @see elm_genlist_mode_set()
25 @see elm_genlist_homogeneous_get()
26
27 @ingroup Genlist */
28 } 24 }
29 get { 25 get {
30 /*@ 26 [[Get whether the homogeneous mode is enabled.]]
31 Get whether the homogeneous mode is enabled.
32
33 @return Assume the items within the genlist are of the same height
34 and width (true = on, false = off)
35
36 @see elm_genlist_homogeneous_set()
37
38 @ingroup Genlist */
39 } 27 }
40 values { 28 values {
41 homogeneous: bool; /*@ Assume the items within the genlist are of the 29 homogeneous: bool; [[Assume the items within the genlist are of
42 same height and width (true = on, false = off). Default is @c 30 the same height and width. Default is $false.]]
43 false. */
44 } 31 }
45 } 32 }
46 @property select_mode { 33 @property select_mode {
47 set { 34 set {
48 /*@ 35 [[Set the genlist select mode.
49 Set the genlist select mode. 36
50 37 #ELM_OBJECT_SELECT_MODE_DEFAULT means that items will call
51 elm_genlist_select_mode_set() changes item select mode in the genlist widget. 38 their selection func and callback once when first becoming
52 - #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will call their selection func and 39 selected. Any further clicks will do nothing, unless you set
53 callback once when first becoming selected. Any further clicks will 40 always select mode. ELM_OBJECT_SELECT_MODE_ALWAYS means that
54 do nothing, unless you set always select mode. 41 even if selected, every click will make the selected callbacks
55 - #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, 42 be called. #ELM_OBJECT_SELECT_MODE_NONE will turn off the
56 every click will make the selected callbacks be called. 43 ability to select items entirely and they will neither appear
57 - #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items 44 selected nor call selected callback functions.
58 entirely and they will neither appear selected nor call selected 45 ]]
59 callback functions.
60
61 @see elm_genlist_select_mode_get()
62
63 @ingroup Genlist */
64 } 46 }
65 get { 47 get {
66 /*@ 48 [[Get the genlist select mode.]]
67 Get the genlist select mode.
68
69 @return The select mode
70 (If getting mode fails, it returns #ELM_OBJECT_SELECT_MODE_MAX)
71
72 @see elm_genlist_select_mode_set()
73
74 @ingroup Genlist */
75 } 49 }
76 values { 50 values {
77 mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); /*@ The select mode */ 51 mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The select mode.]]
78 } 52 }
79 } 53 }
80 @property focus_on_selection { 54 @property focus_on_selection {
81 set { 55 set {
82 /*@ 56 [[Set focus upon items selection mode
83 Set focus upon items selection mode
84 57
85 When enabled, every selection of an item inside the genlist will automatically set focus to 58 When enabled, every selection of an item inside the genlist
86 its first focusable widget from the left. This is true of course if the selection was made by 59 will automatically set focus to its first focusable widget
87 clicking an unfocusable area in an item or selecting it with a key movement. Clicking on a 60 from the left. This is true of course if the selection was
88 focusable widget inside an item will couse this particular item to get focus as usual. 61 made by clicking an unfocusable area in an item or selecting
89 62 it with a key movement. Clicking on a focusable widget inside
90 @ingroup Genlist */ 63 an item will couse this particular item to get focus as usual.
64 ]]
91 } 65 }
92 get { 66 get {
93 /*@ 67 [[Get whether focus upon item's selection mode is enabled.]]
94 Get whether focus upon item's selection mode is enabled.
95
96 @return The tree effect status
97 (true = enabled, false = disabled)
98
99 @ingroup Genlist */
100 } 68 }
101 values { 69 values {
102 enabled: bool; /*@ The tree effect status 70 enabled: bool; [[The tree effect status.]]
103 (true = enabled, false = disabled) */
104 } 71 }
105 } 72 }
106 @property longpress_timeout { 73 @property longpress_timeout {
107 set { 74 set {
108 /*@ 75 [[Set the timeout in seconds for the longpress event.
109 Set the timeout in seconds for the longpress event.
110 76
111 This option will change how long it takes to send an event "longpressed" 77 This option will change how long it takes to send an event
112 after the mouse down signal is sent to the list. If this event occurs, no 78 "longpressed" after the mouse down signal is sent to the list.
113 "clicked" event will be sent. 79 If this event occurs, no "clicked" event will be sent.
114 80
115 @warning If you set the longpress timeout value with this API, your genlist 81 Warning: If you set the longpress timeout value with this API,
116 will not be affected by the longpress value of elementary config value 82 your genlist will not be affected by the longpress value of
117 later. 83 elementary config value later.
118 84 ]]
119 @see elm_genlist_longpress_timeout_set()
120
121 @ingroup Genlist */
122 } 85 }
123 get { 86 get {
124 /*@ 87 [[Get the timeout in seconds for the longpress event.]]
125 Get the timeout in seconds for the longpress event.
126
127 @return timeout in seconds
128
129 @see elm_genlist_longpress_timeout_get()
130
131 @ingroup Genlist */
132 } 88 }
133 values { 89 values {
134 timeout: double; /*@ timeout in seconds. Default is elm config value(1.0) */ 90 timeout: double; [[Timeout in seconds. Default is elm config value (1.0).]]
135 } 91 }
136 } 92 }
137 @property multi_select { 93 @property multi_select {
138 set { 94 set {
139 /*@ 95 [[Enable or disable multi-selection in the genlist.
140 Enable or disable multi-selection in the genlist
141
142 This enables ($true) or disables ($false) multi-selection in
143 the list. This allows more than 1 item to be selected. To retrieve the list
144 of selected items, use elm_genlist_selected_items_get().
145
146 @see elm_genlist_selected_items_get()
147 @see elm_genlist_multi_select_get()
148 96
149 @ingroup Genlist */ 97 This enables ($true) or disables ($false) multi-selection in
98 the list. This allows more than 1 item to be selected. To
99 retrieve the list of selected items, use @.selected_items.get.
100 ]]
150 } 101 }
151 get { 102 get {
152 /*@ 103 [[Get if multi-selection in genlist is enabled or disabled.]]
153 Get if multi-selection in genlist is enabled or disabled.
154
155 @return Multi-select enabled/disabled
156 ($true = enabled/$false = disabled). Default is $false.
157
158 @see elm_genlist_multi_select_set()
159
160 @ingroup Genlist */
161 } 104 }
162 values { 105 values {
163 multi: bool; /*@ Multi-select enable/disable. Default is disabled. */ 106 multi: bool; [[Multi-select enable/disable. Default is disabled.]]
164 } 107 }
165 } 108 }
166 @property reorder_mode { 109 @property reorder_mode {
167 set { 110 set {
168 /*@ 111 [[Set reorder mode.
169 Set reorder mode
170 112
171 After turning on the reorder mode, longpress on normal item will trigger 113 After turning on the reorder mode, longpress on normal item
172 reordering of the item. You can move the item up and down. However, reorder 114 will trigger reordering of the item. You can move the item
173 does not work with group item. 115 up and down. However, reorder does not work with group item.
174 116 ]]
175 @ingroup Genlist */
176 } 117 }
177 get { 118 get {
178 /*@ 119 [[Get the reorder mode.]]
179 Get the reorder mode
180
181 @return The reorder mode
182 (true = on, false = off)
183
184 @ingroup Genlist */
185 } 120 }
186 values { 121 values {
187 reorder_mode: bool; /*@ The reorder mode 122 reorder_mode: bool; [[The reorder mode.]]
188 (true = on, false = off) */
189 } 123 }
190 } 124 }
191 @property decorate_mode { 125 @property decorate_mode {
192 set { 126 set {
193 /*@ 127 [[Set Genlist decorate mode.
194 Set Genlist decorate mode
195 128
196 This sets Genlist decorate mode to all items. 129 This sets Genlist decorate mode to all items.
197 130 ]]
198 @ingroup Genlist */
199 } 131 }
200 get { 132 get {
201 /*@ 133 [[Get Genlist decorate mode.]]
202 Get Genlist decorate mode
203
204 @return The decorate mode status
205 (true = decorate mode, false = normal mode
206
207 @ingroup Genlist */
208 } 134 }
209 values { 135 values {
210 decorated: bool; /*@ The decorate mode status 136 decorated: bool; [[The decorate mode status.]]
211 (true = decorate mode, false = normal mode */
212 } 137 }
213 } 138 }
214 @property multi_select_mode { 139 @property multi_select_mode {
215 set { 140 set {
216 /*@ 141 [[Set the genlist multi select mode.
217 Set the genlist multi select mode.
218
219 - #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever each
220 item is clicked.
221 - #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only one item will be selected
222 although multi-selection is enabled, if clicked without pressing control
223 key. This mode is only available with multi-selection.
224 142
225 @see elm_genlist_multi_select_set() 143 #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that
226 @see elm_genlist_multi_select_mode_get() 144 select/unselect items whenever each item is clicked.
145 #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL means that only
146 one item will be selected although multi-selection is enabled,
147 if clicked without pressing control key. This mode is only
148 available with multi-selection.
227 149
228 @ingroup Genlist 150 @since 1.8
229 @since 1.8 */ 151 ]]
230 } 152 }
231 get { 153 get {
232 /*@ 154 [[Get the genlist multi select mode.
233 Get the genlist multi select mode.
234 155
235 @return The multi select mode 156 @since 1.8
236 (If getting mode fails, it returns #ELM_OBJECT_MULTI_SELECT_MODE_MAX) 157 ]]
237
238 @see elm_genlist_multi_select_set()
239 @see elm_genlist_multi_select_mode_set()
240
241 @ingroup Genlist
242 @since 1.8 */
243 } 158 }
244 values { 159 values {
245 mode: Elm.Object.Multi_Select_Mode(Elm.Object.Multi_Select_Mode.max); /*@ The multi select mode */ 160 mode: Elm.Object.Multi_Select_Mode(Elm.Object.Multi_Select_Mode.max); /*@ The multi select mode */
@@ -247,460 +162,321 @@ class Elm.Genlist (Elm.Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
247 } 162 }
248 @property block_count { 163 @property block_count {
249 set { 164 set {
250 /*@ 165 [[Set the maximum number of items within an item block.
251 Set the maximum number of items within an item block
252
253 This will configure the block count to tune to the target with particular
254 performance matrix.
255 166
256 A block of objects will be used to reduce the number of operations due to 167 This will configure the block count to tune to the target
257 many objects in the screen. It can determine the visibility, or if the 168 with particular performance matrix.
258 object has changed, it theme needs to be updated, etc. doing this kind of
259 calculation to the entire block, instead of per object.
260 169
261 The default value for the block count is enough for most lists, so unless 170 A block of objects will be used to reduce the number of
262 you know you will have a lot of objects visible in the screen at the same 171 operations due to many objects in the screen. It can
263 time, don't try to change this. 172 determine the visibility, or if the object has changed,
173 it theme needs to be updated, etc. doing this kind of
174 calculation to the entire block, instead of per object.
264 175
265 @see elm_genlist_block_count_get() 176 The default value for the block count is enough for most
266 @see @ref Genlist_Implementation 177 lists, so unless you know you will have a lot of objects
267 178 visible in the screen at the same time, don't try to
268 @ingroup Genlist */ 179 change this.
180 ]]
269 } 181 }
270 get { 182 get {
271 /*@ 183 [[Get the maximum number of items within an item block.]]
272 Get the maximum number of items within an item block
273
274 @return Maximum number of items within an item block
275
276 @see elm_genlist_block_count_set()
277
278 @ingroup Genlist */
279 } 184 }
280 values { 185 values {
281 count: int; /*@ Maximum number of items within an item block. Default is 32. */ 186 count: int; [[Maximum number of items within an item block. Default is 32.]]
282 } 187 }
283 } 188 }
284 @property tree_effect_enabled { 189 @property tree_effect_enabled {
285 set { 190 [[Control genlist tree effect.]]
286 /*@ 191 set {}
287 Set Genlist tree effect 192 get {}
288
289 @ingroup Genlist */
290 }
291 get {
292 /*@
293 Get Genlist tree effect
294
295 @return The tree effect status
296 (true = enabled, false = disabled
297
298 @ingroup Genlist */
299 }
300 values { 193 values {
301 enabled: bool; /*@ The tree effect status 194 enabled: bool; [[The tree effect status.]]
302 (true = enabled, false = disabled */
303 } 195 }
304 } 196 }
305 @property highlight_mode { 197 @property highlight_mode {
306 set { 198 set {
307 /*@ 199 [[Set whether the genlist items should be highlighted on item
308 Set whether the genlist items should be highlighted on item selection. 200 selection.
309
310 This will turn on/off the highlight effect on item selection. The selected
311 and clicked callback functions will still be called.
312
313 Highlight is enabled by default.
314 201
315 @see elm_genlist_highlight_mode_get(). 202 This will turn on/off the highlight effect on item selection.
203 The selected and clicked callback functions will still be
204 called.
316 205
317 @ingroup Genlist */ 206 Highlight is enabled by default.
207 ]]
318 } 208 }
319 get { 209 get {
320 /*@ 210 [[Get whether the genlist items' should be highlighted when
321 Get whether the genlist items' should be highlighted when item selected. 211 item selected.
322 212 ]]
323 @return $true means items can be highlighted. $false indicates
324 they can't. If $obj is $NULL, $false is returned.
325
326 @see elm_genlist_highlight_mode_set() for details.
327
328 @ingroup Genlist */
329 } 213 }
330 values { 214 values {
331 highlight: bool; /*@ $true to enable highlighting or $false to 215 highlight: bool; [[$true to enable highlighting or $false to
332 disable it. */ 216 disable it.]]
333 } 217 }
334 } 218 }
335 @property mode { 219 @property mode {
336 set { 220 set {
337 /*@ 221 [[This sets the horizontal stretching mode.
338 This sets the horizontal stretching mode. 222
339 223 This sets the mode used for sizing items horizontally. Valid
340 This sets the mode used for sizing items horizontally. Valid modes 224 modes are #ELM_LIST_LIMIT, #ELM_LIST_SCROLL, and
341 are #ELM_LIST_LIMIT, #ELM_LIST_SCROLL, and #ELM_LIST_COMPRESS. The default is 225 #ELM_LIST_COMPRESS. The default is #ELM_LIST_SCROLL. This mode
342 #ELM_LIST_SCROLL. This mode means that if items are too wide to fit, 226 means that if items are too wide to fit, the scroller will
343 the scroller will scroll horizontally. Otherwise items are expanded 227 scroll horizontally. Otherwise items are expanded to fill
344 to fill the width of the viewport of the scroller. If it is 228 the width of the viewport of the scroller. If it is
345 #ELM_LIST_LIMIT, items will be expanded to the viewport width and 229 #ELM_LIST_LIMIT, items will be expanded to the viewport width
346 limited to that size. If it is #ELM_LIST_COMPRESS, the item width will be 230 and limited to that size. If it is #ELM_LIST_COMPRESS, the
347 fixed (restricted to a minimum of) to the list width when calculating its 231 item width will be fixed (restricted to a minimum of) to the
348 size in order to allow the height to be calculated based on it. This allows, 232 list width when calculating its size in order to allow the
349 for instance, text block to wrap lines if the Edje part is configured with 233 height to be calculated based on it. This allows, for
350 "text.min: 0 1". 234 instance, text block to wrap lines if the Edje part is
351 @note #ELM_LIST_COMPRESS will make list resize slower as it will have to 235 configured with "text.min: 0 1".
352 recalculate every item height again whenever the list width 236
353 changes! 237 Note: #ELM_LIST_COMPRESS will make list resize slower as it
354 @note Homogeneous mode is for that all items in the genlist same 238 will have to recalculate every item height again whenever
355 width/height. With #ELM_LIST_COMPRESS, it makes genlist items to fast 239 the list width changes!
356 initializing. However there's no sub-objects in genlist which can be 240
357 on the flying resizable (such as TEXTBLOCK). If then, some dynamic 241 Note: Homogeneous mode is for that all items in the genlist
358 resizable objects in genlist would not diplayed properly. 242 same width/height. With #ELM_LIST_COMPRESS, it makes genlist
359 243 items to fast initializing. However there's no sub-objects
360 @see elm_genlist_mode_get() 244 in genlist which can be on the flying resizable (such as
361 245 TEXTBLOCK). If then, some dynamic esizable objects in
362 @ingroup Genlist */ 246 genlist would not diplayed properly.
247 ]]
363 } 248 }
364 get { 249 get {
365 /*@ 250 [[Get the horizontal stretching mode.]]
366 Get the horizontal stretching mode.
367
368 @return The mode to use
369 (#ELM_LIST_LIMIT, #ELM_LIST_SCROLL)
370
371 @see elm_genlist_mode_set()
372
373 @ingroup Genlist */
374 } 251 }
375 values { 252 values {
376 mode: Elm_List_Mode(4); /*@ The mode to use (one of #ELM_LIST_SCROLL or #ELM_LIST_LIMIT). */ 253 mode: Elm_List_Mode(4); [[The mode to use (one of #ELM_LIST_SCROLL or #ELM_LIST_LIMIT).]]
377 } 254 }
378 } 255 }
379 @property decorated_item { 256 @property decorated_item {
380 get { 257 get {
381 /*@ 258 [[Get active genlist mode item.
382 Get active genlist mode item
383 259
384 @return The active item for that current mode. Or $NULL if no item is 260 This function returns the item that was activated with a mode,
385 activated with any mode. 261 by the function @.decorate_mode.set.
386 262 ]]
387 This function returns the item that was activated with a mode, by the 263 return: Elm.Widget_Item *; [[The active item for that current mode.
388 function elm_genlist_item_decorate_mode_set(). 264 Or $null if no item is activated with any mode.]]
389
390 @see elm_genlist_item_decorate_mode_set()
391 @see elm_genlist_mode_get()
392
393 @ingroup Genlist */
394 return: Elm.Widget_Item *;
395 } 265 }
396 } 266 }
397 @property selected_item { 267 @property selected_item {
398 get { 268 get {
399 /*@ 269 [[Get the selected item in the genlist.
400 Get the selected item in the genlist.
401
402 @return The selected item, or NULL if none is selected.
403
404 This gets the selected item in the list (if multi-selection is enabled, only
405 the item that was first selected in the list is returned - which is not very
406 useful, so see elm_genlist_selected_items_get() for when multi-selection is
407 used).
408
409 If no item is selected, NULL is returned.
410 270
411 @see elm_genlist_selected_items_get() 271 This gets the selected item in the list (if multi-selection
272 is enabled, only the item that was first selected in the list
273 is returned - which is not very useful, so see
274 @.selected_items.get for when multi-selection is used).
412 275
413 @ingroup Genlist */ 276 If no item is selected, $null is returned.
414 return: Elm.Widget_Item *; 277 ]]
278 return: Elm.Widget_Item *; [[The selected item, or $null if none is selected.]]
415 } 279 }
416 } 280 }
417 @property first_item { 281 @property first_item {
418 get { 282 get {
419 /*@ 283 [[Get the first item in the genlist.
420 Get the first item in the genlist
421
422 This returns the first item in the list.
423
424 @return The first item, or NULL if none
425 284
426 @ingroup Genlist */ 285 This returns the first item in the list.
427 return: Elm.Widget_Item *; 286 ]]
287 return: Elm.Widget_Item *; [[The first item or $null.]]
428 } 288 }
429 } 289 }
430 @property realized_items { 290 @property realized_items {
431 get { 291 get {
432 /*@ 292 [[Get a list of realized items in genlist.
433 Get a list of realized items in genlist 293
434 294 This returns a list of the realized items in the genlist.
435 @return The list of realized items, nor NULL if none are realized. 295 The list contains genlist item pointers. The list must be
436 296 freed by the caller when done with \@ref eina_list_free. The
437 This returns a list of the realized items in the genlist. The list 297 item pointers in the list are only valid so long as those
438 contains genlist item pointers. The list must be freed by the 298 items are not deleted or the genlist is not deleted.
439 caller when done with eina_list_free(). The item pointers in the 299 ]]
440 list are only valid so long as those items are not deleted or the
441 genlist is not deleted.
442
443 @see elm_genlist_realized_items_update()
444
445 @ingroup Genlist */
446 return: free(own(list<Elm_Gen_Item *> *), eina_list_free) @warn_unused; 300 return: free(own(list<Elm_Gen_Item *> *), eina_list_free) @warn_unused;
447 } 301 }
448 } 302 }
449 @property selected_items { 303 @property selected_items {
450 get { 304 get {
451 /*@ 305 [[Get a list of selected items in the genlist.
452 Get a list of selected items in the genlist. 306
453 307 It returns a list of the selected items. This list pointer
454 @return The list of selected items, or NULL if none are selected. 308 is only valid so long as the selection doesn't change (no
455 309 items are selected or unselected, or unselected implicitl
456 It returns a list of the selected items. This list pointer is only valid so 310 by deletion). The list contains genlist items pointers. The
457 long as the selection doesn't change (no items are selected or unselected, or 311 order of the items in this list is the order which they were
458 unselected implicitly by deletion). The list contains genlist items 312 selected, i.e. the first item in this list is the first item
459 pointers. The order of the items in this list is the order which they were 313 that was selected, and so on.
460 selected, i.e. the first item in this list is the first item that was 314
461 selected, and so on. 315 Note: If not in multi-select mode, consider using function
462 316 @.selected_item.get instead.
463 @note If not in multi-select mode, consider using function 317 ]]
464 elm_genlist_selected_item_get() instead.
465
466 @see elm_genlist_multi_select_set()
467 @see elm_genlist_selected_item_get()
468
469 @ingroup Genlist */
470 return: const(list<Elm.Widget_Item *>)*; 318 return: const(list<Elm.Widget_Item *>)*;
471 } 319 }
472 } 320 }
473 @property last_item { 321 @property last_item {
474 get { 322 get {
475 /*@ 323 [[Get the last item in the genlist
476 Get the last item in the genlist
477 324
478 This returns the last item in the list. 325 This returns the last item in the list.
479 326 ]]
480 @return The last item, or NULL if none
481
482 @ingroup Genlist */
483 return: Elm.Widget_Item *; 327 return: Elm.Widget_Item *;
484 } 328 }
485 } 329 }
486 item_insert_before { 330 item_insert_before {
487 /*@ 331 [[Insert an item before another in a genlist widget
488 Insert an item before another in a genlist widget
489
490 @return A handle to the item added or $NULL if not possible
491
492 This inserts an item before another in the list. It will be in the
493 same tree level or group as the item it is inserted before.
494
495 @see elm_genlist_item_append()
496 @see elm_genlist_item_prepend()
497 @see elm_genlist_item_insert_after()
498 @see elm_object_item_del()
499
500 @ingroup Genlist */
501 332
333 This inserts an item before another in the list. It will be in
334 the same tree level or group as the item it is inserted before.
335 ]]
502 return: Elm.Widget_Item *; 336 return: Elm.Widget_Item *;
503 params { 337 params {
504 @in itc: const(Elm_Genlist_Item_Class)*; /*@ The item class for the item */ 338 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]]
505 @in data: const(void)*; /*@ The item data */ 339 @in data: const(void)*; [[The item data.]]
506 @in parent: Elm.Widget_Item * @nullable; /*@ The parent item, or NULL if none */ 340 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
507 @in before_it: Elm.Widget_Item *; /*@ The item to place this new one before. */ 341 @in before_it: Elm.Widget_Item *; [[The item to place this new one before.]]
508 @in type: Elm_Genlist_Item_Type; /*@ Item type */ 342 @in type: Elm_Genlist_Item_Type; [[Item type.]]
509 @in func: Evas_Smart_Cb @optional; /*@ Convenience function called when the item is selected */ 343 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
510 @in func_data: const(void)* @optional; /*@ Data passed to $func above. */ 344 @in func_data: const(void)* @optional; [[Data passed to $func above.]]
511 } 345 }
512 } 346 }
513 realized_items_update { 347 realized_items_update {
514 /*@ 348 [[Update the contents of all realized items.
515 Update the contents of all realized items.
516 349
517 This updates all realized items by calling all the item class functions again 350 This updates all realized items by calling all the item class
518 to get the contents, texts and states. Use this when the original 351 functions again to get the contents, texts and states. Use this
519 item data has changed and the changes are desired to be reflected. 352 when the original item data has changed and the changes are
520 353 desired to be reflected.
521 To update just one item, use elm_genlist_item_update().
522
523 @see elm_genlist_realized_items_get()
524 @see elm_genlist_item_update()
525
526 @ingroup Genlist */
527 354
355 To update just one item, use \@ref elm_genlist_item_update.
356 ]]
528 } 357 }
529 item_insert_after { 358 item_insert_after {
530 /*@ 359 [[Insert an item after another in a genlist widget
531 Insert an item after another in a genlist widget
532
533 @return A handle to the item added or $NULL if not possible
534
535 This inserts an item after another in the list. It will be in the
536 same tree level or group as the item it is inserted after.
537
538 @see elm_genlist_item_append()
539 @see elm_genlist_item_prepend()
540 @see elm_genlist_item_insert_before()
541 @see elm_object_item_del()
542
543 @ingroup Genlist */
544 360
361 This inserts an item after another in the list. It will be in the
362 same tree level or group as the item it is inserted after.
363 ]]
545 return: Elm.Widget_Item *; 364 return: Elm.Widget_Item *;
546 params { 365 params {
547 @in itc: const(Elm_Genlist_Item_Class)*; /*@ The item class for the item */ 366 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]]
548 @in data: const(void)*; /*@ The item data */ 367 @in data: const(void)*; [[The item data.]]
549 @in parent: Elm.Widget_Item * @nullable; /*@ The parent item, or NULL if none */ 368 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
550 @in after_it: Elm.Widget_Item *; /*@ The item to place this new one after. */ 369 @in after_it: Elm.Widget_Item *; [[The item to place this new one after.]]
551 @in type: Elm_Genlist_Item_Type; /*@ Item type */ 370 @in type: Elm_Genlist_Item_Type; [[Item type.]]
552 @in func: Evas_Smart_Cb @optional; /*@ Convenience function called when the item is selected */ 371 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
553 @in func_data: const(void)* @optional; /*@ Data passed to $func above. */ 372 @in func_data: const(void)* @optional; [[Data passed to $func above.]]
554 } 373 }
555 } 374 }
556 at_xy_item_get @const { 375 at_xy_item_get @const {
557 /*@ 376 [[Get the item that is at the x, y canvas coords.
558 Get the item that is at the x, y canvas coords. 377
559 378 This returns the item at the given coordinates (which are canvas
560 @return The item at the coordinates or NULL if none 379 relative, not object-relative). If an item is at that coordinate,
561 380 that item handle is returned, and if $posret is not NULL, the
562 This returns the item at the given coordinates (which are canvas 381 integer pointed to is set to a value of -1, 0 or 1, depending if
563 relative, not object-relative). If an item is at that coordinate, 382 the coordinate is on the upper portion of that item (-1), on the
564 that item handle is returned, and if $posret is not NULL, the 383 middle section (0) or on the lower part (1). If NULL is returned
565 integer pointed to is set to a value of -1, 0 or 1, depending if 384 as an item (no item found there), then posret may indicate -1 or
566 the coordinate is on the upper portion of that item (-1), on the 385 1 based if the coordinate is above or below all items
567 middle section (0) or on the lower part (1). If NULL is returned as 386 respectively in the genlist.
568 an item (no item found there), then posret may indicate -1 or 1 387 ]]
569 based if the coordinate is above or below all items respectively in
570 the genlist.
571
572 @ingroup Genlist */
573 return: Elm.Widget_Item *; 388 return: Elm.Widget_Item *;
574 params { 389 params {
575 @in x: Evas.Coord; /*@ The input x coordinate */ 390 @in x: Evas.Coord; [[The input x coordinate.]]
576 @in y: Evas.Coord; /*@ The input y coordinate */ 391 @in y: Evas.Coord; [[The input y coordinate.]]
577 @out posret: int; /*@ The position relative to the item returned here */ 392 @out posret: int; [[The position relative to the item returned here.]]
578 } 393 }
579 } 394 }
580 items_count @const { 395 items_count @const {
581 /*@ 396 [[Return how many items are currently in a list.
582 Return how many items are currently in a list
583 397
584 @return The total number of list items in the list 398 This behavior is O(1) and includes items which may or may not
585 399 be realized.
586 This behavior is O(1) and includes items which may or may not be realized. 400 ]]
587
588 @ingroup Genlist */
589 return: uint; 401 return: uint;
590 } 402 }
591 item_prepend { 403 item_prepend {
592 /*@ 404 [[Prepend a new item in a given genlist widget.
593 Prepend a new item in a given genlist widget.
594
595 @return A handle to the item added or NULL if not possible
596
597 This adds an item to the beginning of the list or beginning of the
598 children of the parent if given.
599
600 @see elm_genlist_item_append()
601 @see elm_genlist_item_insert_before()
602 @see elm_genlist_item_insert_after()
603 @see elm_object_item_del()
604
605 @ingroup Genlist */
606 405
406 This adds an item to the beginning of the list or beginning of
407 the children of the parent if given.
408 ]]
607 return: Elm.Widget_Item *; 409 return: Elm.Widget_Item *;
608 params { 410 params {
609 @in itc: const(Elm_Genlist_Item_Class)*; /*@ The item class for the item */ 411 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]]
610 @in data: const(void)*; /*@ The item data */ 412 @in data: const(void)*; [[The item data.]]
611 @in parent: Elm.Widget_Item * @nullable; /*@ The parent item, or NULL if none */ 413 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
612 @in type: Elm_Genlist_Item_Type; /*@ Item type */ 414 @in type: Elm_Genlist_Item_Type; [[Item type.]]
613 @in func: Evas_Smart_Cb @optional; /*@ Convenience function called when the item is selected */ 415 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
614 @in func_data: const(void)* @optional; /*@ Data passed to $func above. */ 416 @in func_data: const(void)* @optional; [[Data passed to $func above.]]
615 } 417 }
616 } 418 }
617 clear { 419 clear {
618 /*@ 420 [[Remove all items from a given genlist widget.
619 Remove all items from a given genlist widget.
620
621 This removes (and deletes) all items in $obj, leaving it empty.
622
623 @see elm_object_item_del(), to remove just one item.
624
625 @ingroup Genlist */
626 421
422 This removes (and deletes) all items in $obj, leaving it empty.
423 ]]
627 } 424 }
628 item_append { 425 item_append {
629 /*@ 426 [[Append a new item in a given genlist widget.
630 Append a new item in a given genlist widget.
631
632 @return A handle to the item added or $NULL if not possible
633
634 This adds the given item to the end of the list or the end of
635 the children list if the $parent is given.
636
637 @see elm_genlist_item_prepend()
638 @see elm_genlist_item_insert_before()
639 @see elm_genlist_item_insert_after()
640 @see elm_object_item_del()
641
642 @ingroup Genlist */
643 427
428 This adds the given item to the end of the list or the end of
429 the children list if the $parent is given.
430 ]]
644 return: Elm.Widget_Item *; 431 return: Elm.Widget_Item *;
645 params { 432 params {
646 @in itc: const(Elm_Genlist_Item_Class)*; /*@ The item class for the item */ 433 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]]
647 @in data: const(void)*; /*@ The item data */ 434 @in data: const(void)*; [[The item data.]]
648 @in parent: Elm.Widget_Item * @nullable; /*@ The parent item, or NULL if none */ 435 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
649 @in type: Elm_Genlist_Item_Type; /*@ Item type */ 436 @in type: Elm_Genlist_Item_Type; [[Item type.]]
650 @in func: Evas_Smart_Cb @optional; /*@ Convenience function called when the item is selected */ 437 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
651 @in func_data: const(void)* @optional; /*@ Data passed to $func above. */ 438 @in func_data: const(void)* @optional; [[Data passed to $func above.]]
652 } 439 }
653 } 440 }
654 item_sorted_insert { 441 item_sorted_insert {
655 /*@ 442 [[Insert a new item into the sorted genlist object
656 Insert a new item into the sorted genlist object
657
658 @return A handle to the item added or NULL if not possible
659
660 This inserts an item in the genlist based on user defined comparison
661 function. The two arguments passed to the function $func are genlist item
662 handles to compare.
663
664 @see elm_genlist_item_append()
665 @see elm_genlist_item_prepend()
666 @see elm_genlist_item_insert_after()
667 @see elm_object_item_del()
668
669 @ingroup Genlist */
670 443
444 This inserts an item in the genlist based on user defined
445 comparison function. The two arguments passed to the function
446 $func are genlist item handles to compare.
447 ]]
671 return: Elm.Widget_Item *; 448 return: Elm.Widget_Item *;
672 params { 449 params {
673 @in itc: const(Elm_Genlist_Item_Class)*; /*@ The item class for the item */ 450 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]]
674 @in data: const(void)*; /*@ The item data */ 451 @in data: const(void)*; [[The item data.]]
675 @in parent: Elm.Widget_Item * @nullable; /*@ The parent item, or NULL if none */ 452 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
676 @in type: Elm_Genlist_Item_Type; /*@ Item type */ 453 @in type: Elm_Genlist_Item_Type; [[Item type.]]
677 @in comp: Eina_Compare_Cb; /*@ The function called for the sort */ 454 @in comp: Eina_Compare_Cb; [[The function called for the sort.]]
678 @in func: Evas_Smart_Cb @optional; /*@ Convenience function called when item selected */ 455 @in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
679 @in func_data: const(void)* @optional; /*@ Data passed to $func above. */ 456 @in func_data: const(void)* @optional; [[Data passed to $func above.]]
680 } 457 }
681 } 458 }
682 search_by_text_item_get { 459 search_by_text_item_get {
683 /*@ 460 [[Get genlist item by given string.
684 Get genlist item by given string.
685
686 @return Pointer to the genlist item which matches search_string in case of success, otherwise returns NULL.
687
688 It takes pointer to the genlist item that will be used to start
689 search from it.
690 461
691 This function uses globs (like "*.jpg") for searching and takes 462 It takes pointer to the genlist item that will be used to start
692 search flags as last parameter That is a bitfield with values 463 search from it.
693 to be ored together or 0 for no flags.
694 464
695 @ingroup Genlist 465 This function uses globs (like "*.jpg") for searching and takes
696 @since 1.11 */ 466 search flags as last parameter That is a bitfield with values
467 to be ored together or 0 for no flags.
697 468
469 @since 1.11
470 ]]
698 return: Elm.Widget_Item *; 471 return: Elm.Widget_Item *;
699 params { 472 params {
700 @in item_to_search_from: Elm.Widget_Item * @optional; /*@ Pointer to item to start search from. If NULL search will be started from the first item of the genlist. */ 473 @in item_to_search_from: Elm.Widget_Item * @optional; [[
701 @in part_name: const(char)*; /*@ Name of the TEXT part of genlist item to search string in. */ 474 Pointer to item to start search from. If $null, search
702 @in pattern: const(char)*; /*@ The search pattern. */ 475 will be started from the first item of the genlist.
703 @in flags: Elm_Glob_Match_Flags; /*@ Search flags */ 476 ]]
477 @in part_name: const(char)*; [[Name of the TEXT part of genlist item to search string in.]]
478 @in pattern: const(char)*; [[The search pattern.]]
479 @in flags: Elm_Glob_Match_Flags; [[Search flags.]]
704 } 480 }
705 } 481 }
706 } 482 }