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