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