elementary/list - deprecated elm_list_item_del()
[framework/uifw/elementary.git] / src / lib / elm_list.h
1 /**
2  * @defgroup List List
3  * @ingroup Elementary
4  *
5  * @image html img/widget/list/preview-00.png
6  * @image latex img/widget/list/preview-00.eps width=\textwidth
7  *
8  * @image html img/list.png
9  * @image latex img/list.eps width=\textwidth
10  *
11  * A list widget is a container whose children are displayed vertically or
12  * horizontally, in order, and can be selected.
13  * The list can accept only one or multiple items selection. Also has many
14  * modes of items displaying.
15  *
16  * A list is a very simple type of list widget.  For more robust
17  * lists, @ref Genlist should probably be used.
18  *
19  * Smart callbacks one can listen to:
20  * - @c "activated" - The user has double-clicked or pressed
21  *   (enter|return|spacebar) on an item. The @c event_info parameter
22  *   is the item that was activated.
23  * - @c "clicked,double" - The user has double-clicked an item.
24  *   The @c event_info parameter is the item that was double-clicked.
25  * - "selected" - when the user selected an item
26  * - "unselected" - when the user unselected an item
27  * - "longpressed" - an item in the list is long-pressed
28  * - "edge,top" - the list is scrolled until the top edge
29  * - "edge,bottom" - the list is scrolled until the bottom edge
30  * - "edge,left" - the list is scrolled until the left edge
31  * - "edge,right" - the list is scrolled until the right edge
32  * - "language,changed" - the program's language changed
33  *
34  * Available styles for it:
35  * - @c "default"
36  *
37  * Default content parts of the list items that you can use for are:
38  * @li "start" - A start position object in the list item
39  * @li "end" - A end position object in the list item
40  *
41  * Default text parts of the list items that you can use for are:
42  * @li "default" - label in the list item
43  *
44  * Supported elm_object_item common APIs.
45  * @li elm_object_item_disabled_set
46  * @li elm_object_item_disabled_get
47  * @li elm_object_item_part_text_set
48  * @li elm_object_item_part_text_get
49  * @li elm_object_item_part_content_set
50  * @li elm_object_item_part_content_get
51  * @li elm_object_item_part_content_unset
52  *
53  * List of examples:
54  * @li @ref list_example_01
55  * @li @ref list_example_02
56  * @li @ref list_example_03
57  */
58
59 /**
60  * @addtogroup List
61  * @{
62  */
63
64 /**
65  * @enum _Elm_List_Mode
66  * @typedef Elm_List_Mode
67  *
68  * Set list's resize behavior, transverse axis scroll and
69  * items cropping. See each mode's description for more details.
70  *
71  * @note Default value is #ELM_LIST_SCROLL.
72  *
73  * Values <b> don't </b> work as bitmask, only one can be choosen.
74  *
75  * @see elm_list_mode_set()
76  * @see elm_list_mode_get()
77  *
78  * @ingroup List
79  */
80 typedef enum
81 {
82    ELM_LIST_COMPRESS = 0, /**< Won't set any of its size hints to inform how a possible container should resize it. Then, if it's not created as a "resize object", it might end with zero dimensions. The list will respect the container's geometry and, if any of its items won't fit into its transverse axis, one won't be able to scroll it in that direction. */
83    ELM_LIST_SCROLL, /**< Default value. Won't set any of its size hints to inform how a possible container should resize it. Then, if it's not created as a "resize object", it might end with zero dimensions. The list will respect the container's geometry and, if any of its items won't fit into its transverse axis, one will be able to scroll it in that direction (large items will get cropped). */
84    ELM_LIST_LIMIT, /**< Set a minimun size hint on the list object, so that containers may respect it (and resize itself to fit the child properly). More specifically, a minimum size hint will be set for its transverse axis, so that the @b largest item in that direction fits well. Can have effects bounded by setting the list object's maximum size hints. */
85    ELM_LIST_EXPAND, /**< Besides setting a minimum size on the transverse axis, just like the previous mode, will set a minimum size on the longitudinal axis too, trying to reserve space to all its children to be visible at a time. Can have effects bounded by setting the list object's maximum size hints. */
86    ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get() */
87 } Elm_List_Mode;
88
89 /**
90  * Add a new list widget to the given parent Elementary
91  * (container) object.
92  *
93  * @param parent The parent object.
94  * @return a new list widget handle or @c NULL, on errors.
95  *
96  * This function inserts a new list widget on the canvas.
97  *
98  * @ingroup List
99  */
100 EAPI Evas_Object                 *elm_list_add(Evas_Object *parent);
101
102 /**
103  * Starts the list.
104  *
105  * @param obj The list object
106  *
107  * @note Call before running show() on the list object.
108  * @warning If not called, it won't display the list properly.
109  *
110  * @code
111  * li = elm_list_add(win);
112  * elm_list_item_append(li, "First", NULL, NULL, NULL, NULL);
113  * elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL);
114  * elm_list_go(li);
115  * evas_object_show(li);
116  * @endcode
117  *
118  * @ingroup List
119  */
120 EAPI void                         elm_list_go(Evas_Object *obj);
121
122 /**
123  * Enable or disable multiple items selection on the list object.
124  *
125  * @param obj The list object
126  * @param multi @c EINA_TRUE to enable multi selection or @c EINA_FALSE to
127  * disable it.
128  *
129  * Disabled by default. If disabled, the user can select a single item of
130  * the list each time. Selected items are highlighted on list.
131  * If enabled, many items can be selected.
132  *
133  * If a selected item is selected again, it will be unselected.
134  *
135  * @see elm_list_multi_select_get()
136  *
137  * @ingroup List
138  */
139 EAPI void                         elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi);
140
141 /**
142  * Get a value whether multiple items selection is enabled or not.
143  *
144  * @see elm_list_multi_select_set() for details.
145  *
146  * @param obj The list object.
147  * @return @c EINA_TRUE means multiple items selection is enabled.
148  * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL,
149  * @c EINA_FALSE is returned.
150  *
151  * @ingroup List
152  */
153 EAPI Eina_Bool                    elm_list_multi_select_get(const Evas_Object *obj);
154
155 /**
156  * Set which mode to use for the list object.
157  *
158  * @param obj The list object
159  * @param mode One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL,
160  * #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.
161  *
162  * Set list's resize behavior, transverse axis scroll and
163  * items cropping. See each mode's description for more details.
164  *
165  * @note Default value is #ELM_LIST_SCROLL.
166  *
167  * Only one can be set, if a previous one was set, it will be changed
168  * by the new mode set. Bitmask won't work as well.
169  *
170  * @see elm_list_mode_get()
171  *
172  * @ingroup List
173  */
174 EAPI void                         elm_list_mode_set(Evas_Object *obj, Elm_List_Mode mode);
175
176 /**
177  * Get the mode the list is at.
178  *
179  * @param obj The list object
180  * @return One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL,
181  * #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors.
182  *
183  * @note see elm_list_mode_set() for more information.
184  *
185  * @ingroup List
186  */
187 EAPI Elm_List_Mode                elm_list_mode_get(const Evas_Object *obj);
188
189 /**
190  * Enable or disable horizontal mode on the list object.
191  *
192  * @param obj The list object.
193  * @param horizontal @c EINA_TRUE to enable horizontal or @c EINA_FALSE to
194  * disable it, i.e., to enable vertical mode.
195  *
196  * @note Vertical mode is set by default.
197  *
198  * On horizontal mode items are displayed on list from left to right,
199  * instead of from top to bottom. Also, the list will scroll horizontally.
200  * Each item will presents left icon on top and right icon, or end, at
201  * the bottom.
202  *
203  * @see elm_list_horizontal_get()
204  *
205  * @ingroup List
206  */
207 EAPI void                         elm_list_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
208
209 /**
210  * Get a value whether horizontal mode is enabled or not.
211  *
212  * @param obj The list object.
213  * @return @c EINA_TRUE means horizontal mode selection is enabled.
214  * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL,
215  * @c EINA_FALSE is returned.
216  *
217  * @see elm_list_horizontal_set() for details.
218  *
219  * @ingroup List
220  */
221 EAPI Eina_Bool                    elm_list_horizontal_get(const Evas_Object *obj);
222
223 /**
224  * Enable or disable always select mode on the list object.
225  *
226  * @param obj The list object
227  * @param always_select @c EINA_TRUE to enable always select mode or
228  * @c EINA_FALSE to disable it.
229  *
230  * @note Always select mode is disabled by default.
231  *
232  * Default behavior of list items is to only call its callback function
233  * the first time it's pressed, i.e., when it is selected. If a selected
234  * item is pressed again, and multi-select is disabled, it won't call
235  * this function (if multi-select is enabled it will unselect the item).
236  *
237  * If always select is enabled, it will call the callback function
238  * everytime a item is pressed, so it will call when the item is selected,
239  * and again when a selected item is pressed.
240  *
241  * @see elm_list_always_select_mode_get()
242  * @see elm_list_multi_select_set()
243  *
244  * @ingroup List
245  */
246 EAPI void                         elm_list_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
247
248 /**
249  * Get a value whether always select mode is enabled or not, meaning that
250  * an item will always call its callback function, even if already selected.
251  *
252  * @param obj The list object
253  * @return @c EINA_TRUE means horizontal mode selection is enabled.
254  * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL,
255  * @c EINA_FALSE is returned.
256  *
257  * @see elm_list_always_select_mode_set() for details.
258  *
259  * @ingroup List
260  */
261 EAPI Eina_Bool                    elm_list_always_select_mode_get(const Evas_Object *obj);
262
263 /**
264  * Set bouncing behaviour when the scrolled content reaches an edge.
265  *
266  * Tell the internal scroller object whether it should bounce or not
267  * when it reaches the respective edges for each axis.
268  *
269  * @param obj The list object
270  * @param h_bounce Whether to bounce or not in the horizontal axis.
271  * @param v_bounce Whether to bounce or not in the vertical axis.
272  *
273  * @see elm_scroller_bounce_set()
274  *
275  * @ingroup List
276  */
277 EAPI void                         elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
278
279 /**
280  * Get the bouncing behaviour of the internal scroller.
281  *
282  * Get whether the internal scroller should bounce when the edge of each
283  * axis is reached scrolling.
284  *
285  * @param obj The list object.
286  * @param h_bounce Pointer where to store the bounce state of the horizontal
287  * axis.
288  * @param v_bounce Pointer where to store the bounce state of the vertical
289  * axis.
290  *
291  * @see elm_scroller_bounce_get()
292  * @see elm_list_bounce_set()
293  *
294  * @ingroup List
295  */
296 EAPI void                         elm_list_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
297
298 /**
299  * Set the scrollbar policy.
300  *
301  * @param obj The list object
302  * @param policy_h Horizontal scrollbar policy.
303  * @param policy_v Vertical scrollbar policy.
304  *
305  * This sets the scrollbar visibility policy for the given scroller.
306  * #ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it
307  * is needed, and otherwise kept hidden. #ELM_SCROLLER_POLICY_ON turns
308  * it on all the time, and #ELM_SCROLLER_POLICY_OFF always keeps it off.
309  * This applies respectively for the horizontal and vertical scrollbars.
310  *
311  * The both are disabled by default, i.e., are set to
312  * #ELM_SCROLLER_POLICY_OFF.
313  *
314  * @ingroup List
315  */
316 EAPI void                         elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v);
317
318 /**
319  * Get the scrollbar policy.
320  *
321  * @see elm_list_scroller_policy_get() for details.
322  *
323  * @param obj The list object.
324  * @param policy_h Pointer where to store horizontal scrollbar policy.
325  * @param policy_v Pointer where to store vertical scrollbar policy.
326  *
327  * @ingroup List
328  */
329 EAPI void                         elm_list_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v);
330
331 /**
332  * Append a new item to the list object.
333  *
334  * @param obj The list object.
335  * @param label The label of the list item.
336  * @param icon The icon object to use for the left side of the item. An
337  * icon can be any Evas object, but usually it is an icon created
338  * with elm_icon_add().
339  * @param end The icon object to use for the right side of the item. An
340  * icon can be any Evas object.
341  * @param func The function to call when the item is clicked.
342  * @param data The data to associate with the item for related callbacks.
343  *
344  * @return The created item or @c NULL upon failure.
345  *
346  * A new item will be created and appended to the list, i.e., will
347  * be set as @b last item.
348  *
349  * Items created with this method can be deleted with elm_object_item_del().
350  *
351  * Associated @p data can be properly freed when item is deleted if a
352  * callback function is set with elm_widget_item_del_cb_set().
353  *
354  * If a function is passed as argument, it will be called everytime this item
355  * is selected, i.e., the user clicks over an unselected item.
356  * If always select is enabled it will call this function every time
357  * user clicks over an item (already selected or not).
358  * If such function isn't needed, just passing
359  * @c NULL as @p func is enough. The same should be done for @p data.
360  *
361  * Simple example (with no function callback or data associated):
362  * @code
363  * li = elm_list_add(win);
364  * ic = elm_icon_add(win);
365  * elm_icon_file_set(ic, "path/to/image", NULL);
366  * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
367  * elm_list_item_append(li, "label", ic, NULL, NULL, NULL);
368  * elm_list_go(li);
369  * evas_object_show(li);
370  * @endcode
371  *
372  * @see elm_list_always_select_mode_set()
373  * @see elm_object_item_del()
374  * @see elm_widget_item_del_cb_set()
375  * @see elm_list_clear()
376  * @see elm_icon_add()
377  *
378  * @ingroup List
379  */
380 EAPI Elm_Object_Item               *elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
381
382 /**
383  * Prepend a new item to the list object.
384  *
385  * @param obj The list object.
386  * @param label The label of the list item.
387  * @param icon The icon object to use for the left side of the item. An
388  * icon can be any Evas object, but usually it is an icon created
389  * with elm_icon_add().
390  * @param end The icon object to use for the right side of the item. An
391  * icon can be any Evas object.
392  * @param func The function to call when the item is clicked.
393  * @param data The data to associate with the item for related callbacks.
394  *
395  * @return The created item or @c NULL upon failure.
396  *
397  * A new item will be created and prepended to the list, i.e., will
398  * be set as @b first item.
399  *
400  * Items created with this method can be deleted with elm_object_item_del().
401  *
402  * Associated @p data can be properly freed when item is deleted if a
403  * callback function is set with elm_widget_item_del_cb_set().
404  *
405  * If a function is passed as argument, it will be called everytime this item
406  * is selected, i.e., the user clicks over an unselected item.
407  * If always select is enabled it will call this function every time
408  * user clicks over an item (already selected or not).
409  * If such function isn't needed, just passing
410  * @c NULL as @p func is enough. The same should be done for @p data.
411  *
412  * @see elm_list_item_append() for a simple code example.
413  * @see elm_list_always_select_mode_set()
414  * @see elm_object_item_del()
415  * @see elm_widget_item_del_cb_set()
416  * @see elm_list_clear()
417  * @see elm_icon_add()
418  *
419  * @ingroup List
420  */
421 EAPI Elm_Object_Item               *elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
422
423 /**
424  * Insert a new item into the list object before item @p before.
425  *
426  * @param obj The list object.
427  * @param before The list item to insert before.
428  * @param label The label of the list item.
429  * @param icon The icon object to use for the left side of the item. An
430  * icon can be any Evas object, but usually it is an icon created
431  * with elm_icon_add().
432  * @param end The icon object to use for the right side of the item. An
433  * icon can be any Evas object.
434  * @param func The function to call when the item is clicked.
435  * @param data The data to associate with the item for related callbacks.
436  *
437  * @return The created item or @c NULL upon failure.
438  *
439  * A new item will be created and added to the list. Its position in
440  * this list will be just before item @p before.
441  *
442  * Items created with this method can be deleted with elm_object_item_del().
443  *
444  * Associated @p data can be properly freed when item is deleted if a
445  * callback function is set with elm_widget_item_del_cb_set().
446  *
447  * If a function is passed as argument, it will be called everytime this item
448  * is selected, i.e., the user clicks over an unselected item.
449  * If always select is enabled it will call this function every time
450  * user clicks over an item (already selected or not).
451  * If such function isn't needed, just passing
452  * @c NULL as @p func is enough. The same should be done for @p data.
453  *
454  * @see elm_list_item_append() for a simple code example.
455  * @see elm_list_always_select_mode_set()
456  * @see elm_object_item_del()
457  * @see elm_widget_item_del_cb_set()
458  * @see elm_list_clear()
459  * @see elm_icon_add()
460  *
461  * @ingroup List
462  */
463 EAPI Elm_Object_Item               *elm_list_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
464
465 /**
466  * Insert a new item into the list object after item @p after.
467  *
468  * @param obj The list object.
469  * @param after The list item to insert after.
470  * @param label The label of the list item.
471  * @param icon The icon object to use for the left side of the item. An
472  * icon can be any Evas object, but usually it is an icon created
473  * with elm_icon_add().
474  * @param end The icon object to use for the right side of the item. An
475  * icon can be any Evas object.
476  * @param func The function to call when the item is clicked.
477  * @param data The data to associate with the item for related callbacks.
478  *
479  * @return The created item or @c NULL upon failure.
480  *
481  * A new item will be created and added to the list. Its position in
482  * this list will be just after item @p after.
483  *
484  * Items created with this method can be deleted with elm_object_item_del().
485  *
486  * Associated @p data can be properly freed when item is deleted if a
487  * callback function is set with elm_widget_item_del_cb_set().
488  *
489  * If a function is passed as argument, it will be called everytime this item
490  * is selected, i.e., the user clicks over an unselected item.
491  * If always select is enabled it will call this function every time
492  * user clicks over an item (already selected or not).
493  * If such function isn't needed, just passing
494  * @c NULL as @p func is enough. The same should be done for @p data.
495  *
496  * @see elm_list_item_append() for a simple code example.
497  * @see elm_list_always_select_mode_set()
498  * @see elm_object_item_del()
499  * @see elm_widget_item_del_cb_set()
500  * @see elm_list_clear()
501  * @see elm_icon_add()
502  *
503  * @ingroup List
504  */
505 EAPI Elm_Object_Item               *elm_list_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
506
507 /**
508  * Insert a new item into the sorted list object.
509  *
510  * @param obj The list object.
511  * @param label The label of the list item.
512  * @param icon The icon object to use for the left side of the item. An
513  * icon can be any Evas object, but usually it is an icon created
514  * with elm_icon_add().
515  * @param end The icon object to use for the right side of the item. An
516  * icon can be any Evas object.
517  * @param func The function to call when the item is clicked.
518  * @param data The data to associate with the item for related callbacks.
519  * @param cmp_func The comparing function to be used to sort list
520  * items <b>by #Elm_Object_Item item handles</b>. This function will
521  * receive two items and compare them, returning a non-negative integer
522  * if the second item should be place after the first, or negative value
523  * if should be placed before.
524  *
525  * @return The created item or @c NULL upon failure.
526  *
527  * @note This function inserts values into a list object assuming it was
528  * sorted and the result will be sorted.
529  *
530  * A new item will be created and added to the list. Its position in
531  * this list will be found comparing the new item with previously inserted
532  * items using function @p cmp_func.
533  *
534  * Items created with this method can be deleted with elm_object_item_del().
535  *
536  * Associated @p data can be properly freed when item is deleted if a
537  * callback function is set with elm_widget_item_del_cb_set().
538  *
539  * If a function is passed as argument, it will be called everytime this item
540  * is selected, i.e., the user clicks over an unselected item.
541  * If always select is enabled it will call this function every time
542  * user clicks over an item (already selected or not).
543  * If such function isn't needed, just passing
544  * @c NULL as @p func is enough. The same should be done for @p data.
545  *
546  * @see elm_list_item_append() for a simple code example.
547  * @see elm_list_always_select_mode_set()
548  * @see elm_object_item_del()
549  * @see elm_widget_item_del_cb_set()
550  * @see elm_list_clear()
551  * @see elm_icon_add()
552  *
553  * @ingroup List
554  */
555 EAPI Elm_Object_Item               *elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func);
556
557 /**
558  * Remove all list's items.
559  *
560  * @param obj The list object
561  *
562  * @see elm_object_item_del()
563  * @see elm_list_item_append()
564  *
565  * @ingroup List
566  */
567 EAPI void                         elm_list_clear(Evas_Object *obj);
568
569 /**
570  * Get a list of all the list items.
571  *
572  * @param obj The list object
573  * @return An @c Eina_List of list items, #Elm_Object_Item,
574  * or @c NULL on failure.
575  *
576  * @see elm_list_item_append()
577  * @see elm_object_item_del()
578  * @see elm_list_clear()
579  *
580  * @ingroup List
581  */
582 EAPI const Eina_List             *elm_list_items_get(const Evas_Object *obj);
583
584 /**
585  * Get the selected item.
586  *
587  * @param obj The list object.
588  * @return The selected list item.
589  *
590  * The selected item can be unselected with function
591  * elm_list_item_selected_set().
592  *
593  * The selected item always will be highlighted on list.
594  *
595  * @see elm_list_selected_items_get()
596  *
597  * @ingroup List
598  */
599 EAPI Elm_Object_Item               *elm_list_selected_item_get(const Evas_Object *obj);
600
601 /**
602  * Return a list of the currently selected list items.
603  *
604  * @param obj The list object.
605  * @return An @c Eina_List of list items, #Elm_Object_Item,
606  * or @c NULL on failure.
607  *
608  * Multiple items can be selected if multi select is enabled. It can be
609  * done with elm_list_multi_select_set().
610  *
611  * @see elm_list_selected_item_get()
612  * @see elm_list_multi_select_set()
613  *
614  * @ingroup List
615  */
616 EAPI const Eina_List             *elm_list_selected_items_get(const Evas_Object *obj);
617
618 /**
619  * Set the selected state of an item.
620  *
621  * @param it The list item
622  * @param selected The selected state
623  *
624  * This sets the selected state of the given item @p it.
625  * @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
626  *
627  * If a new item is selected the previosly selected will be unselected,
628  * unless multiple selection is enabled with elm_list_multi_select_set().
629  * Previoulsy selected item can be get with function
630  * elm_list_selected_item_get().
631  *
632  * Selected items will be highlighted.
633  *
634  * @see elm_list_item_selected_get()
635  * @see elm_list_selected_item_get()
636  * @see elm_list_multi_select_set()
637  *
638  * @ingroup List
639  */
640 EAPI void                         elm_list_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
641
642 /*
643  * Get whether the @p item is selected or not.
644  *
645  * @param it The list item.
646  * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
647  * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
648  *
649  * @see elm_list_selected_item_set() for details.
650  * @see elm_list_item_selected_get()
651  *
652  * @ingroup List
653  */
654 EAPI Eina_Bool                    elm_list_item_selected_get(const Elm_Object_Item *it);
655
656 /**
657  * Set or unset item as a separator.
658  *
659  * @param it The list item.
660  * @param setting @c EINA_TRUE to set item @p it as separator or
661  * @c EINA_FALSE to unset, i.e., item will be used as a regular item.
662  *
663  * Items aren't set as separator by default.
664  *
665  * If set as separator it will display separator theme, so won't display
666  * icons or label.
667  *
668  * @see elm_list_item_separator_get()
669  *
670  * @ingroup List
671  */
672 EAPI void                         elm_list_item_separator_set(Elm_Object_Item *it, Eina_Bool setting);
673
674 /**
675  * Get a value whether item is a separator or not.
676  *
677  * @see elm_list_item_separator_set() for details.
678  *
679  * @param it The list item.
680  * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE
681  * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned.
682  *
683  * @ingroup List
684  */
685 EAPI Eina_Bool                    elm_list_item_separator_get(const Elm_Object_Item *it);
686
687 /**
688  * Show @p item in the list view.
689  *
690  * @param it The list item to be shown.
691  *
692  * It won't animate list until item is visible. If such behavior is wanted,
693  * use elm_list_bring_in() intead.
694  *
695  * @ingroup List
696  */
697 EAPI void                         elm_list_item_show(Elm_Object_Item *it);
698
699 /**
700  * Bring in the given item to list view.
701  *
702  * @param it The item.
703  *
704  * This causes list to jump to the given item @p item and show it
705  * (by scrolling), if it is not fully visible.
706  *
707  * This may use animation to do so and take a period of time.
708  *
709  * If animation isn't wanted, elm_list_item_show() can be used.
710  *
711  * @ingroup List
712  */
713 EAPI void                         elm_list_item_bring_in(Elm_Object_Item *it);
714
715 /**
716  * Gets the base object of the item.
717  *
718  * @param it The list item
719  * @return The base object associated with @p item
720  *
721  * Base object is the @c Evas_Object that represents that item.
722  *
723  * @ingroup List
724  */
725 EAPI Evas_Object                 *elm_list_item_object_get(const Elm_Object_Item *it);
726
727 /**
728  * Get the item before @p it in list.
729  *
730  * @param it The list item.
731  * @return The item before @p it, or @c NULL if none or on failure.
732  *
733  * @note If it is the first item, @c NULL will be returned.
734  *
735  * @see elm_list_item_append()
736  * @see elm_list_items_get()
737  *
738  * @ingroup List
739  */
740 EAPI Elm_Object_Item               *elm_list_item_prev(const Elm_Object_Item *it);
741
742 /**
743  * Get the item after @p it in list.
744  *
745  * @param it The list item.
746  * @return The item after @p it, or @c NULL if none or on failure.
747  *
748  * @note If it is the last item, @c NULL will be returned.
749  *
750  * @see elm_list_item_append()
751  * @see elm_list_items_get()
752  *
753  * @ingroup List
754  */
755 EAPI Elm_Object_Item               *elm_list_item_next(const Elm_Object_Item *it);
756
757 /**
758  * @}
759  */