elementary/genlist - Elm_Genlist_Item -> Elm_Object_Item
[framework/uifw/elementary.git] / src / lib / elm_genlist.h
1 /**
2  * @defgroup Genlist Genlist
3  *
4  * @image html img/widget/genlist/preview-00.png
5  * @image latex img/widget/genlist/preview-00.eps
6  * @image html img/genlist.png
7  * @image latex img/genlist.eps
8  *
9  * This widget aims to have more expansive list than the simple list in
10  * Elementary that could have more flexible items and allow many more entries
11  * while still being fast and low on memory usage. At the same time it was
12  * also made to be able to do tree structures. But the price to pay is more
13  * complexity when it comes to usage. If all you want is a simple list with
14  * icons and a single text, use the normal @ref List object.
15  *
16  * Genlist has a fairly large API, mostly because it's relatively complex,
17  * trying to be both expansive, powerful and efficient. First we will begin
18  * an overview on the theory behind genlist.
19  *
20  * @section Genlist_Item_Class Genlist item classes - creating items
21  *
22  * In order to have the ability to add and delete items on the fly, genlist
23  * implements a class (callback) system where the application provides a
24  * structure with information about that type of item (genlist may contain
25  * multiple different items with different classes, states and styles).
26  * Genlist will call the functions in this struct (methods) when an item is
27  * "realized" (i.e., created dynamically, while the user is scrolling the
28  * grid). All objects will simply be deleted when no longer needed with
29  * evas_object_del(). The #Elm_Genlist_Item_Class structure contains the
30  * following members:
31  * - @c item_style - This is a constant string and simply defines the name
32  *   of the item style. It @b must be specified and the default should be @c
33  *   "default".
34  *
35  * - @c func - A struct with pointers to functions that will be called when
36  *   an item is going to be actually created. All of them receive a @c data
37  *   parameter that will point to the same data passed to
38  *   elm_genlist_item_append() and related item creation functions, and an @c
39  *   obj parameter that points to the genlist object itself.
40  *
41  * The function pointers inside @c func are @c text_get, @c content_get, @c
42  * state_get and @c del. The 3 first functions also receive a @c part
43  * parameter described below. A brief description of these functions follows:
44  *
45  * - @c text_get - The @c part parameter is the name string of one of the
46  *   existing text parts in the Edje group implementing the item's theme.
47  *   This function @b must return a strdup'()ed string, as the caller will
48  *   free() it when done. See #Elm_Genlist_Item_Text_Get_Cb.
49  * - @c content_get - The @c part parameter is the name string of one of the
50  *   existing (content) swallow parts in the Edje group implementing the item's
51  *   theme. It must return @c NULL, when no content is desired, or a valid
52  *   object handle, otherwise.  The object will be deleted by the genlist on
53  *   its deletion or when the item is "unrealized".  See
54  *   #Elm_Genlist_Item_Content_Get_Cb.
55  * - @c func.state_get - The @c part parameter is the name string of one of
56  *   the state parts in the Edje group implementing the item's theme. Return
57  *   @c EINA_FALSE for false/off or @c EINA_TRUE for true/on. Genlists will
58  *   emit a signal to its theming Edje object with @c "elm,state,XXX,active"
59  *   and @c "elm" as "emission" and "source" arguments, respectively, when
60  *   the state is true (the default is false), where @c XXX is the name of
61  *   the (state) part.  See #Elm_Genlist_Item_State_Get_Cb.
62  * - @c func.del - This is intended for use when genlist items are deleted,
63  *   so any data attached to the item (e.g. its data parameter on creation)
64  *   can be deleted. See #Elm_Genlist_Item_Del_Cb.
65  *
66  * available item styles:
67  * - default
68  * - default_style - The text part is a textblock
69  *
70  * @image html img/widget/genlist/preview-04.png
71  * @image latex img/widget/genlist/preview-04.eps
72  *
73  * - double_label
74  *
75  * @image html img/widget/genlist/preview-01.png
76  * @image latex img/widget/genlist/preview-01.eps
77  *
78  * - icon_top_text_bottom
79  *
80  * @image html img/widget/genlist/preview-02.png
81  * @image latex img/widget/genlist/preview-02.eps
82  *
83  * - group_index
84  *
85  * @image html img/widget/genlist/preview-03.png
86  * @image latex img/widget/genlist/preview-03.eps
87  *
88  * @section Genlist_Items Structure of items
89  *
90  * An item in a genlist can have 0 or more texts (they can be regular
91  * text or textblock Evas objects - that's up to the style to determine), 0
92  * or more contents (which are simply objects swallowed into the genlist item's
93  * theming Edje object) and 0 or more <b>boolean states</b>, which have the
94  * behavior left to the user to define. The Edje part names for each of
95  * these properties will be looked up, in the theme file for the genlist,
96  * under the Edje (string) data items named @c "labels", @c "contents" and @c
97  * "states", respectively. For each of those properties, if more than one
98  * part is provided, they must have names listed separated by spaces in the
99  * data fields. For the default genlist item theme, we have @b one text
100  * part (@c "elm.text"), @b two content parts (@c "elm.swalllow.icon" and @c
101  * "elm.swallow.end") and @b no state parts.
102  *
103  * A genlist item may be at one of several styles. Elementary provides one
104  * by default - "default", but this can be extended by system or application
105  * custom themes/overlays/extensions (see @ref Theme "themes" for more
106  * details).
107  *
108  * @section Genlist_Manipulation Editing and Navigating
109  *
110  * Items can be added by several calls. All of them return a @ref
111  * Elm_Object_Item handle that is an internal member inside the genlist.
112  * They all take a data parameter that is meant to be used for a handle to
113  * the applications internal data (eg the struct with the original item
114  * data). The parent parameter is the parent genlist item this belongs to if
115  * it is a tree or an indexed group, and NULL if there is no parent. The
116  * flags can be a bitmask of #ELM_GENLIST_ITEM_NONE,
117  * #ELM_GENLIST_ITEM_SUBITEMS and #ELM_GENLIST_ITEM_GROUP. If
118  * #ELM_GENLIST_ITEM_SUBITEMS is set then this item is displayed as an item
119  * that is able to expand and have child items.  If ELM_GENLIST_ITEM_GROUP
120  * is set then this item is group index item that is displayed at the top
121  * until the next group comes. The func parameter is a convenience callback
122  * that is called when the item is selected and the data parameter will be
123  * the func_data parameter, obj be the genlist object and event_info will be
124  * the genlist item.
125  *
126  * elm_genlist_item_append() adds an item to the end of the list, or if
127  * there is a parent, to the end of all the child items of the parent.
128  * elm_genlist_item_prepend() is the same but adds to the beginning of
129  * the list or children list. elm_genlist_item_insert_before() inserts at
130  * item before another item and elm_genlist_item_insert_after() inserts after
131  * the indicated item.
132  *
133  * The application can clear the list with elm_genlist_clear() which deletes
134  * all the items in the list and elm_genlist_item_del() will delete a specific
135  * item. elm_genlist_item_subitems_clear() will clear all items that are
136  * children of the indicated parent item.
137  *
138  * To help inspect list items you can jump to the item at the top of the list
139  * with elm_genlist_first_item_get() which will return the item pointer, and
140  * similarly elm_genlist_last_item_get() gets the item at the end of the list.
141  * elm_genlist_item_next_get() and elm_genlist_item_prev_get() get the next
142  * and previous items respectively relative to the indicated item. Using
143  * these calls you can walk the entire item list/tree. Note that as a tree
144  * the items are flattened in the list, so elm_genlist_item_parent_get() will
145  * let you know which item is the parent (and thus know how to skip them if
146  * wanted).
147  *
148  * @section Genlist_Muti_Selection Multi-selection
149  *
150  * If the application wants multiple items to be able to be selected,
151  * elm_genlist_multi_select_set() can enable this. If the list is
152  * single-selection only (the default), then elm_genlist_selected_item_get()
153  * will return the selected item, if any, or NULL if none is selected. If the
154  * list is multi-select then elm_genlist_selected_items_get() will return a
155  * list (that is only valid as long as no items are modified (added, deleted,
156  * selected or unselected)).
157  *
158  * @section Genlist_Usage_Hints Usage hints
159  *
160  * There are also convenience functions. elm_genlist_item_genlist_get() will
161  * return the genlist object the item belongs to. elm_genlist_item_show()
162  * will make the scroller scroll to show that specific item so its visible.
163  * elm_genlist_item_data_get() returns the data pointer set by the item
164  * creation functions.
165  *
166  * If an item changes (state of boolean changes, text or contents change),
167  * then use elm_genlist_item_update() to have genlist update the item with
168  * the new state. Genlist will re-realize the item and thus call the functions
169  * in the _Elm_Genlist_Item_Class for that item.
170  *
171  * To programmatically (un)select an item use elm_genlist_item_selected_set().
172  * To get its selected state use elm_genlist_item_selected_get(). Similarly
173  * to expand/contract an item and get its expanded state, use
174  * elm_genlist_item_expanded_set() and elm_genlist_item_expanded_get(). And
175  * again to make an item disabled (unable to be selected and appear
176  * differently) use elm_genlist_item_disabled_set() to set this and
177  * elm_genlist_item_disabled_get() to get the disabled state.
178  *
179  * In general to indicate how the genlist should expand items horizontally to
180  * fill the list area, use elm_genlist_horizontal_set(). Valid modes are
181  * ELM_LIST_LIMIT and ELM_LIST_SCROLL. The default is ELM_LIST_SCROLL. This
182  * mode means that if items are too wide to fit, the scroller will scroll
183  * horizontally. Otherwise items are expanded to fill the width of the
184  * viewport of the scroller. If it is ELM_LIST_LIMIT, items will be expanded
185  * to the viewport width and limited to that size. This can be combined with
186  * a different style that uses edjes' ellipsis feature (cutting text off like
187  * this: "tex...").
188  *
189  * Items will only call their selection func and callback when first becoming
190  * selected. Any further clicks will do nothing, unless you enable always
191  * select with elm_genlist_always_select_mode_set(). This means even if
192  * selected, every click will make the selected callbacks be called.
193  * elm_genlist_no_select_mode_set() will turn off the ability to select
194  * items entirely and they will neither appear selected nor call selected
195  * callback functions.
196  *
197  * Remember that you can create new styles and add your own theme augmentation
198  * per application with elm_theme_extension_add(). If you absolutely must
199  * have a specific style that overrides any theme the user or system sets up
200  * you can use elm_theme_overlay_add() to add such a file.
201  *
202  * @section Genlist_Implementation Implementation
203  *
204  * Evas tracks every object you create. Every time it processes an event
205  * (mouse move, down, up etc.) it needs to walk through objects and find out
206  * what event that affects. Even worse every time it renders display updates,
207  * in order to just calculate what to re-draw, it needs to walk through many
208  * many many objects. Thus, the more objects you keep active, the more
209  * overhead Evas has in just doing its work. It is advisable to keep your
210  * active objects to the minimum working set you need. Also remember that
211  * object creation and deletion carries an overhead, so there is a
212  * middle-ground, which is not easily determined. But don't keep massive lists
213  * of objects you can't see or use. Genlist does this with list objects. It
214  * creates and destroys them dynamically as you scroll around. It groups them
215  * into blocks so it can determine the visibility etc. of a whole block at
216  * once as opposed to having to walk the whole list. This 2-level list allows
217  * for very large numbers of items to be in the list (tests have used up to
218  * 2,000,000 items). Also genlist employs a queue for adding items. As items
219  * may be different sizes, every item added needs to be calculated as to its
220  * size and thus this presents a lot of overhead on populating the list, this
221  * genlist employs a queue. Any item added is queued and spooled off over
222  * time, actually appearing some time later, so if your list has many members
223  * you may find it takes a while for them to all appear, with your process
224  * consuming a lot of CPU while it is busy spooling.
225  *
226  * Genlist also implements a tree structure, but it does so with callbacks to
227  * the application, with the application filling in tree structures when
228  * requested (allowing for efficient building of a very deep tree that could
229  * even be used for file-management). See the above smart signal callbacks for
230  * details.
231  *
232  * @section Genlist_Smart_Events Genlist smart events
233  *
234  * Signals that you can add callbacks for are:
235  * - @c "activated" - The user has double-clicked or pressed
236  *   (enter|return|spacebar) on an item. The @c event_info parameter is the
237  *   item that was activated.
238  * - @c "clicked,double" - The user has double-clicked an item.  The @c
239  *   event_info parameter is the item that was double-clicked.
240  * - @c "selected" - This is called when a user has made an item selected.
241  *   The event_info parameter is the genlist item that was selected.
242  * - @c "unselected" - This is called when a user has made an item
243  *   unselected. The event_info parameter is the genlist item that was
244  *   unselected.
245  * - @c "expanded" - This is called when elm_genlist_item_expanded_set() is
246  *   called and the item is now meant to be expanded. The event_info
247  *   parameter is the genlist item that was indicated to expand.  It is the
248  *   job of this callback to then fill in the child items.
249  * - @c "contracted" - This is called when elm_genlist_item_expanded_set() is
250  *   called and the item is now meant to be contracted. The event_info
251  *   parameter is the genlist item that was indicated to contract. It is the
252  *   job of this callback to then delete the child items.
253  * - @c "expand,request" - This is called when a user has indicated they want
254  *   to expand a tree branch item. The callback should decide if the item can
255  *   expand (has any children) and then call elm_genlist_item_expanded_set()
256  *   appropriately to set the state. The event_info parameter is the genlist
257  *   item that was indicated to expand.
258  * - @c "contract,request" - This is called when a user has indicated they
259  *   want to contract a tree branch item. The callback should decide if the
260  *   item can contract (has any children) and then call
261  *   elm_genlist_item_expanded_set() appropriately to set the state. The
262  *   event_info parameter is the genlist item that was indicated to contract.
263  * - @c "realized" - This is called when the item in the list is created as a
264  *   real evas object. event_info parameter is the genlist item that was
265  *   created. The object may be deleted at any time, so it is up to the
266  *   caller to not use the object pointer from elm_genlist_item_object_get()
267  *   in a way where it may point to freed objects.
268  * - @c "unrealized" - This is called just before an item is unrealized.
269  *   After this call content objects provided will be deleted and the item
270  *   object itself delete or be put into a floating cache.
271  * - @c "drag,start,up" - This is called when the item in the list has been
272  *   dragged (not scrolled) up.
273  * - @c "drag,start,down" - This is called when the item in the list has been
274  *   dragged (not scrolled) down.
275  * - @c "drag,start,left" - This is called when the item in the list has been
276  *   dragged (not scrolled) left.
277  * - @c "drag,start,right" - This is called when the item in the list has
278  *   been dragged (not scrolled) right.
279  * - @c "drag,stop" - This is called when the item in the list has stopped
280  *   being dragged.
281  * - @c "drag" - This is called when the item in the list is being dragged.
282  * - @c "longpressed" - This is called when the item is pressed for a certain
283  *   amount of time. By default it's 1 second.
284  * - @c "scroll,anim,start" - This is called when scrolling animation has
285  *   started.
286  * - @c "scroll,anim,stop" - This is called when scrolling animation has
287  *   stopped.
288  * - @c "scroll,drag,start" - This is called when dragging the content has
289  *   started.
290  * - @c "scroll,drag,stop" - This is called when dragging the content has
291  *   stopped.
292  * - @c "edge,top" - This is called when the genlist is scrolled until
293  *   the top edge.
294  * - @c "edge,bottom" - This is called when the genlist is scrolled
295  *   until the bottom edge.
296  * - @c "edge,left" - This is called when the genlist is scrolled
297  *   until the left edge.
298  * - @c "edge,right" - This is called when the genlist is scrolled
299  *   until the right edge.
300  * - @c "multi,swipe,left" - This is called when the genlist is multi-touch
301  *   swiped left.
302  * - @c "multi,swipe,right" - This is called when the genlist is multi-touch
303  *   swiped right.
304  * - @c "multi,swipe,up" - This is called when the genlist is multi-touch
305  *   swiped up.
306  * - @c "multi,swipe,down" - This is called when the genlist is multi-touch
307  *   swiped down.
308  * - @c "multi,pinch,out" - This is called when the genlist is multi-touch
309  *   pinched out.  "- @c multi,pinch,in" - This is called when the genlist is
310  *   multi-touch pinched in.
311  * - @c "swipe" - This is called when the genlist is swiped.
312  * - @c "moved" - This is called when a genlist item is moved.
313  * - @c "language,changed" - This is called when the program's language is
314  *   changed.
315  *
316  * @section Genlist_Examples Examples
317  *
318  * Here is a list of examples that use the genlist, trying to show some of
319  * its capabilities:
320  * - @ref genlist_example_01
321  * - @ref genlist_example_02
322  * - @ref genlist_example_03
323  * - @ref genlist_example_04
324  * - @ref genlist_example_05
325  */
326
327 /**
328  * @addtogroup Genlist
329  * @{
330  */
331
332 /**
333  * Defines if the item is of any special type (has subitems or it's the
334  * index of a group), or is just a simple item.
335  *
336  * @ingroup Genlist
337  */
338 typedef enum
339 {
340    ELM_GENLIST_ITEM_NONE = 0, /**< simple item */
341    ELM_GENLIST_ITEM_SUBITEMS = (1 << 0), /**< may expand and have child items */
342    ELM_GENLIST_ITEM_GROUP = (1 << 1) /**< index of a group of items */
343 } Elm_Genlist_Item_Flags;
344
345 typedef enum
346 {
347    ELM_GENLIST_ITEM_FIELD_ALL = 0,
348    ELM_GENLIST_ITEM_FIELD_LABEL = (1 << 0),
349    ELM_GENLIST_ITEM_FIELD_CONTENT = (1 << 1),
350    ELM_GENLIST_ITEM_FIELD_STATE = (1 << 2)
351 } Elm_Genlist_Item_Field_Flags;
352 typedef struct _Elm_Genlist_Item_Class      Elm_Genlist_Item_Class; /**< Genlist item class definition structs */
353
354 #define Elm_Genlist_Item_Class Elm_Gen_Item_Class
355 typedef struct _Elm_Genlist_Item_Class_Func Elm_Genlist_Item_Class_Func;    /**< Class functions for genlist item class */
356
357 /**
358  * Text fetching class function for Elm_Gen_Item_Class.
359  * @param data The data passed in the item creation function
360  * @param obj The base widget object
361  * @param part The part name of the swallow
362  * @return The allocated (NOT stringshared) string to set as the text
363  */
364 typedef char *(*Elm_Genlist_Item_Text_Get_Cb)(void *data, Evas_Object *obj, const char *part);
365
366 /**
367  * Content (swallowed object) fetching class function for Elm_Gen_Item_Class.
368  * @param data The data passed in the item creation function
369  * @param obj The base widget object
370  * @param part The part name of the swallow
371  * @return The content object to swallow
372  */
373 typedef Evas_Object *(*Elm_Genlist_Item_Content_Get_Cb)(void *data, Evas_Object *obj, const char *part);
374
375 /**
376  * State fetching class function for Elm_Gen_Item_Class.
377  * @param data The data passed in the item creation function
378  * @param obj The base widget object
379  * @param part The part name of the swallow
380  * @return The hell if I know
381  */
382 typedef Eina_Bool (*Elm_Genlist_Item_State_Get_Cb)(void *data, Evas_Object *obj, const char *part);
383
384 /**
385  * Deletion class function for Elm_Gen_Item_Class.
386  * @param data The data passed in the item creation function
387  * @param obj The base widget object
388  */
389 typedef void (*Elm_Genlist_Item_Del_Cb)(void *data, Evas_Object *obj);
390
391 /**
392  * @struct _Elm_Genlist_Item_Class
393  *
394  * Genlist item class definition structs.
395  *
396  * This struct contains the style and fetching functions that will define the
397  * contents of each item.
398  *
399  * @see @ref Genlist_Item_Class
400  */
401 struct _Elm_Genlist_Item_Class
402 {
403    const char *item_style; /**< style of this class. */
404    struct Elm_Genlist_Item_Class_Func
405    {
406       Elm_Genlist_Item_Text_Get_Cb    text_get; /**< Text fetching class function for genlist item classes.*/
407       Elm_Genlist_Item_Content_Get_Cb content_get; /**< Content fetching class function for genlist item classes. */
408       Elm_Genlist_Item_State_Get_Cb   state_get; /**< State fetching class function for genlist item classes. */
409       Elm_Genlist_Item_Del_Cb         del; /**< Deletion class function for genlist item classes. */
410    } func;
411 };
412 #define Elm_Genlist_Item_Class_Func Elm_Gen_Item_Class_Func
413 /**
414  * Add a new genlist widget to the given parent Elementary
415  * (container) object
416  *
417  * @param parent The parent object
418  * @return a new genlist widget handle or @c NULL, on errors
419  *
420  * This function inserts a new genlist widget on the canvas.
421  *
422  * @see elm_genlist_item_append()
423  * @see elm_genlist_item_del()
424  * @see elm_genlist_clear()
425  *
426  * @ingroup Genlist
427  */
428 EAPI Evas_Object                  *elm_genlist_add(Evas_Object *parent);
429
430 /**
431  * Remove all items from a given genlist widget.
432  *
433  * @param obj The genlist object
434  *
435  * This removes (and deletes) all items in @p obj, leaving it empty.
436  *
437  * @see elm_genlist_item_del(), to remove just one item.
438  *
439  * @ingroup Genlist
440  */
441 EAPI void                          elm_genlist_clear(Evas_Object *obj);
442
443 /**
444  * Enable or disable multi-selection in the genlist
445  *
446  * @param obj The genlist object
447  * @param multi Multi-select enable/disable. Default is disabled.
448  *
449  * This enables (@c EINA_TRUE) or disables (@c EINA_FALSE) multi-selection in
450  * the list. This allows more than 1 item to be selected. To retrieve the list
451  * of selected items, use elm_genlist_selected_items_get().
452  *
453  * @see elm_genlist_selected_items_get()
454  * @see elm_genlist_multi_select_get()
455  *
456  * @ingroup Genlist
457  */
458 EAPI void                          elm_genlist_multi_select_set(Evas_Object *obj, Eina_Bool multi);
459
460 /**
461  * Gets if multi-selection in genlist is enabled or disabled.
462  *
463  * @param obj The genlist object
464  * @return Multi-select enabled/disabled
465  * (@c EINA_TRUE = enabled/@c EINA_FALSE = disabled). Default is @c EINA_FALSE.
466  *
467  * @see elm_genlist_multi_select_set()
468  *
469  * @ingroup Genlist
470  */
471 EAPI Eina_Bool                     elm_genlist_multi_select_get(const Evas_Object *obj);
472
473 /**
474  * This sets the horizontal stretching mode.
475  *
476  * @param obj The genlist object
477  * @param mode The mode to use (one of #ELM_LIST_SCROLL or #ELM_LIST_LIMIT).
478  *
479  * This sets the mode used for sizing items horizontally. Valid modes
480  * are #ELM_LIST_LIMIT and #ELM_LIST_SCROLL. The default is
481  * ELM_LIST_SCROLL. This mode means that if items are too wide to fit,
482  * the scroller will scroll horizontally. Otherwise items are expanded
483  * to fill the width of the viewport of the scroller. If it is
484  * ELM_LIST_LIMIT, items will be expanded to the viewport width and
485  * limited to that size.
486  *
487  * @see elm_genlist_horizontal_get()
488  *
489  * @ingroup Genlist
490  */
491 EAPI void                          elm_genlist_horizontal_set(Evas_Object *obj, Elm_List_Mode mode);
492
493 /**
494  * Gets the horizontal stretching mode.
495  *
496  * @param obj The genlist object
497  * @return The mode to use
498  * (#ELM_LIST_LIMIT, #ELM_LIST_SCROLL)
499  *
500  * @see elm_genlist_horizontal_set()
501  *
502  * @ingroup Genlist
503  */
504 EAPI Elm_List_Mode                 elm_genlist_horizontal_get(const Evas_Object *obj);
505
506 /**
507  * Set the always select mode.
508  *
509  * @param obj The genlist object
510  * @param always_select The always select mode (@c EINA_TRUE = on, @c
511  * EINA_FALSE = off). Default is @c EINA_FALSE.
512  *
513  * Items will only call their selection func and callback when first
514  * becoming selected. Any further clicks will do nothing, unless you
515  * enable always select with elm_genlist_always_select_mode_set().
516  * This means that, even if selected, every click will make the selected
517  * callbacks be called.
518  *
519  * @see elm_genlist_always_select_mode_get()
520  *
521  * @ingroup Genlist
522  */
523 EAPI void                          elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
524
525 /**
526  * Get the always select mode.
527  *
528  * @param obj The genlist object
529  * @return The always select mode
530  * (@c EINA_TRUE = on, @c EINA_FALSE = off)
531  *
532  * @see elm_genlist_always_select_mode_set()
533  *
534  * @ingroup Genlist
535  */
536 EAPI Eina_Bool                     elm_genlist_always_select_mode_get(const Evas_Object *obj);
537
538 /**
539  * Enable/disable the no select mode.
540  *
541  * @param obj The genlist object
542  * @param no_select The no select mode
543  * (EINA_TRUE = on, EINA_FALSE = off)
544  *
545  * This will turn off the ability to select items entirely and they
546  * will neither appear selected nor call selected callback functions.
547  *
548  * @see elm_genlist_no_select_mode_get()
549  *
550  * @ingroup Genlist
551  */
552 EAPI void                          elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select);
553
554 /**
555  * Gets whether the no select mode is enabled.
556  *
557  * @param obj The genlist object
558  * @return The no select mode
559  * (@c EINA_TRUE = on, @c EINA_FALSE = off)
560  *
561  * @see elm_genlist_no_select_mode_set()
562  *
563  * @ingroup Genlist
564  */
565 EAPI Eina_Bool                     elm_genlist_no_select_mode_get(const Evas_Object *obj);
566
567 /**
568  * Enable/disable compress mode.
569  *
570  * @param obj The genlist object
571  * @param compress The compress mode
572  * (@c EINA_TRUE = on, @c EINA_FALSE = off). Default is @c EINA_FALSE.
573  *
574  * This will enable the compress mode where items are "compressed"
575  * horizontally to fit the genlist scrollable viewport width. This is
576  * special for genlist.  Do not rely on
577  * elm_genlist_horizontal_set() being set to @c ELM_LIST_COMPRESS to
578  * work as genlist needs to handle it specially.
579  *
580  * @see elm_genlist_compress_mode_get()
581  *
582  * @ingroup Genlist
583  */
584 EAPI void                          elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress);
585
586 /**
587  * Get whether the compress mode is enabled.
588  *
589  * @param obj The genlist object
590  * @return The compress mode
591  * (@c EINA_TRUE = on, @c EINA_FALSE = off)
592  *
593  * @see elm_genlist_compress_mode_set()
594  *
595  * @ingroup Genlist
596  */
597 EAPI Eina_Bool                     elm_genlist_compress_mode_get(const Evas_Object *obj);
598
599 /**
600  * Enable/disable height-for-width mode.
601  *
602  * @param obj The genlist object
603  * @param setting The height-for-width mode (@c EINA_TRUE = on,
604  * @c EINA_FALSE = off). Default is @c EINA_FALSE.
605  *
606  * With height-for-width mode the item width will be fixed (restricted
607  * to a minimum of) to the list width when calculating its size in
608  * order to allow the height to be calculated based on it. This allows,
609  * for instance, text block to wrap lines if the Edje part is
610  * configured with "text.min: 0 1".
611  *
612  * @note This mode will make list resize slower as it will have to
613  *       recalculate every item height again whenever the list width
614  *       changes!
615  *
616  * @note When height-for-width mode is enabled, it also enables
617  *       compress mode (see elm_genlist_compress_mode_set()) and
618  *       disables homogeneous (see elm_genlist_homogeneous_set()).
619  *
620  * @ingroup Genlist
621  */
622 EAPI void                          elm_genlist_height_for_width_mode_set(Evas_Object *obj, Eina_Bool height_for_width);
623
624 /**
625  * Get whether the height-for-width mode is enabled.
626  *
627  * @param obj The genlist object
628  * @return The height-for-width mode (@c EINA_TRUE = on, @c EINA_FALSE =
629  * off)
630  *
631  * @ingroup Genlist
632  */
633 EAPI Eina_Bool                     elm_genlist_height_for_width_mode_get(const Evas_Object *obj);
634
635 /**
636  * Enable/disable horizontal and vertical bouncing effect.
637  *
638  * @param obj The genlist object
639  * @param h_bounce Allow bounce horizontally (@c EINA_TRUE = on, @c
640  * EINA_FALSE = off). Default is @c EINA_FALSE.
641  * @param v_bounce Allow bounce vertically (@c EINA_TRUE = on, @c
642  * EINA_FALSE = off). Default is @c EINA_TRUE.
643  *
644  * This will enable or disable the scroller bouncing effect for the
645  * genlist. See elm_scroller_bounce_set() for details.
646  *
647  * @see elm_scroller_bounce_set()
648  * @see elm_genlist_bounce_get()
649  *
650  * @ingroup Genlist
651  */
652 EAPI void                          elm_genlist_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
653
654 /**
655  * Get whether the horizontal and vertical bouncing effect is enabled.
656  *
657  * @param obj The genlist object
658  * @param h_bounce Pointer to a bool to receive if the bounce horizontally
659  * option is set.
660  * @param v_bounce Pointer to a bool to receive if the bounce vertically
661  * option is set.
662  *
663  * @see elm_genlist_bounce_set()
664  *
665  * @ingroup Genlist
666  */
667 EAPI void                          elm_genlist_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
668
669 /**
670  * Enable/disable homogeneous mode.
671  *
672  * @param obj The genlist object
673  * @param homogeneous Assume the items within the genlist are of the
674  * same height and width (EINA_TRUE = on, EINA_FALSE = off). Default is @c
675  * EINA_FALSE.
676  *
677  * This will enable the homogeneous mode where items are of the same
678  * height and width so that genlist may do the lazy-loading at its
679  * maximum (which increases the performance for scrolling the list). This
680  * implies 'compressed' mode.
681  *
682  * @see elm_genlist_compress_mode_set()
683  * @see elm_genlist_homogeneous_get()
684  *
685  * @ingroup Genlist
686  */
687 EAPI void                          elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
688
689 /**
690  * Get whether the homogeneous mode is enabled.
691  *
692  * @param obj The genlist object
693  * @return Assume the items within the genlist are of the same height
694  * and width (EINA_TRUE = on, EINA_FALSE = off)
695  *
696  * @see elm_genlist_homogeneous_set()
697  *
698  * @ingroup Genlist
699  */
700 EAPI Eina_Bool                     elm_genlist_homogeneous_get(const Evas_Object *obj);
701
702 /**
703  * Set the maximum number of items within an item block
704  *
705  * @param obj The genlist object
706  * @param n   Maximum number of items within an item block. Default is 32.
707  *
708  * This will configure the block count to tune to the target with
709  * particular performance matrix.
710  *
711  * A block of objects will be used to reduce the number of operations due to
712  * many objects in the screen. It can determine the visibility, or if the
713  * object has changed, it theme needs to be updated, etc. doing this kind of
714  * calculation to the entire block, instead of per object.
715  *
716  * The default value for the block count is enough for most lists, so unless
717  * you know you will have a lot of objects visible in the screen at the same
718  * time, don't try to change this.
719  *
720  * @see elm_genlist_block_count_get()
721  * @see @ref Genlist_Implementation
722  *
723  * @ingroup Genlist
724  */
725 EAPI void                          elm_genlist_block_count_set(Evas_Object *obj, int n);
726
727 /**
728  * Get the maximum number of items within an item block
729  *
730  * @param obj The genlist object
731  * @return Maximum number of items within an item block
732  *
733  * @see elm_genlist_block_count_set()
734  *
735  * @ingroup Genlist
736  */
737 EAPI int                           elm_genlist_block_count_get(const Evas_Object *obj);
738
739 /**
740  * Set the timeout in seconds for the longpress event.
741  *
742  * @param obj The genlist object
743  * @param timeout timeout in seconds. Default is 1.
744  *
745  * This option will change how long it takes to send an event "longpressed"
746  * after the mouse down signal is sent to the list. If this event occurs, no
747  * "clicked" event will be sent.
748  *
749  * @see elm_genlist_longpress_timeout_set()
750  *
751  * @ingroup Genlist
752  */
753 EAPI void                          elm_genlist_longpress_timeout_set(Evas_Object *obj, double timeout);
754
755 /**
756  * Get the timeout in seconds for the longpress event.
757  *
758  * @param obj The genlist object
759  * @return timeout in seconds
760  *
761  * @see elm_genlist_longpress_timeout_get()
762  *
763  * @ingroup Genlist
764  */
765 EAPI double                        elm_genlist_longpress_timeout_get(const Evas_Object *obj);
766
767 /**
768  * Append a new item in a given genlist widget.
769  *
770  * @param obj The genlist object
771  * @param itc The item class for the item
772  * @param data The item data
773  * @param parent The parent item, or NULL if none
774  * @param flags Item flags
775  * @param func Convenience function called when the item is selected
776  * @param func_data Data passed to @p func above.
777  * @return A handle to the item added or @c NULL if not possible
778  *
779  * This adds the given item to the end of the list or the end of
780  * the children list if the @p parent is given.
781  *
782  * @see elm_genlist_item_prepend()
783  * @see elm_genlist_item_insert_before()
784  * @see elm_genlist_item_insert_after()
785  * @see elm_genlist_item_del()
786  *
787  * @ingroup Genlist
788  */
789 EAPI Elm_Object_Item             *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
790
791 /**
792  * Prepend a new item in a given genlist widget.
793  *
794  * @param obj The genlist object
795  * @param itc The item class for the item
796  * @param data The item data
797  * @param parent The parent item, or NULL if none
798  * @param flags Item flags
799  * @param func Convenience function called when the item is selected
800  * @param func_data Data passed to @p func above.
801  * @return A handle to the item added or NULL if not possible
802  *
803  * This adds an item to the beginning of the list or beginning of the
804  * children of the parent if given.
805  *
806  * @see elm_genlist_item_append()
807  * @see elm_genlist_item_insert_before()
808  * @see elm_genlist_item_insert_after()
809  * @see elm_genlist_item_del()
810  *
811  * @ingroup Genlist
812  */
813 EAPI Elm_Object_Item             *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
814
815 /**
816  * Insert an item before another in a genlist widget
817  *
818  * @param obj The genlist object
819  * @param itc The item class for the item
820  * @param data The item data
821  * @param before The item to place this new one before.
822  * @param flags Item flags
823  * @param func Convenience function called when the item is selected
824  * @param func_data Data passed to @p func above.
825  * @return A handle to the item added or @c NULL if not possible
826  *
827  * This inserts an item before another in the list. It will be in the
828  * same tree level or group as the item it is inserted before.
829  *
830  * @see elm_genlist_item_append()
831  * @see elm_genlist_item_prepend()
832  * @see elm_genlist_item_insert_after()
833  * @see elm_genlist_item_del()
834  *
835  * @ingroup Genlist
836  */
837 EAPI Elm_Object_Item             *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *before, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
838
839 /**
840  * Insert an item after another in a genlist widget
841  *
842  * @param obj The genlist object
843  * @param itc The item class for the item
844  * @param data The item data
845  * @param after The item to place this new one after.
846  * @param flags Item flags
847  * @param func Convenience function called when the item is selected
848  * @param func_data Data passed to @p func above.
849  * @return A handle to the item added or @c NULL if not possible
850  *
851  * This inserts an item after another in the list. It will be in the
852  * same tree level or group as the item it is inserted after.
853  *
854  * @see elm_genlist_item_append()
855  * @see elm_genlist_item_prepend()
856  * @see elm_genlist_item_insert_before()
857  * @see elm_genlist_item_del()
858  *
859  * @ingroup Genlist
860  */
861 EAPI Elm_Object_Item             *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Object_Item *after, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
862
863 /**
864  * Insert a new item into the sorted genlist object
865  *
866  * @param obj The genlist object
867  * @param itc The item class for the item
868  * @param data The item data
869  * @param parent The parent item, or NULL if none
870  * @param flags Item flags
871  * @param comp The function called for the sort
872  * @param func Convenience function called when item selected
873  * @param func_data Data passed to @p func above.
874  * @return A handle to the item added or NULL if not possible
875  *
876  * @ingroup Genlist
877  */
878 // XXX: deprecate elm_genlist_item_sorted_insert() and rename
879 // elm_genlist_item_direct_sorted_insert() 
880 EAPI Elm_Object_Item             *elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
881 EAPI Elm_Object_Item             *elm_genlist_item_direct_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
882
883 /* operations to retrieve existing items */
884 /**
885  * Get the selectd item in the genlist.
886  *
887  * @param obj The genlist object
888  * @return The selected item, or NULL if none is selected.
889  *
890  * This gets the selected item in the list (if multi-selection is enabled, only
891  * the item that was first selected in the list is returned - which is not very
892  * useful, so see elm_genlist_selected_items_get() for when multi-selection is
893  * used).
894  *
895  * If no item is selected, NULL is returned.
896  *
897  * @see elm_genlist_selected_items_get()
898  *
899  * @ingroup Genlist
900  */
901 EAPI Elm_Object_Item             *elm_genlist_selected_item_get(const Evas_Object *obj);
902
903 /**
904  * Get a list of selected items in the genlist.
905  *
906  * @param obj The genlist object
907  * @return The list of selected items, or NULL if none are selected.
908  *
909  * It returns a list of the selected items. This list pointer is only valid so
910  * long as the selection doesn't change (no items are selected or unselected, or
911  * unselected implicitly by deletion). The list contains genlist items
912  * pointers. The order of the items in this list is the order which they were
913  * selected, i.e. the first item in this list is the first item that was
914  * selected, and so on.
915  *
916  * @note If not in multi-select mode, consider using function
917  * elm_genlist_selected_item_get() instead.
918  *
919  * @see elm_genlist_multi_select_set()
920  * @see elm_genlist_selected_item_get()
921  *
922  * @ingroup Genlist
923  */
924 EAPI const Eina_List              *elm_genlist_selected_items_get(const Evas_Object *obj);
925
926 /**
927  * Get the mode item style of items in the genlist
928  * @param obj The genlist object
929  * @return The mode item style string, or NULL if none is specified
930  *
931  * This is a constant string and simply defines the name of the
932  * style that will be used for mode animations. It can be
933  * @c NULL if you don't plan to use Genlist mode. See
934  * elm_genlist_item_mode_set() for more info.
935  *
936  * @ingroup Genlist
937  */
938 EAPI const char                   *elm_genlist_mode_item_style_get(const Evas_Object *obj);
939
940 /**
941  * Set the mode item style of items in the genlist
942  * @param obj The genlist object
943  * @param style The mode item style string, or NULL if none is desired
944  *
945  * This is a constant string and simply defines the name of the
946  * style that will be used for mode animations. It can be
947  * @c NULL if you don't plan to use Genlist mode. See
948  * elm_genlist_item_mode_set() for more info.
949  *
950  * @ingroup Genlist
951  */
952 EAPI void                          elm_genlist_mode_item_style_set(Evas_Object *obj, const char *style);
953
954 /**
955  * Get a list of realized items in genlist
956  *
957  * @param obj The genlist object
958  * @return The list of realized items, nor NULL if none are realized.
959  *
960  * This returns a list of the realized items in the genlist. The list
961  * contains genlist item pointers. The list must be freed by the
962  * caller when done with eina_list_free(). The item pointers in the
963  * list are only valid so long as those items are not deleted or the
964  * genlist is not deleted.
965  *
966  * @see elm_genlist_realized_items_update()
967  *
968  * @ingroup Genlist
969  */
970 EAPI Eina_List                    *elm_genlist_realized_items_get(const Evas_Object *obj);
971
972 /**
973  * Get the item that is at the x, y canvas coords.
974  *
975  * @param obj The gelinst object.
976  * @param x The input x coordinate
977  * @param y The input y coordinate
978  * @param posret The position relative to the item returned here
979  * @return The item at the coordinates or NULL if none
980  *
981  * This returns the item at the given coordinates (which are canvas
982  * relative, not object-relative). If an item is at that coordinate,
983  * that item handle is returned, and if @p posret is not NULL, the
984  * integer pointed to is set to a value of -1, 0 or 1, depending if
985  * the coordinate is on the upper portion of that item (-1), on the
986  * middle section (0) or on the lower part (1). If NULL is returned as
987  * an item (no item found there), then posret may indicate -1 or 1
988  * based if the coordinate is above or below all items respectively in
989  * the genlist.
990  *
991  * @ingroup Genlist
992  */
993 EAPI Elm_Object_Item             *elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret);
994
995 /**
996  * Get the first item in the genlist
997  *
998  * This returns the first item in the list.
999  *
1000  * @param obj The genlist object
1001  * @return The first item, or NULL if none
1002  *
1003  * @ingroup Genlist
1004  */
1005 EAPI Elm_Object_Item             *elm_genlist_first_item_get(const Evas_Object *obj);
1006
1007 /**
1008  * Get the last item in the genlist
1009  *
1010  * This returns the last item in the list.
1011  *
1012  * @return The last item, or NULL if none
1013  *
1014  * @ingroup Genlist
1015  */
1016 EAPI Elm_Object_Item             *elm_genlist_last_item_get(const Evas_Object *obj);
1017
1018 /**
1019  * Set the scrollbar policy
1020  *
1021  * @param obj The genlist object
1022  * @param policy_h Horizontal scrollbar policy.
1023  * @param policy_v Vertical scrollbar policy.
1024  *
1025  * This sets the scrollbar visibility policy for the given genlist
1026  * scroller. #ELM_SMART_SCROLLER_POLICY_AUTO means the scrollbar is
1027  * made visible if it is needed, and otherwise kept hidden.
1028  * #ELM_SMART_SCROLLER_POLICY_ON turns it on all the time, and
1029  * #ELM_SMART_SCROLLER_POLICY_OFF always keeps it off. This applies
1030  * respectively for the horizontal and vertical scrollbars. Default is
1031  * #ELM_SMART_SCROLLER_POLICY_AUTO
1032  *
1033  * @see elm_genlist_scroller_policy_get()
1034  *
1035  * @ingroup Genlist
1036  */
1037 EAPI void                          elm_genlist_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v);
1038
1039 /**
1040  * Get the scrollbar policy
1041  *
1042  * @param obj The genlist object
1043  * @param policy_h Pointer to store the horizontal scrollbar policy.
1044  * @param policy_v Pointer to store the vertical scrollbar policy.
1045  *
1046  * @see elm_genlist_scroller_policy_set()
1047  *
1048  * @ingroup Genlist
1049  */
1050 EAPI void                          elm_genlist_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v);
1051
1052 /**
1053  * Get the @b next item in a genlist widget's internal list of items,
1054  * given a handle to one of those items.
1055  *
1056  * @param it The genlist item to fetch next from
1057  * @return The item after @p item, or @c NULL if there's none (and
1058  * on errors)
1059  *
1060  * This returns the item placed after the @p item, on the container
1061  * genlist.
1062  *
1063  * @see elm_genlist_item_prev_get()
1064  *
1065  * @ingroup Genlist
1066  */
1067 EAPI Elm_Object_Item             *elm_genlist_item_next_get(const Elm_Object_Item *it);
1068
1069 /**
1070  * Get the @b previous item in a genlist widget's internal list of items,
1071  * given a handle to one of those items.
1072  *
1073  * @param it The genlist item to fetch previous from
1074  * @return The item before @p item, or @c NULL if there's none (and
1075  * on errors)
1076  *
1077  * This returns the item placed before the @p item, on the container
1078  * genlist.
1079  *
1080  * @see elm_genlist_item_next_get()
1081  *
1082  * @ingroup Genlist
1083  */
1084 EAPI Elm_Object_Item             *elm_genlist_item_prev_get(const Elm_Object_Item *it);
1085
1086 /**
1087  * Get the genlist object's handle which contains a given genlist
1088  * item
1089  *
1090  * @param it The item to fetch the container from
1091  * @return The genlist (parent) object
1092  *
1093  * This returns the genlist object itself that an item belongs to.
1094  *
1095  * @ingroup Genlist
1096  */
1097 EAPI Evas_Object                  *elm_genlist_item_genlist_get(const Elm_Object_Item *it);
1098
1099 /**
1100  * Get the parent item of the given item
1101  *
1102  * @param it The item
1103  * @return The parent of the item or @c NULL if it has no parent.
1104  *
1105  * This returns the item that was specified as parent of the item @p it on
1106  * elm_genlist_item_append() and insertion related functions.
1107  *
1108  * @ingroup Genlist
1109  */
1110 EAPI Elm_Object_Item             *elm_genlist_item_parent_get(const Elm_Object_Item *it);
1111
1112 /**
1113  * Remove all sub-items (children) of the given item
1114  *
1115  * @param it The item
1116  *
1117  * This removes all items that are children (and their descendants) of the
1118  * given item @p it.
1119  *
1120  * @see elm_genlist_clear()
1121  * @see elm_genlist_item_del()
1122  *
1123  * @ingroup Genlist
1124  */
1125 EAPI void                          elm_genlist_item_subitems_clear(Elm_Object_Item *it);
1126
1127 /**
1128  * Set whether a given genlist item is selected or not
1129  *
1130  * @param it The item
1131  * @param selected Use @c EINA_TRUE, to make it selected, @c
1132  * EINA_FALSE to make it unselected
1133  *
1134  * This sets the selected state of an item. If multi selection is
1135  * not enabled on the containing genlist and @p selected is @c
1136  * EINA_TRUE, any other previously selected items will get
1137  * unselected in favor of this new one.
1138  *
1139  * @see elm_genlist_item_selected_get()
1140  *
1141  * @ingroup Genlist
1142  */
1143 EAPI void                          elm_genlist_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
1144
1145 /**
1146  * Get whether a given genlist item is selected or not
1147  *
1148  * @param it The item
1149  * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise
1150  *
1151  * @see elm_genlist_item_selected_set() for more details
1152  *
1153  * @ingroup Genlist
1154  */
1155 EAPI Eina_Bool                     elm_genlist_item_selected_get(const Elm_Object_Item *it);
1156
1157 /**
1158  * Sets the expanded state of an item.
1159  *
1160  * @param it The item
1161  * @param expanded The expanded state (@c EINA_TRUE expanded, @c EINA_FALSE not expanded).
1162  *
1163  * This function flags the item of type #ELM_GENLIST_ITEM_SUBITEMS as
1164  * expanded or not.
1165  *
1166  * The theme will respond to this change visually, and a signal "expanded" or
1167  * "contracted" will be sent from the genlist with a pointer to the item that
1168  * has been expanded/contracted.
1169  *
1170  * Calling this function won't show or hide any child of this item (if it is
1171  * a parent). You must manually delete and create them on the callbacks fo
1172  * the "expanded" or "contracted" signals.
1173  *
1174  * @see elm_genlist_item_expanded_get()
1175  *
1176  * @ingroup Genlist
1177  */
1178 EAPI void                          elm_genlist_item_expanded_set(Elm_Object_Item *it, Eina_Bool expanded);
1179
1180 /**
1181  * Get the expanded state of an item
1182  *
1183  * @param it The item
1184  * @return The expanded state
1185  *
1186  * This gets the expanded state of an item.
1187  *
1188  * @see elm_genlist_item_expanded_set()
1189  *
1190  * @ingroup Genlist
1191  */
1192 EAPI Eina_Bool                     elm_genlist_item_expanded_get(const Elm_Object_Item *it);
1193
1194 /**
1195  * Get the depth of expanded item
1196  *
1197  * @param it The genlist item object
1198  * @return The depth of expanded item
1199  *
1200  * @ingroup Genlist
1201  */
1202 EAPI int                           elm_genlist_item_expanded_depth_get(const Elm_Object_Item *it);
1203
1204 /**
1205  * Set whether a given genlist item is disabled or not.
1206  *
1207  * @param it The item
1208  * @param disabled Use @c EINA_TRUE, true disable it, @c EINA_FALSE
1209  * to enable it back.
1210  *
1211  * A disabled item cannot be selected or unselected. It will also
1212  * change its appearance, to signal the user it's disabled.
1213  *
1214  * @see elm_genlist_item_disabled_get()
1215  *
1216  * @ingroup Genlist
1217  */
1218 EAPI void                          elm_genlist_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
1219
1220 /**
1221  * Get whether a given genlist item is disabled or not.
1222  *
1223  * @param it The item
1224  * @return @c EINA_TRUE, if it's disabled, @c EINA_FALSE otherwise
1225  * (and on errors).
1226  *
1227  * @see elm_genlist_item_disabled_set() for more details
1228  *
1229  * @ingroup Genlist
1230  */
1231 EAPI Eina_Bool                     elm_genlist_item_disabled_get(const Elm_Object_Item *it);
1232
1233 /**
1234  * Sets the display only state of an item.
1235  *
1236  * @param it The item
1237  * @param display_only @c EINA_TRUE if the item is display only, @c
1238  * EINA_FALSE otherwise.
1239  *
1240  * A display only item cannot be selected or unselected. It is for
1241  * display only and not selecting or otherwise clicking, dragging
1242  * etc. by the user, thus finger size rules will not be applied to
1243  * this item.
1244  *
1245  * It's good to set group index items to display only state.
1246  *
1247  * @see elm_genlist_item_display_only_get()
1248  *
1249  * @ingroup Genlist
1250  */
1251 EAPI void                          elm_genlist_item_display_only_set(Elm_Object_Item *it, Eina_Bool display_only);
1252
1253 /**
1254  * Get the display only state of an item
1255  *
1256  * @param it The item
1257  * @return @c EINA_TRUE if the item is display only, @c
1258  * EINA_FALSE otherwise.
1259  *
1260  * @see elm_genlist_item_display_only_set()
1261  *
1262  * @ingroup Genlist
1263  */
1264 EAPI Eina_Bool                     elm_genlist_item_display_only_get(const Elm_Object_Item *it);
1265
1266 /**
1267  * Show the portion of a genlist's internal list containing a given
1268  * item, immediately.
1269  *
1270  * @param it The item to display
1271  *
1272  * This causes genlist to jump to the given item @p it and show it (by
1273  * immediately scrolling to that position), if it is not fully visible.
1274  *
1275  * @see elm_genlist_item_bring_in()
1276  * @see elm_genlist_item_top_show()
1277  * @see elm_genlist_item_middle_show()
1278  *
1279  * @ingroup Genlist
1280  */
1281 EAPI void                          elm_genlist_item_show(Elm_Object_Item *it);
1282
1283 /**
1284  * Animatedly bring in, to the visible are of a genlist, a given
1285  * item on it.
1286  *
1287  * @param it The item to display
1288  *
1289  * This causes genlist to jump to the given item @p it and show it (by
1290  * animatedly scrolling), if it is not fully visible. This may use animation
1291  * to do so and take a period of time
1292  *
1293  * @see elm_genlist_item_show()
1294  * @see elm_genlist_item_top_bring_in()
1295  * @see elm_genlist_item_middle_bring_in()
1296  *
1297  * @ingroup Genlist
1298  */
1299 EAPI void                          elm_genlist_item_bring_in(Elm_Object_Item *it);
1300
1301 /**
1302  * Show the portion of a genlist's internal list containing a given
1303  * item, immediately.
1304  *
1305  * @param it The item to display
1306  *
1307  * This causes genlist to jump to the given item @p it and show it (by
1308  * immediately scrolling to that position), if it is not fully visible.
1309  *
1310  * The item will be positioned at the top of the genlist viewport.
1311  *
1312  * @see elm_genlist_item_show()
1313  * @see elm_genlist_item_top_bring_in()
1314  *
1315  * @ingroup Genlist
1316  */
1317 EAPI void                          elm_genlist_item_top_show(Elm_Object_Item *it);
1318
1319 /**
1320  * Animatedly bring in, to the visible are of a genlist, a given
1321  * item on it.
1322  *
1323  * @param it The item
1324  *
1325  * This causes genlist to jump to the given item @p it and show it (by
1326  * animatedly scrolling), if it is not fully visible. This may use animation
1327  * to do so and take a period of time
1328  *
1329  * The item will be positioned at the top of the genlist viewport.
1330  *
1331  * @see elm_genlist_item_bring_in()
1332  * @see elm_genlist_item_top_show()
1333  *
1334  * @ingroup Genlist
1335  */
1336 EAPI void                          elm_genlist_item_top_bring_in(Elm_Object_Item *it);
1337
1338 /**
1339  * Show the portion of a genlist's internal list containing a given
1340  * item, immediately.
1341  *
1342  * @param it The item to display
1343  *
1344  * This causes genlist to jump to the given item @p it and show it (by
1345  * immediately scrolling to that position), if it is not fully visible.
1346  *
1347  * The item will be positioned at the middle of the genlist viewport.
1348  *
1349  * @see elm_genlist_item_show()
1350  * @see elm_genlist_item_middle_bring_in()
1351  *
1352  * @ingroup Genlist
1353  */
1354 EAPI void                          elm_genlist_item_middle_show(Elm_Object_Item *it);
1355
1356 /**
1357  * Animatedly bring in, to the visible are of a genlist, a given
1358  * item on it.
1359  *
1360  * @param it The item
1361  *
1362  * This causes genlist to jump to the given item @p it and show it (by
1363  * animatedly scrolling), if it is not fully visible. This may use animation
1364  * to do so and take a period of time
1365  *
1366  * The item will be positioned at the middle of the genlist viewport.
1367  *
1368  * @see elm_genlist_item_bring_in()
1369  * @see elm_genlist_item_middle_show()
1370  *
1371  * @ingroup Genlist
1372  */
1373 EAPI void                          elm_genlist_item_middle_bring_in(Elm_Object_Item *it);
1374
1375 /**
1376  * Remove a genlist item from the its parent, deleting it.
1377  *
1378  * @param it The item to be removed.
1379  * @return @c EINA_TRUE on success or @c EINA_FALSE, otherwise.
1380  *
1381  * @see elm_genlist_clear(), to remove all items in a genlist at
1382  * once.
1383  *
1384  * @ingroup Genlist
1385  */
1386 EAPI void                          elm_genlist_item_del(Elm_Object_Item *it);
1387
1388 /**
1389  * Return the data associated to a given genlist item
1390  *
1391  * @param it The genlist item.
1392  * @return the data associated to this item.
1393  *
1394  * This returns the @c data value passed on the
1395  * elm_genlist_item_append() and related item addition calls.
1396  *
1397  * @see elm_genlist_item_append()
1398  * @see elm_genlist_item_data_set()
1399  *
1400  * @ingroup Genlist
1401  */
1402 EAPI void                         *elm_genlist_item_data_get(const Elm_Object_Item *it);
1403
1404 /**
1405  * Set the data associated to a given genlist item
1406  *
1407  * @param it The genlist item
1408  * @param data The new data pointer to set on it
1409  *
1410  * This @b overrides the @c data value passed on the
1411  * elm_genlist_item_append() and related item addition calls. This
1412  * function @b won't call elm_genlist_item_update() automatically,
1413  * so you'd issue it afterwards if you want to hove the item
1414  * updated to reflect the that new data.
1415  *
1416  * @see elm_genlist_item_data_get()
1417  *
1418  * @ingroup Genlist
1419  */
1420 EAPI void                          elm_genlist_item_data_set(Elm_Object_Item *it, const void *data);
1421
1422 /**
1423  * Tells genlist to "orphan" contents fetchs by the item class
1424  *
1425  * @param it The item
1426  *
1427  * This instructs genlist to release references to contents in the item,
1428  * meaning that they will no longer be managed by genlist and are
1429  * floating "orphans" that can be re-used elsewhere if the user wants
1430  * to.
1431  *
1432  * @ingroup Genlist
1433  */
1434 EAPI void                          elm_genlist_item_contents_orphan(Elm_Object_Item *it);
1435
1436 /**
1437  * Get the real Evas object created to implement the view of a
1438  * given genlist item
1439  *
1440  * @param it The genlist item.
1441  * @return the Evas object implementing this item's view.
1442  *
1443  * This returns the actual Evas object used to implement the
1444  * specified genlist item's view. This may be @c NULL, as it may
1445  * not have been created or may have been deleted, at any time, by
1446  * the genlist. <b>Do not modify this object</b> (move, resize,
1447  * show, hide, etc.), as the genlist is controlling it. This
1448  * function is for querying, emitting custom signals or hooking
1449  * lower level callbacks for events on that object. Do not delete
1450  * this object under any circumstances.
1451  *
1452  * @see elm_genlist_item_data_get()
1453  *
1454  * @ingroup Genlist
1455  */
1456 EAPI const Evas_Object            *elm_genlist_item_object_get(const Elm_Object_Item *it);
1457
1458 /**
1459  * Update the contents of an item
1460  *
1461  * @param it The item
1462  *
1463  * This updates an item by calling all the item class functions again
1464  * to get the contents, texts and states. Use this when the original
1465  * item data has changed and the changes are desired to be reflected.
1466  *
1467  * Use elm_genlist_realized_items_update() to update all already realized
1468  * items.
1469  *
1470  * @see elm_genlist_realized_items_update()
1471  *
1472  * @ingroup Genlist
1473  */
1474 EAPI void                          elm_genlist_item_update(Elm_Object_Item *it);
1475
1476 /**
1477  * Promote an item to the top of the list
1478  *
1479  * @param it The item
1480  *
1481  * @ingroup Genlist
1482  */
1483 EAPI void                          elm_genlist_item_promote(Elm_Object_Item *it);
1484
1485 /**
1486  * Demote an item to the end of the list
1487  *
1488  * @param it The item
1489  *
1490  * @ingroup Genlist
1491  */
1492 EAPI void                          elm_genlist_item_demote(Elm_Object_Item *it);
1493
1494 /**
1495  * Update the part of an item
1496  *
1497  * @param it The item
1498  * @param parts The name of item's part
1499  * @param itf The flags of item's part type
1500  *
1501  * This updates an item's part by calling item's fetching functions again
1502  * to get the contents, texts and states. Use this when the original
1503  * item data has changed and the changes are desired to be reflected.
1504  * Second parts argument is used for globbing to match '*', '?', and '.'
1505  * It can be used at updating multi fields.
1506  *
1507  * Use elm_genlist_realized_items_update() to update an item's all
1508  * property.
1509  *
1510  * @see elm_genlist_item_update()
1511  *
1512  * @ingroup Genlist
1513  */
1514 EAPI void                          elm_genlist_item_fields_update(Elm_Object_Item *it, const char *parts, Elm_Genlist_Item_Field_Flags itf);
1515
1516 /**
1517  * Update the item class of an item
1518  *
1519  * @param it The item
1520  * @param itc The item class for the item
1521  *
1522  * This sets another class fo the item, changing the way that it is
1523  * displayed. After changing the item class, elm_genlist_item_update() is
1524  * called on the item @p it.
1525  *
1526  * @ingroup Genlist
1527  */
1528 EAPI void                          elm_genlist_item_item_class_update(Elm_Object_Item *it, const Elm_Genlist_Item_Class *itc);
1529 EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Object_Item *it);
1530
1531 /**
1532  * Set the text to be shown in a given genlist item's tooltips.
1533  *
1534  * @param it The genlist item
1535  * @param text The text to set in the content
1536  *
1537  * This call will setup the text to be used as tooltip to that item
1538  * (analogous to elm_object_tooltip_text_set(), but being item
1539  * tooltips with higher precedence than object tooltips). It can
1540  * have only one tooltip at a time, so any previous tooltip data
1541  * will get removed.
1542  *
1543  * In order to set a content or something else as a tooltip, look at
1544  * elm_genlist_item_tooltip_content_cb_set().
1545  *
1546  * @ingroup Genlist
1547  */
1548 EAPI void                          elm_genlist_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
1549
1550 /**
1551  * Set the content to be shown in a given genlist item's tooltips
1552  *
1553  * @param it The genlist item.
1554  * @param func The function returning the tooltip contents.
1555  * @param data What to provide to @a func as callback data/context.
1556  * @param del_cb Called when data is not needed anymore, either when
1557  *        another callback replaces @p func, the tooltip is unset with
1558  *        elm_genlist_item_tooltip_unset() or the owner @p item
1559  *        dies. This callback receives as its first parameter the
1560  *        given @p data, being @c event_info the item handle.
1561  *
1562  * This call will setup the tooltip's contents to @p item
1563  * (analogous to elm_object_tooltip_content_cb_set(), but being
1564  * item tooltips with higher precedence than object tooltips). It
1565  * can have only one tooltip at a time, so any previous tooltip
1566  * content will get removed. @p func (with @p data) will be called
1567  * every time Elementary needs to show the tooltip and it should
1568  * return a valid Evas object, which will be fully managed by the
1569  * tooltip system, getting deleted when the tooltip is gone.
1570  *
1571  * In order to set just a text as a tooltip, look at
1572  * elm_genlist_item_tooltip_text_set().
1573  *
1574  * @ingroup Genlist
1575  */
1576 EAPI void                          elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
1577
1578 /**
1579  * Unset a tooltip from a given genlist item
1580  *
1581  * @param it genlist item to remove a previously set tooltip from.
1582  *
1583  * This call removes any tooltip set on @p item. The callback
1584  * provided as @c del_cb to
1585  * elm_genlist_item_tooltip_content_cb_set() will be called to
1586  * notify it is not used anymore (and have resources cleaned, if
1587  * need be).
1588  *
1589  * @see elm_genlist_item_tooltip_content_cb_set()
1590  *
1591  * @ingroup Genlist
1592  */
1593 EAPI void                          elm_genlist_item_tooltip_unset(Elm_Object_Item *it);
1594
1595 /**
1596  * Set a different @b style for a given genlist item's tooltip.
1597  *
1598  * @param it genlist item with tooltip set
1599  * @param style the <b>theme style</b> to use on tooltips (e.g. @c
1600  * "default", @c "transparent", etc)
1601  *
1602  * Tooltips can have <b>alternate styles</b> to be displayed on,
1603  * which are defined by the theme set on Elementary. This function
1604  * works analogously as elm_object_tooltip_style_set(), but here
1605  * applied only to genlist item objects. The default style for
1606  * tooltips is @c "default".
1607  *
1608  * @note before you set a style you should define a tooltip with
1609  *       elm_genlist_item_tooltip_content_cb_set() or
1610  *       elm_genlist_item_tooltip_text_set()
1611  *
1612  * @see elm_genlist_item_tooltip_style_get()
1613  *
1614  * @ingroup Genlist
1615  */
1616 EAPI void                          elm_genlist_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
1617
1618 /**
1619  * Get the style set a given genlist item's tooltip.
1620  *
1621  * @param it genlist item with tooltip already set on.
1622  * @return style the theme style in use, which defaults to
1623  *         "default". If the object does not have a tooltip set,
1624  *         then @c NULL is returned.
1625  *
1626  * @see elm_genlist_item_tooltip_style_set() for more details
1627  *
1628  * @ingroup Genlist
1629  */
1630 EAPI const char                   *elm_genlist_item_tooltip_style_get(const Elm_Object_Item *it);
1631
1632 /**
1633  * @brief Disable size restrictions on an object's tooltip
1634  * @param it The tooltip's anchor object
1635  * @param disable If EINA_TRUE, size restrictions are disabled
1636  * @return EINA_FALSE on failure, EINA_TRUE on success
1637  *
1638  * This function allows a tooltip to expand beyond its parant window's canvas.
1639  * It will instead be limited only by the size of the display.
1640  */
1641 EAPI Eina_Bool                     elm_genlist_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
1642
1643 /**
1644  * @brief Retrieve size restriction state of an object's tooltip
1645  * @param it The tooltip's anchor object
1646  * @return If EINA_TRUE, size restrictions are disabled
1647  *
1648  * This function returns whether a tooltip is allowed to expand beyond
1649  * its parant window's canvas.
1650  * It will instead be limited only by the size of the display.
1651  */
1652 EAPI Eina_Bool                     elm_genlist_item_tooltip_window_mode_get(const Elm_Object_Item *it);
1653
1654 /**
1655  * Set the type of mouse pointer/cursor decoration to be shown,
1656  * when the mouse pointer is over the given genlist widget item
1657  *
1658  * @param it genlist item to customize cursor on
1659  * @param cursor the cursor type's name
1660  *
1661  * This function works analogously as elm_object_cursor_set(), but
1662  * here the cursor's changing area is restricted to the item's
1663  * area, and not the whole widget's. Note that that item cursors
1664  * have precedence over widget cursors, so that a mouse over @p
1665  * item will always show cursor @p type.
1666  *
1667  * If this function is called twice for an object, a previously set
1668  * cursor will be unset on the second call.
1669  *
1670  * @see elm_object_cursor_set()
1671  * @see elm_genlist_item_cursor_get()
1672  * @see elm_genlist_item_cursor_unset()
1673  *
1674  * @ingroup Genlist
1675  */
1676 EAPI void                          elm_genlist_item_cursor_set(Elm_Object_Item *it, const char *cursor);
1677
1678 /**
1679  * Get the type of mouse pointer/cursor decoration set to be shown,
1680  * when the mouse pointer is over the given genlist widget item
1681  *
1682  * @param it genlist item with custom cursor set
1683  * @return the cursor type's name or @c NULL, if no custom cursors
1684  * were set to @p item (and on errors)
1685  *
1686  * @see elm_object_cursor_get()
1687  * @see elm_genlist_item_cursor_set() for more details
1688  * @see elm_genlist_item_cursor_unset()
1689  *
1690  * @ingroup Genlist
1691  */
1692 EAPI const char                   *elm_genlist_item_cursor_get(const Elm_Object_Item *it);
1693
1694 /**
1695  * Unset any custom mouse pointer/cursor decoration set to be
1696  * shown, when the mouse pointer is over the given genlist widget
1697  * item, thus making it show the @b default cursor again.
1698  *
1699  * @param it a genlist item
1700  *
1701  * Use this call to undo any custom settings on this item's cursor
1702  * decoration, bringing it back to defaults (no custom style set).
1703  *
1704  * @see elm_object_cursor_unset()
1705  * @see elm_genlist_item_cursor_set() for more details
1706  *
1707  * @ingroup Genlist
1708  */
1709 EAPI void                          elm_genlist_item_cursor_unset(Elm_Object_Item *it);
1710
1711 /**
1712  * Set a different @b style for a given custom cursor set for a
1713  * genlist item.
1714  *
1715  * @param it genlist item with custom cursor set
1716  * @param style the <b>theme style</b> to use (e.g. @c "default",
1717  * @c "transparent", etc)
1718  *
1719  * This function only makes sense when one is using custom mouse
1720  * cursor decorations <b>defined in a theme file</b> , which can
1721  * have, given a cursor name/type, <b>alternate styles</b> on
1722  * it. It works analogously as elm_object_cursor_style_set(), but
1723  * here applied only to genlist item objects.
1724  *
1725  * @warning Before you set a cursor style you should have defined a
1726  *       custom cursor previously on the item, with
1727  *       elm_genlist_item_cursor_set()
1728  *
1729  * @see elm_genlist_item_cursor_engine_only_set()
1730  * @see elm_genlist_item_cursor_style_get()
1731  *
1732  * @ingroup Genlist
1733  */
1734 EAPI void                          elm_genlist_item_cursor_style_set(Elm_Object_Item *it, const char *style);
1735
1736 /**
1737  * Get the current @b style set for a given genlist item's custom
1738  * cursor
1739  *
1740  * @param it genlist item with custom cursor set.
1741  * @return style the cursor style in use. If the object does not
1742  *         have a cursor set, then @c NULL is returned.
1743  *
1744  * @see elm_genlist_item_cursor_style_set() for more details
1745  *
1746  * @ingroup Genlist
1747  */
1748 EAPI const char                   *elm_genlist_item_cursor_style_get(const Elm_Object_Item *it);
1749
1750 /**
1751  * Set if the (custom) cursor for a given genlist item should be
1752  * searched in its theme, also, or should only rely on the
1753  * rendering engine.
1754  *
1755  * @param it item with custom (custom) cursor already set on
1756  * @param engine_only Use @c EINA_TRUE to have cursors looked for
1757  * only on those provided by the rendering engine, @c EINA_FALSE to
1758  * have them searched on the widget's theme, as well.
1759  *
1760  * @note This call is of use only if you've set a custom cursor
1761  * for genlist items, with elm_genlist_item_cursor_set().
1762  *
1763  * @note By default, cursors will only be looked for between those
1764  * provided by the rendering engine.
1765  *
1766  * @ingroup Genlist
1767  */
1768 EAPI void                          elm_genlist_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
1769
1770 /**
1771  * Get if the (custom) cursor for a given genlist item is being
1772  * searched in its theme, also, or is only relying on the rendering
1773  * engine.
1774  *
1775  * @param it a genlist item
1776  * @return @c EINA_TRUE, if cursors are being looked for only on
1777  * those provided by the rendering engine, @c EINA_FALSE if they
1778  * are being searched on the widget's theme, as well.
1779  *
1780  * @see elm_genlist_item_cursor_engine_only_set(), for more details
1781  *
1782  * @ingroup Genlist
1783  */
1784 EAPI Eina_Bool                     elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *it);
1785
1786 /**
1787  * Get the index of the item. It is only valid once displayed.
1788  *
1789  * @param item a genlist item
1790  * @return the position inside the list of item.
1791  *
1792  * @ingroup Genlist
1793  */
1794 EAPI int                           elm_genlist_item_index_get(Elm_Object_Item *it);
1795
1796 /**
1797  * Update the contents of all realized items.
1798  *
1799  * @param obj The genlist object.
1800  *
1801  * This updates all realized items by calling all the item class functions again
1802  * to get the contents, texts and states. Use this when the original
1803  * item data has changed and the changes are desired to be reflected.
1804  *
1805  * To update just one item, use elm_genlist_item_update().
1806  *
1807  * @see elm_genlist_realized_items_get()
1808  * @see elm_genlist_item_update()
1809  *
1810  * @ingroup Genlist
1811  */
1812 EAPI void                          elm_genlist_realized_items_update(Evas_Object *obj);
1813
1814 /**
1815  * Activate a genlist mode on an item
1816  *
1817  * @param item The genlist item
1818  * @param mode Mode name
1819  * @param mode_set Boolean to define set or unset mode.
1820  *
1821  * A genlist mode is a different way of selecting an item. Once a mode is
1822  * activated on an item, any other selected item is immediately unselected.
1823  * This feature provides an easy way of implementing a new kind of animation
1824  * for selecting an item, without having to entirely rewrite the item style
1825  * theme. However, the elm_genlist_selected_* API can't be used to get what
1826  * item is activate for a mode.
1827  *
1828  * The current item style will still be used, but applying a genlist mode to
1829  * an item will select it using a different kind of animation.
1830  *
1831  * The current active item for a mode can be found by
1832  * elm_genlist_mode_item_get().
1833  *
1834  * The characteristics of genlist mode are:
1835  * - Only one mode can be active at any time, and for only one item.
1836  * - Genlist handles deactivating other items when one item is activated.
1837  * - A mode is defined in the genlist theme (edc), and more modes can easily
1838  *   be added.
1839  * - A mode style and the genlist item style are different things. They
1840  *   can be combined to provide a default style to the item, with some kind
1841  *   of animation for that item when the mode is activated.
1842  *
1843  * When a mode is activated on an item, a new view for that item is created.
1844  * The theme of this mode defines the animation that will be used to transit
1845  * the item from the old view to the new view. This second (new) view will be
1846  * active for that item while the mode is active on the item, and will be
1847  * destroyed after the mode is totally deactivated from that item.
1848  *
1849  * @see elm_genlist_mode_get()
1850  * @see elm_genlist_mode_item_get()
1851  *
1852  * @ingroup Genlist
1853  */
1854 EAPI void                          elm_genlist_item_mode_set(Elm_Object_Item *it, const char *mode_type, Eina_Bool mode_set);
1855
1856 /**
1857  * Get the last (or current) genlist mode used.
1858  *
1859  * @param obj The genlist object
1860  *
1861  * This function just returns the name of the last used genlist mode. It will
1862  * be the current mode if it's still active.
1863  *
1864  * @see elm_genlist_item_mode_set()
1865  * @see elm_genlist_mode_item_get()
1866  *
1867  * @ingroup Genlist
1868  */
1869 EAPI const char                   *elm_genlist_mode_get(const Evas_Object *obj);
1870
1871 /**
1872  * Get active genlist mode item
1873  *
1874  * @param obj The genlist object
1875  * @return The active item for that current mode. Or @c NULL if no item is
1876  * activated with any mode.
1877  *
1878  * This function returns the item that was activated with a mode, by the
1879  * function elm_genlist_item_mode_set().
1880  *
1881  * @see elm_genlist_item_mode_set()
1882  * @see elm_genlist_mode_get()
1883  *
1884  * @ingroup Genlist
1885  */
1886 EAPI const Elm_Object_Item       *elm_genlist_mode_item_get(const Evas_Object *obj);
1887
1888 /**
1889  * Set reorder mode
1890  *
1891  * @param obj The genlist object
1892  * @param reorder_mode The reorder mode
1893  * (EINA_TRUE = on, EINA_FALSE = off)
1894  *
1895  * @ingroup Genlist
1896  */
1897 EAPI void                          elm_genlist_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode);
1898
1899 /**
1900  * Get the reorder mode
1901  *
1902  * @param obj The genlist object
1903  * @return The reorder mode
1904  * (EINA_TRUE = on, EINA_FALSE = off)
1905  *
1906  * @ingroup Genlist
1907  */
1908 EAPI Eina_Bool                     elm_genlist_reorder_mode_get(const Evas_Object *obj);
1909
1910 /**
1911  * @}
1912  */