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