Tizen Native API

This widget aims to have a more expansive list than the simple list in Elementary that could have more flexible items and allow many more entries while still being fast and low on memory usage.

genlist_inheritance_tree.png
genlist.png

At the same time it was also made to be able to do tree structures. But the price to pay is based on complexity when it comes to usage. If all you want is a simple list with icons and a single text, use the normal List object.

Genlist has a fairly large API, mostly because it's relatively complex, trying to be expansive, powerful, and efficient. First we begin with an overview on the theory behind genlist.

This widget inherits from the Layout one, so that all the functions acting on it also work for genlist objects.

This widget implements the elm-scrollable-interface interface, so that all (non-deprecated) functions for the base Scroller widget also work for genlists.

Some calls on the genlist's API are marked as deprecated, as they just wrap the scrollable widgets counterpart functions. Use the ones mentioned for each case of deprecation here. Eventually the deprecated ones are discarded (next major release).

Genlist item classes - creating items

In order to have the ability to add and delete items on the fly, genlist implements a class (callback) system where the application provides a structure with information about that type of item (genlist may contain multiple items of different types with different classes, states, and styles). Genlist calls the functions in this struct (methods) when an item is "realized" (i.e., created dynamically, while the user is scrolling the list). All objects are simply deleted when they are no longer needed by evas_object_del(). The Elm_Genlist_Item_Class structure contains the following members:

  • item_style - This is a constant string and simply defines the name of the item style. It must be specified and the default should be "default".
  • func - This is a struct with pointers to functions that are called when an item is going to actually be created. All of them receive a data parameter that points to the same data that is passed to elm_genlist_item_append() and other related item creation functions, and an obj parameter that points to the genlist object itself.

The function pointers inside func are text_get, content_get, state_get, and del. The first three functions also receive a part parameter described below. A brief description of these functions is as follows:

  • text_get - The part parameter is the name string of one of the existing text parts in the Edje group implementing the item's theme. This function must return a strdup'()ed string, as the caller is going to free() it when done. See Elm_Genlist_Item_Text_Get_Cb.
  • content_get - The part parameter is the name string of one of the existing (content) swallow parts in the Edje group implementing the item's theme. It must return NULL, when no content is desired, or a valid object handle, otherwise. The object is deleted by the genlist on its deletion or when the item is "unrealized". See Elm_Genlist_Item_Content_Get_Cb.
  • func.state_get - The part parameter is the name string of one of the state parts in the Edje group implementing the item's theme. It must return EINA_FALSE for false/off or EINA_TRUE for true/on. Genlists emit a signal to its theming Edje object with "elm,state,xxx,active" and "elm" as "emission" and "source" arguments, respectively, when the state is true (the default is false), where xxx is the name of the (state) part. See Elm_Genlist_Item_State_Get_Cb.
  • func.del - This is intended for use when genlist items are deleted, so any data attached to the item (e.g. its data parameter on creation) can be deleted. See Elm_Genlist_Item_Del_Cb.

The available item styles are as follows:

  • default
  • default_style - The text part is a textblock
  • double_label
  • icon_top_text_bottom
  • group_index
  • one_icon - Only 1 icon (left)
    Since (EFL) :
    1.7
  • end_icon - Only 1 icon (at end/right)
    Since (EFL) :
    1.7
  • no_icon - No icon (at end/right)
    Since (EFL) :
    1.7

Structure of items

An item in a genlist can have 0 or more texts (they can be regular text or textblock Evas objects - that's up to the style to determine), 0 or more blocks of content (which are simply objects swallowed into the genlist item's theming Edje object) and 0 or more boolean states, which have the behavior left to the user to define. The Edje part names for each of these properties are looked up, in the theme file for the genlist, under the Edje (string) data items named "labels", "contents", and "states", respectively. For each of these properties, if more than one part is provided, they must have names listed and separated by spaces in the data fields. For the default genlist item theme, we have one text part ("elm.text"), two content parts ("elm.swalllow.icon" and "elm.swallow.end") and no state parts.

A genlist item may be having one of the several styles. Elementary provides one by default - "default", but this can be extended by system or application custom themes/overlays/extensions (see themes for more details).

Editing and Navigating

Items can be added by several calls. All of them return a Elm_Object_Item handle that is an internal member inside the genlist. They all take a data parameter that is meant to be used as a handle for the application's internal data (eg. the struct with the original item data). The parent parameter is the parent genlist item this belongs to if it is a tree or an indexed group, and this value is NULL if there is no parent. The flags can be a bitmask of ELM_GENLIST_ITEM_NONE, ELM_GENLIST_ITEM_TREE, and ELM_GENLIST_ITEM_GROUP. If ELM_GENLIST_ITEM_TREE is set then this item is displayed as an item that is able to expand and have child items. If ELM_GENLIST_ITEM_GROUP is set then this item is a group index item that is displayed at the top until the next group comes. The func parameter is a convenience callback that is called when the item is selected and the data parameter is the func_data parameter, obj is the genlist object, and event_info is the genlist item.

elm_genlist_item_append() adds an item to the end of the list, or if there is a parent, it adds the item to the end of all the child items of the parent. elm_genlist_item_prepend() is the same but adds an item to the beginning of the list or children list. elm_genlist_item_insert_before() inserts at item before another item and elm_genlist_item_insert_after() inserts an item after the indicated item.

The application can clear the list with elm_genlist_clear() which deletes all the items in the list. elm_object_item_del() deletes a specific item. elm_genlist_item_subitems_clear() clears all items that are children of the indicated parent item.

To help inspect list items you can jump to the item at the top of the list with elm_genlist_first_item_get() which returns the item pointer. Similarly, elm_genlist_last_item_get() gets the item at the end of the list. elm_genlist_item_next_get() and elm_genlist_item_prev_get() get the next and previous items respectively relative to the indicated item. Using these calls you can walk through the entire item list/tree. Note that as a tree the items are flattened in the list, so elm_genlist_item_parent_get() lets you know which item is the parent (and thus helps you skip them if needed).

Multi-selection

If the application wants to allow multiple items to be selected, elm_genlist_multi_select_set() can enable this. If the list is single-selection only (the default), then elm_genlist_selected_item_get() returns the selected item, if any, or NULL if none is selected. If the list is multi-select then elm_genlist_selected_items_get() returns a list (that is only valid as long as no items are modified (added, deleted, selected, or unselected)).

Usage hints

There are also convenience functions. elm_object_item_widget_get() returns the genlist object the item belongs to. elm_genlist_item_show() makes the scroller scroll to show that specific item so that it is visible. elm_object_item_data_get() returns the data pointer set by the item creation functions.

If an item changes (state of boolean changes, text or content changes), then use elm_genlist_item_update() to have genlist update the item with the new state. Genlist re-realizes the item and thus calls the functions in the _Elm_Genlist_Item_Class for that item.

To programmatically (un)select an item use elm_genlist_item_selected_set(). To get its selected state use elm_genlist_item_selected_get(). Similarly, to expand/contract an item and get its expanded state, use elm_genlist_item_expanded_set() and elm_genlist_item_expanded_get(). And again to disable an item (unable to be selected and appear differently) use elm_object_item_disabled_set() to set this and elm_object_item_disabled_get() to get the disabled state.

In general, to indicate how the genlist should expand items horizontally to fill the list area, use elm_genlist_mode_set(). Valid modes are ELM_LIST_LIMIT, ELM_LIST_COMPRESS, and ELM_LIST_SCROLL. The default is ELM_LIST_SCROLL. This mode means that if items are too wide to fit, the scroller scrolls horizontally. Otherwise items are expanded to fill the width of the viewport of the scroller. If it is ELM_LIST_LIMIT, items are expanded to the viewport width if the viewport width is larger than the item, but the genlist widget width is limited to the largest item. Do not use the ELM_LIST_LIMIT mode with the homogenous mode turned on. ELM_LIST_COMPRESS can be combined with a different style that uses the edjes' ellipsis feature (cutting text off like this: "tex...").

Items call their selection func and callback only once when selected for the first time. Any further clicks do nothing, unless you enable always select with elm_genlist_select_mode_set() as ELM_OBJECT_SELECT_MODE_ALWAYS. This means even if selected, every click make the selected callbacks to be called. elm_genlist_select_mode_set() as ELM_OBJECT_SELECT_MODE_NONE turns off the ability to select items entirely and they neither appear selected nor call selected callback functions.

Remember that you can create new styles and add your own theme augmentation for each application with elm_theme_extension_add(). If you absolutely must have a specific style that overrides any theme that the user or system sets up, you can use elm_theme_overlay_add() to add such a file.

Implementation

Evas tracks every object you create. Every time it processes an event (mouse move, down, up etc.) it needs to walk through objects and find out what event they affect. Further, every time it renders display updates, in order to just calculate what to re-draw, it needs to walk through a large number of objects. Thus, the more objects you keep active, the more overhead Evas has in just doing its work. It is advisable to keep your active objects to the minimum working set you need. Also remember that object creation and deletion carries an overhead, so there is a middle-ground, which is not easily determined. But don't keep massive lists of objects you can't see or use. Genlist does this with list objects. It creates and destroys them dynamically as you scroll around. It groups them into blocks so that it can determine the visibility of a whole block at once as opposed to having to walk through the whole list. This 2-level list allows for very large numbers of items to be in the list (tests have used upto 2,000,000 items). Also genlist employs a queue for adding items. As items maybe of different sizes, every added item needs to be calculated as per its size and thus this presents a lot of overhead on populating the list, this genlist employs a queue. Every added item is queued and spooled off over time, though it appears some time later. So if your list has many members, you may find that it takes a while for them to appear and this process consumes a lot of CPU time while it is busy spooling.

Genlist also implements a tree structure for items, but it does so with callbacks to the application, with the application filling in tree structures when requested (allowing for efficient building of a very deep tree that could even be used for file-management). See the above smart signal callbacks for details.

Genlist smart events

This widget emits the following signals, besides the ones sent from Layout :

  • "activated" - The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the item that is activated.
  • "pressed" - The user pressed an item. The event_info parameter is the item that is pressed.
  • "released" - The user released an item. The event_info parameter is the item that is released.
  • "clicked,double" - The user has double-clicked an item. The event_info parameter is the item that is double-clicked.
  • "selected" - This is called when a user has selected an item. The event_info parameter is the genlist item that is selected.
  • "unselected" - This is called when a user has unselected an item. The event_info parameter is the genlist item that is unselected.
  • "expanded" - This is called when elm_genlist_item_expanded_set() is called and the item is now meant to be expanded. The event_info parameter is the genlist item that is indicated to expand. It is the job of this callback to then fill in the child items.
  • "contracted" - This is called when elm_genlist_item_expanded_set() is called and the item is now meant to contract. The event_info parameter is the genlist item that is indicated to contract. It is the job of this callback to then delete the child items.
  • "expand,request" - This is called when a user has indicated that they want to expand a tree branch item. The callback should decide if the item can expand (has any children) and then call elm_genlist_item_expanded_set() appropriately to set the state. The event_info parameter is the genlist item that is indicated to expand.
  • "contract,request" - This is called when a user has indicated that they want to contract a tree branch item. The callback should decide if the item can contract (has any children) and then call elm_genlist_item_expanded_set() appropriately to set the state. The event_info parameter is the genlist item that is indicated to contract.
  • "realized" - This is called when the item in the list is created as a real evas object. event_info parameter is the genlist item that is created.
  • "unrealized" - This is called just before an item is unrealized. After this call, the provided content objects are deleted and the item object itself is deleted or is put into a floating cache.
  • "drag,start,up" - This is called when the item in the list has been dragged (not scrolled) up.
  • "drag,start,down" - This is called when the item in the list has been dragged (not scrolled) down.
  • "drag,start,left" - This is called when the item in the list has been dragged (not scrolled) left.
  • "drag,start,right" - This is called when the item in the list has been dragged (not scrolled) right.
  • "drag,stop" - This is called when the item in the list is stopped being dragged.
  • "drag" - This is called when the item in the list is being dragged.
  • "longpressed" - This is called when the item is pressed for a certain amount of time. By default it's 1 second. The event_info parameter is the longpressed genlist item.
  • "scroll,anim,start" - This is called when scrolling animation has started.
  • "scroll,anim,stop" - This is called when scrolling animation has stopped.
  • "scroll,drag,start" - This is called when dragging the content has started.
  • "scroll,drag,stop" - This is called when dragging the content has stopped.
  • "edge,top" - This is called when the genlist is scrolled until the top edge.
  • "edge,bottom" - This is called when the genlist is scrolled until the bottom edge.
  • "edge,left" - This is called when the genlist is scrolled until the left edge.
  • "edge,right" - This is called when the genlist is scrolled until the right edge.
  • "multi,swipe,left" - This is called when the genlist is multi-touch swiped left.
  • "multi,swipe,right" - This is called when the genlist is multi-touch swiped right.
  • "multi,swipe,up" - This is called when the genlist is multi-touch swiped up.
  • "multi,swipe,down" - This is called when the genlist is multi-touch swiped down.
  • "multi,pinch,out" - This is called when the genlist is multi-touch pinched out.
  • "multi,pinch,in" - This is called when the genlist is multi-touch pinched in.
  • "swipe" - This is called when the genlist is swiped.
  • "moved" - This is called when a genlist item is moved in the reorder mode.
  • "moved,after" - This is called when a genlist item is moved after another item in the reorder mode. The event_info parameter is the reordered item. To get the relative previous item, use elm_genlist_item_prev_get(). This signal is called along with the "moved" signal.
  • "moved,before" - This is called when a genlist item is moved before another item in the reorder mode. The event_info parameter is the reordered item. To get the relative previous item, use elm_genlist_item_next_get(). This signal is called along with the "moved" signal.
  • "language,changed" - This is called when the program's language is changed. Call elm_genlist_realized_items_update() if the item's text should be translated.
  • "tree,effect,finished" - This is called when the genlist tree effect is finished.
  • "highlighted" - This is called when an item in the list is pressed and highlighted. The event_info parameter is the item that is highlighted.
  • "unhighlighted" - This is called when an item in the list is unpressed and unhighlighted. The event_info parameter is the item that is unhighlighted.

Supported common elm_object_item APIs.

Unsupported common elm_object_item APIs as per the genlist concept. Genlist fills content/text according to the appropriate callback functions. Use elm_genlist_item_update() or elm_genlist_item_fields_update() instead.

Functions

Evas_Objectelm_genlist_add (Evas_Object *parent)
 Adds a new genlist widget to the given parent Elementary (container) object.
void elm_genlist_clear (Evas_Object *obj)
 Removes all items from a given genlist widget.
void elm_genlist_multi_select_set (Evas_Object *obj, Eina_Bool multi)
 Enables or disables multi-selection in the genlist.
Eina_Bool elm_genlist_multi_select_get (const Evas_Object *obj)
 Gets whether multi-selection in genlist is enabled or disabled.
void elm_genlist_mode_set (Evas_Object *obj, Elm_List_Mode mode)
 Sets the horizontal stretching mode.
Elm_List_Mode elm_genlist_mode_get (const Evas_Object *obj)
 Gets the horizontal stretching mode.
Elm_Object_Itemelm_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)
 Appends a new item to a given genlist widget.
Elm_Object_Itemelm_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)
 Prepends a new item to a given genlist widget.
Elm_Object_Itemelm_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)
 Inserts an item before another in a genlist widget.
Elm_Object_Itemelm_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)
 Inserts an item after another in a genlist widget.
Elm_Object_Itemelm_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)
 Inserts a new item into the sorted genlist object.
Elm_Object_Itemelm_genlist_selected_item_get (const Evas_Object *obj)
 Gets the selected item in the genlist.
Eina_Listelm_genlist_selected_items_get (const Evas_Object *obj)
 Gets a list of selected items in the genlist.
Eina_Listelm_genlist_realized_items_get (const Evas_Object *obj)
 Gets a list of realized items in the genlist.
Elm_Object_Itemelm_genlist_first_item_get (const Evas_Object *obj)
 Gets the first item in the genlist.
Elm_Object_Itemelm_genlist_last_item_get (const Evas_Object *obj)
 Gets the last item in the genlist.
Elm_Object_Itemelm_genlist_item_next_get (const Elm_Object_Item *it)
 Gets the next item in a genlist widget's internal list of items, given that a handle to one of those items is present.
Elm_Object_Itemelm_genlist_item_prev_get (const Elm_Object_Item *it)
 Get the previous item in a genlist widget's internal list of items, given that a handle to one of those items is present.
void elm_genlist_item_selected_set (Elm_Object_Item *it, Eina_Bool selected)
 Sets whether a given genlist item is selected.
Eina_Bool elm_genlist_item_selected_get (const Elm_Object_Item *it)
 Gets whether a given genlist item is selected.
void elm_genlist_item_show (Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type)
 Shows the portion of a genlist's internal list containing a given item, immediately.
void elm_genlist_item_bring_in (Elm_Object_Item *it, Elm_Genlist_Item_Scrollto_Type type)
 Animatedly brings a given item to the visible area of a genlist.
void elm_genlist_item_update (Elm_Object_Item *it)
 Updates the content of an item.
void elm_genlist_item_item_class_update (Elm_Object_Item *it, const Elm_Genlist_Item_Class *itc)
 Updates the item class of an item.
const Elm_Genlist_Item_Classelm_genlist_item_item_class_get (const Elm_Object_Item *it)
 Gets the genlist item class for the given genlist item.
int elm_genlist_item_index_get (const Elm_Object_Item *it)
 Gets the index of the item. It is only valid once it is displayed.
void elm_genlist_realized_items_update (Evas_Object *obj)
 Updates the content of all the realized items.
unsigned int elm_genlist_items_count (const Evas_Object *obj)
 Returns the number of items that are currently in a list.
Elm_Genlist_Item_Classelm_genlist_item_class_new (void)
 Creates a new genlist item class in a given genlist widget.
void elm_genlist_item_class_free (Elm_Genlist_Item_Class *itc)
 Removes an item class from a given genlist widget.
void elm_genlist_item_class_ref (Elm_Genlist_Item_Class *itc)
 Increments the object reference count for the item class.
void elm_genlist_item_class_unref (Elm_Genlist_Item_Class *itc)
 Decrements the object reference count for the item class.
void elm_genlist_item_cursor_set (Elm_Object_Item *it, const char *cursor)
 Sets the type of mouse pointer/cursor decoration to be displayed when the mouse pointer is over the given genlist widget item.
const char * elm_genlist_item_cursor_get (const Elm_Object_Item *it)
 Gets the type of mouse pointer/cursor decoration set to be displayed when the mouse pointer is over the given genlist widget item.
void elm_genlist_item_cursor_unset (Elm_Object_Item *it)
 Unsets the custom mouse pointer/cursor decoration set to be displayed when the mouse pointer is over the given genlist widget item, thus making it show the default cursor again.
void elm_genlist_item_cursor_style_set (Elm_Object_Item *it, const char *style)
 Sets a different style for a given custom cursor set for a genlist item.
const char * elm_genlist_item_cursor_style_get (const Elm_Object_Item *it)
 Gets the current style set for a given genlist item's custom cursor.
void elm_genlist_item_cursor_engine_only_set (Elm_Object_Item *it, Eina_Bool engine_only)
 Sets whether the (custom) cursor for a given genlist item should be searched in its theme or should only rely on the rendering engine.
Eina_Bool elm_genlist_item_cursor_engine_only_get (const Elm_Object_Item *it)
 Gets whether the (custom) cursor for a given genlist item is being searched in its theme or is only relying on the rendering engine.
void elm_genlist_homogeneous_set (Evas_Object *obj, Eina_Bool homogeneous)
 Enables or disables the homogeneous mode.
Eina_Bool elm_genlist_homogeneous_get (const Evas_Object *obj)
 Gets whether the homogeneous mode is enabled.
void elm_genlist_block_count_set (Evas_Object *obj, int count)
 Sets the maximum number of items within an item block.
int elm_genlist_block_count_get (const Evas_Object *obj)
 Gets the maximum number of items within an item block.
void elm_genlist_longpress_timeout_set (Evas_Object *obj, double timeout)
 Sets the timeout in seconds for the longpress event.
double elm_genlist_longpress_timeout_get (const Evas_Object *obj)
 Gets the timeout in seconds for the longpress event.
Elm_Object_Itemelm_genlist_at_xy_item_get (const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret)
 Gets the item that is at the x, y canvas coordinates.
Elm_Object_Itemelm_genlist_item_parent_get (const Elm_Object_Item *it)
 Gets the parent item of the given genlist item.
void elm_genlist_item_subitems_clear (Elm_Object_Item *it)
 Removes all sub-items (children) of the given item.
void elm_genlist_item_expanded_set (Elm_Object_Item *it, Eina_Bool expanded)
 Sets the expanded state of an item.
Eina_Bool elm_genlist_item_expanded_get (const Elm_Object_Item *it)
 Gets the expanded state of an item.
int elm_genlist_item_expanded_depth_get (const Elm_Object_Item *it)
 Gets the depth of the expanded item.
void elm_genlist_item_all_contents_unset (Elm_Object_Item *it, Eina_List **l)
 Unsets all the content fetched by the item class.
void elm_genlist_item_promote (Elm_Object_Item *it)
 Promotes an item to the top of the list.
void elm_genlist_item_demote (Elm_Object_Item *it)
 Demotes an item to the end of the list.
void elm_genlist_item_fields_update (Elm_Object_Item *it, const char *parts, Elm_Genlist_Item_Field_Type itf)
 Updates a part of an item.
void elm_genlist_reorder_mode_set (Evas_Object *obj, Eina_Bool reorder_mode)
 Sets the reorder mode.
Eina_Bool elm_genlist_reorder_mode_get (const Evas_Object *obj)
 Gets the reorder mode.
Elm_Genlist_Item_Type elm_genlist_item_type_get (const Elm_Object_Item *it)
 Gets the item type.
void elm_genlist_select_mode_set (Evas_Object *obj, Elm_Object_Select_Mode mode)
 Sets the genlist select mode.
Elm_Object_Select_Mode elm_genlist_select_mode_get (const Evas_Object *obj)
 Gets the genlist select mode.
void elm_genlist_highlight_mode_set (Evas_Object *obj, Eina_Bool highlight)
 Sets whether the genlist items should be highlighted when an item is selected.
Eina_Bool elm_genlist_highlight_mode_get (const Evas_Object *obj)
 Gets whether the genlist items should be highlighted when an item is selected.
void elm_genlist_item_select_mode_set (Elm_Object_Item *it, Elm_Object_Select_Mode mode)
 Sets the genlist item select mode.
Elm_Object_Select_Mode elm_genlist_item_select_mode_get (const Elm_Object_Item *it)
 Gets the genlist item select mode.
Elm_Object_Itemelm_genlist_nth_item_get (const Evas_Object *obj, unsigned int nth)
 Gets the nth item in a given genlist widget, placed at position nth, in its internal items list.

Typedefs

typedef Elm_Gen_Item_Class Elm_Genlist_Item_Class
typedef Elm_Gen_Item_Text_Get_Cb Elm_Genlist_Item_Text_Get_Cb
typedef Elm_Gen_Item_Content_Get_Cb Elm_Genlist_Item_Content_Get_Cb
typedef Elm_Gen_Item_State_Get_Cb Elm_Genlist_Item_State_Get_Cb
typedef Elm_Gen_Item_Del_Cb Elm_Genlist_Item_Del_Cb

Typedef Documentation


Enumeration Type Documentation

Enumeration that defines the type of the item field.

Remarks:
It is used while updating the item field.
It can be used for updating multi fields.
Enumerator:
ELM_GENLIST_ITEM_FIELD_ALL 

The item contains all fields

ELM_GENLIST_ITEM_FIELD_TEXT 

The item contains a text field

ELM_GENLIST_ITEM_FIELD_CONTENT 

The item contains a content field

ELM_GENLIST_ITEM_FIELD_STATE 

The item contains a state field

Enumeration that defines where to position the item in the genlist.

Enumerator:
ELM_GENLIST_ITEM_SCROLLTO_NONE 

Scrolls to nowhere

ELM_GENLIST_ITEM_SCROLLTO_IN 

Scrolls to the nearest viewport

ELM_GENLIST_ITEM_SCROLLTO_TOP 

Scrolls to the top of the viewport

ELM_GENLIST_ITEM_SCROLLTO_MIDDLE 

Scrolls to the middle of the viewport

Enumeration that defines whether the item is of a special type (has subitems or it's the index of a group), or it is just a simple item.

Enumerator:
ELM_GENLIST_ITEM_NONE 

Simple item

ELM_GENLIST_ITEM_TREE 

This may be expanded and may have child items

ELM_GENLIST_ITEM_GROUP 

The index item of a group of items. This item can have child items


Function Documentation

Adds a new genlist widget to the given parent Elementary (container) object.

This function inserts a new genlist widget on the canvas.

Since :
2.3.1
Parameters:
[in]parentThe parent object
Returns:
A new genlist widget handle, otherwise NULL in case of an error
See also:
elm_genlist_item_append()
elm_object_item_del()
elm_genlist_clear()
Elm_Object_Item* elm_genlist_at_xy_item_get ( const Evas_Object obj,
Evas_Coord  x,
Evas_Coord  y,
int *  posret 
)

Gets the item that is at the x, y canvas coordinates.

This returns the item at the given coordinates (which are canvas relative, not object-relative). If an item is at that coordinate, that item handle is returned, and if posret is not NULL, the integer it is pointing to is set to either -1, 0, or 1, depending on whether the coordinate is on the upper portion of that item (-1), in the middle section (0), or on the lower part (1). If NULL is returned as an item (no item found there), then posret may indicate -1 or 1 depending on whether the coordinate is above or below the items in the genlist respectively.

Since :
2.3.1
Parameters:
[in]objThe genlist object
[in]xThe input x coordinate
[in]yThe input y coordinate
[out]posretThe position relative to the returned item
Returns:
The item at the coordinates, otherwise NULL if there are none

Gets the maximum number of items within an item block.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The maximum number of items within an item block
See also:
elm_genlist_block_count_set()
void elm_genlist_block_count_set ( Evas_Object obj,
int  count 
)

Sets the maximum number of items within an item block.

This configures the block count to tune the target with, for a particular performance matrix.

Since :
2.3.1
Remarks:
A block of objects are used to reduce the number of operations occurring due to large number of objects on the screen. It can determine the visibility, or if the object has changed, its theme needs to be updated by doing this kind of calculation to the entire block, instead of every object.
The default value for the block count is enough for most lists, so unless your sure that you have a lot of objects visible on the screen at the same time, don't try to change this.
Parameters:
[in]objThe genlist object
[in]countThe maximum number of items within an item block
Default is 32.
See also:
elm_genlist_block_count_get()
Implementation
void elm_genlist_clear ( Evas_Object obj)

Removes all items from a given genlist widget.

This removes (and deletes) all items in obj, making it empty.

Since :
2.3.1
Parameters:
[in]objThe genlist object
See also:
elm_object_item_del() to remove just one item.

Gets the first item in the genlist.

This returns the first item in the list.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The first item, otherwise NULL if there are no items

Gets whether the genlist items should be highlighted when an item is selected.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
EINA_TRUE indicates that items can be highlighted, otherwise EINA_FALSE indicates that they can't
If obj is NULL, EINA_FALSE is returned.
See also:
elm_genlist_highlight_mode_set()
void elm_genlist_highlight_mode_set ( Evas_Object obj,
Eina_Bool  highlight 
)

Sets whether the genlist items should be highlighted when an item is selected.

This turns on/off the highlight effect when an item is selected and it gets or does not get highlighted. The selected and clicked callback functions are still called.

Since :
2.3.1
Remarks:
Highlight is enabled by default.
Parameters:
[in]objThe genlist object
[in]highlightIf EINA_TRUE highlighting is enabled, otherwise EINA_FALSE to disable it
See also:
elm_genlist_highlight_mode_get().

Gets whether the homogeneous mode is enabled.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The boolean value assuming that the items within the genlist are of the same height and width (EINA_TRUE = on, EINA_FALSE = off)
See also:
elm_genlist_homogeneous_set()
void elm_genlist_homogeneous_set ( Evas_Object obj,
Eina_Bool  homogeneous 
)

Enables or disables the homogeneous mode.

This enables the homogeneous mode where items are of the same height and width so that genlist may perform lazy-loading at its maximum (which increases the performance for scrolling the list). In the normal mode, genlist pre-calculates all the items' sizes even though they are not in use. So items' callbacks are called for more times than expected. But the homogeneous mode skips the item size pre-calculation process so items' callbacks are called only when the item is needed.

Since :
2.3.1
Remarks:
This also works well with group index.
Parameters:
[in]objThe genlist object
[in]homogeneousThe boolean value assuming that the items within the genlist are of the same height and width (EINA_TRUE = on, EINA_FALSE = off)
Default is EINA_FALSE.
See also:
elm_genlist_mode_set()
elm_genlist_homogeneous_get()

Unsets all the content fetched by the item class.

This instructs genlist to release references to content in the item, meaning that they are longer managed by genlist and are floating "orphans" that can be re-used elsewhere if the user wants to.

Since :
2.3.1
Parameters:
[in]itThe genlist item
[in]lThe content list to return
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 
)

Appends a new item to a given genlist widget.

This adds the given item to the end of the list or the end of the children list if the parent is given.

Since :
2.3.1
Parameters:
[in]objThe genlist object
[in]itcThe item class for the item
[in]dataThe item data
[in]parentThe parent item, otherwise NULL if there is no parent item
[in]typeThe item type
[in]funcThe convenience function that is called when the item is selected
[in]func_dataThe data passed to func mentioned above
Returns:
A handle to the added item, otherwise NULL if it is not possible
See also:
elm_genlist_item_prepend()
elm_genlist_item_insert_before()
elm_genlist_item_insert_after()
elm_object_item_del()

Animatedly brings a given item to the visible area of a genlist.

This causes genlist to jump to the given item it and display it (by animatedly scrolling), if it is not fully visible. This may use animation and may take some time.

Since :
2.3.1
Parameters:
[in]itThe item to display
[in]typeThe position to bring the given item to Elm_Genlist_Item_Scrollto_Type
See also:
elm_genlist_item_show()

Removes an item class from a given genlist widget.

This removes an item class from the genlist widget. Whenever it has no more references to it, the item class is going to be freed. Otherwise it just decreases its reference count.

Since :
2.3.1
Parameters:
[in]itcThe item class to be removed
See also:
elm_genlist_item_class_new()
elm_genlist_item_class_ref()
elm_genlist_item_class_unref()

Creates a new genlist item class in a given genlist widget.

This adds a genlist item class for the genlist widget. When adding an item, the genlist_item_{append, prepend, insert} function needs the item class of the item. Given callback parameters are used for retrieving {text, content} of an added item. Set as NULL if it's not used. If there's no available memory, it returns NULL.

Since :
2.3.1
Returns:
Newly allocated genlist item class
See also:
elm_genlist_item_class_free()
elm_genlist_item_append()

Increments the object reference count for the item class.

This API just increases its reference count for item class management.

Since :
2.3.1
Parameters:
[in]itcThe given item class object to reference
See also:
elm_genlist_item_class_unref()

Decrements the object reference count for the item class.

This API just decreases its reference count for item class management. Reference count can't be less than 0.

Since :
2.3.1
Parameters:
[in]itcThe given item class object to reference
See also:
elm_genlist_item_class_ref()
elm_genlist_item_class_free()

Gets whether the (custom) cursor for a given genlist item is being searched in its theme or is only relying on the rendering engine.

Since :
2.3.1
Parameters:
[in]itThe genlist item
Returns:
EINA_TRUE if cursors are being looked for only from those provided by the rendering engine, otherwise EINA_FALSE if they are being searched on the widget's theme as well.
See also:
elm_genlist_item_cursor_engine_only_set() for more details

Sets whether the (custom) cursor for a given genlist item should be searched in its theme or should only rely on the rendering engine.

This call is used only if you have set a custom cursor for genlist items using elm_genlist_item_cursor_set().

Since :
2.3.1
Remarks:
By default, cursors are looked for only from those provided by the rendering engine.
Parameters:
[in]itThe item with custom (custom) cursor already set on it
[in]engine_onlyIf EINA_TRUE look for cursors only from those provided by the rendering engine, otherwise EINA_FALSE to have them searched on the widget's theme as well
const char* elm_genlist_item_cursor_get ( const Elm_Object_Item it)

Gets the type of mouse pointer/cursor decoration set to be displayed when the mouse pointer is over the given genlist widget item.

Since :
2.3.1
Parameters:
[in]itThe genlist item with a custom cursor set
Returns:
The cursor type, otherwise NULL if no custom cursors are set to it (and on errors)
See also:
elm_object_cursor_get()
elm_genlist_item_cursor_set() for more details
elm_genlist_item_cursor_unset()
void elm_genlist_item_cursor_set ( Elm_Object_Item it,
const char *  cursor 
)

Sets the type of mouse pointer/cursor decoration to be displayed when the mouse pointer is over the given genlist widget item.

This function is analogous to elm_object_cursor_set(), but the cursor's changing area is restricted to the item's area, and not the whole widget. Note that item cursors have precedence over widget cursors, so a mouse over it always shows the cursor type.

Since :
2.3.1
Remarks:
If this function is called twice for an object, a previously set cursor is unset on the second call.
Parameters:
[in]itThe genlist item on which to customize the cursor
[in]cursorthe cursor type
See also:
elm_object_cursor_set()
elm_genlist_item_cursor_get()
elm_genlist_item_cursor_unset()

Gets the current style set for a given genlist item's custom cursor.

Since :
2.3.1
Parameters:
[in]itThe genlist item with custom cursor set
Returns:
style The cursor style in use /n If the object does not have a cursor set, then NULL is returned.
See also:
elm_genlist_item_cursor_style_set()
void elm_genlist_item_cursor_style_set ( Elm_Object_Item it,
const char *  style 
)

Sets a different style for a given custom cursor set for a genlist item.

This function only makes sense when one is using customized mouse cursor decorations defined in a theme file , which can have, given a cursor name/type, alternate styles on it. It is analogous to elm_object_cursor_style_set(), but is applied only to genlist item objects.

Since :
2.3.1
Remarks:
Before you set a cursor style, you should define a custom cursor on the item using elm_genlist_item_cursor_set()
Parameters:
[in]itThe genlist item with a custom cursor set
[in]styleThe theme style to use (e.g. "default", "transparent", etc)
See also:
elm_genlist_item_cursor_engine_only_set()
elm_genlist_item_cursor_style_get()

Unsets the custom mouse pointer/cursor decoration set to be displayed when the mouse pointer is over the given genlist widget item, thus making it show the default cursor again.

Since :
2.3.1
Remarks:
Use this call to undo any custom settings on this item's cursor decoration, bringing it back to the default value (no custom style set).
Parameters:
[in]itThe genlist item
See also:
elm_object_cursor_unset()
elm_genlist_item_cursor_set()

Demotes an item to the end of the list.

Since :
2.3.1
Parameters:
[in]itThe genlist item

Gets the depth of the expanded item.

Since :
2.3.1
Parameters:
[in]itThe genlist item object
Returns:
The depth of the expanded item

Gets the expanded state of an item.

This gets the expanded state of an item.

Since :
2.3.1
Parameters:
[in]itThe genlist item
Returns:
The expanded state
See also:
elm_genlist_item_expanded_set()

Sets the expanded state of an item.

This function flags the item of type ELM_GENLIST_ITEM_TREE as either expanded or not expanded.

Since :
2.3.1
Remarks:
The theme responds to this change visually, and a signal "expanded" or "contracted" is sent from the genlist with a pointer to the item that has been expanded/contracted.
Calling this function won't show or hide any child of this item (if it is a parent). You must manually delete and create them on the callbacks of the "expanded" or "contracted" signals.
Parameters:
[in]itThe genlist item
[in]expandedThe expanded state (EINA_TRUE if expanded, EINA_FALSE if not expanded)
See also:
elm_genlist_item_expanded_get()
void elm_genlist_item_fields_update ( Elm_Object_Item it,
const char *  parts,
Elm_Genlist_Item_Field_Type  itf 
)

Updates a part of an item.

This updates an item part by calling the item's fetching functions again to get the content, text, and states. Use this when the original item data has changed and the changes are desired to reflect. Second part's argument is used for globbing to match '*', '?', and '.' It can be used for updating multi fields.

Since :
2.3.1
Remarks:
Use elm_genlist_realized_items_update() to update an item's all property.
Parameters:
[in]itThe genlist item
[in]partsThe name of the item part
[in]itfThe item part type
See also:
elm_genlist_item_update()

Gets the index of the item. It is only valid once it is displayed.

Since :
2.3.1
Parameters:
[in]itThe genlist item
Returns:
The position inside the list of items
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 
)

Inserts an item after another in a genlist widget.

This inserts an item after another in the list. It is in the same tree level or group as the item after which it is inserted.

Since :
2.3.1
Parameters:
[in]objThe genlist object
[in]itcThe item class for the item
[in]dataThe item data
[in]parentThe parent item, otherwise NULL if there is no parent item
[in]afterThe item after which to place this new one
[in]typeThe item type
[in]funcThe convenience function that is called when the item is selected
[in]func_dataThe data passed to func mentioned above
Returns:
A handle to the item added, otherwise NULL if it is not possible
See also:
elm_genlist_item_append()
elm_genlist_item_prepend()
elm_genlist_item_insert_before()
elm_object_item_del()
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 
)

Inserts an item before another in a genlist widget.

This inserts an item before another in the list. It is the same tree level or group as the item before which it is inserted.

Since :
2.3.1
Parameters:
[in]objThe genlist object
[in]itcThe item class for the item
[in]dataThe item data
[in]parentThe parent item, otherwise NULL if there is no parent item
[in]beforeThe item before which to place this new one
[in]typeThe item type
[in]funcThe convenience function that is called when the item is selected
[in]func_dataThe data passed to func mentioned above
Returns:
A handle to the item added, otherwise NULL if it is not possible
See also:
elm_genlist_item_append()
elm_genlist_item_prepend()
elm_genlist_item_insert_after()
elm_object_item_del()

Gets the genlist item class for the given genlist item.

This returns the Genlist_Item_Class for the given item. It can be used to examine the function pointers and item style.

Since :
2.3.1
Parameters:
[in]itThe genlist item
Returns:
The item class

Updates the item class of an item.

This sets another class of the item, changing the way it is displayed. After changing the item class, elm_genlist_item_update() is called on the item it.

Since :
2.3.1
Parameters:
[in]itThe item
[in]itcThe item class for the item

Gets the next item in a genlist widget's internal list of items, given that a handle to one of those items is present.

This returns the item placed after it on the container genlist.

Since :
2.3.1
Parameters:
[in]itThe genlist item to fetch next from
Returns:
The item after it, otherwise NULL if there are none (and on errors)
See also:
elm_genlist_item_prev_get()

Gets the parent item of the given genlist item.

This returns the item that is specified as the parent of the item it in elm_genlist_item_append() and insertion related functions.

Since :
2.3.1
Parameters:
[in]itThe genlist item
Returns:
The parent of the item, otherwise NULL if it has no parent item
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 
)

Prepends a new item to a given genlist widget.

This adds an item to the beginning of the list or beginning of the children of the parent if given.

Since :
2.3.1
Parameters:
[in]objThe genlist object
[in]itcThe item class for the item
[in]dataThe item data
[in]parentThe parent item, otherwise NULL if there is no parent item
[in]typeThe item type
[in]funcThe convenience function that is called when the item is selected
[in]func_dataThe data passed to func mentioned above
Returns:
A handle to the added item, otherwise NULL if it is not possible
See also:
elm_genlist_item_append()
elm_genlist_item_insert_before()
elm_genlist_item_insert_after()
elm_object_item_del()

Get the previous item in a genlist widget's internal list of items, given that a handle to one of those items is present.

This returns the item placed before it on the container genlist.

Since :
2.3.1
Parameters:
[in]itThe genlist item to fetch previous from
Returns:
The item before it, otherwise NULL if there are none (and on errors)
See also:
elm_genlist_item_next_get()

Promotes an item to the top of the list.

Since :
2.3.1
Parameters:
[in]itThe genlist item

Gets the genlist item select mode.

Since :
2.3.1
Parameters:
[in]itThe genlist item object
Returns:
The select mode (If getting the mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
See also:
elm_genlist_item_select_mode_set()

Sets the genlist item select mode.

Since :
2.3.1
Remarks:
elm_genlist_select_mode_set() changes the item select mode.
  • ELM_OBJECT_SELECT_MODE_DEFAULT : The item calls their selection func and callback on first getting selected. Any further clicks do nothing, unless you set the always select mode.
  • ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every click calls the selected callbacks.
  • ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select the item entirely and they neither appear selected nor call selected callback functions.
  • ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY : This applies the no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE. The no-finger-size rule makes an item smaller than lower limit. Clickable objects should be bigger than a human touch point device (your finger) for some touch or small screen devices. Once it is enabled, the item can be shrunk to a value more than the predefined finger-size value. And the item is updated.
Parameters:
[in]itThe genlist item object
[in]modeThe select mode
See also:
elm_genlist_item_select_mode_get()

Gets whether a given genlist item is selected.

Since :
2.3.1
Parameters:
[in]itThe item
Returns:
EINA_TRUE if it's selected, otherwise EINA_FALSE
See also:
elm_genlist_item_selected_set()

Sets whether a given genlist item is selected.

This sets the selected state of an item. If multi-selection is not enabled on the containing genlist and selected is EINA_TRUE, any previously selected item gets unselected in favor of this new one.

Since :
2.3.1
Parameters:
[in]itThe item
[in]selectedIf EINA_TRUE it is selected, otherwise EINA_FALSE to unselect it
See also:
elm_genlist_item_selected_get()

Shows the portion of a genlist's internal list containing a given item, immediately.

This causes genlist to jump to the given item it and display it (by jumping to that position), if it is not fully visible.

Since :
2.3.1
Parameters:
[in]itThe item to display
[in]typeThe position to bring the given item to Elm_Genlist_Item_Scrollto_Type
See also:
elm_genlist_item_bring_in()
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 
)

Inserts a new item into the sorted genlist object.

This inserts an item in the genlist based on a user defined comparison function. The two arguments passed to the function func are genlist item handles to compare.

Since :
2.3.1
Parameters:
[in]objThe genlist object
[in]itcThe item class for the item
[in]dataThe item data
[in]parentThe parent item, otherwise NULL if there is no parent item
[in]typeThe item type
[in]compThe function called for sorting
[in]funcThe convenience function that is called when the item is selected
[in]func_dataThe data passed to func mentioned above
Returns:
A handle to the item added, otherwise NULL if it is not possible
See also:
elm_genlist_item_append()
elm_genlist_item_prepend()
elm_genlist_item_insert_after()
elm_object_item_del()

Removes all sub-items (children) of the given item.

This removes all items (and their descendants) that are children of the given item it.

Since :
2.3.1
Parameters:
[in]itThe genlist item
See also:
elm_genlist_clear()
elm_object_item_del()

Gets the item type.

This function returns the item type. If it fails, the return value is ELM_GENLIST_ITEM_MAX

Since :
2.3.1
Parameters:
[in]itThe genlist item
Returns:
The item type

Updates the content of an item.

This updates an item by calling all the item class functions again to get the content, text, and states. Use this when the original item data has changed and the changes are desired to reflect.

Use elm_genlist_realized_items_update() to update already realized items.

Since :
2.3.1
Remarks:
This also updates the internal genlist item object(edje_object as of now). So when this is called, between mouse down and mouse up, mouse up event is ignored because edje_object is deleted and created again by this API. If you want to avoid this, use elm_genlist_item_fields_update.
Parameters:
[in]itThe item
See also:
elm_genlist_realized_items_update()
unsigned int elm_genlist_items_count ( const Evas_Object obj)

Returns the number of items that are currently in a list.

Since :
2.3.1
Remarks:
This behavior is O(1) and includes items which may or may not be realized.
Parameters:
[in]objThe list
Returns:
The total number of items in the list

Gets the last item in the genlist.

This returns the last item in the list.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The last item, otherwise NULL if there are no items

Gets the timeout in seconds for the longpress event.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The timeout in seconds
See also:
elm_genlist_longpress_timeout_get()
void elm_genlist_longpress_timeout_set ( Evas_Object obj,
double  timeout 
)

Sets the timeout in seconds for the longpress event.

Since :
2.3.1
Remarks:
This option changes the time it takes to send an event "longpressed" after the mouse down signal is sent to the list. If this event occurs, no "clicked" event is sent.
If you set the longpress timeout value with this API, your genlist is not affected by the longpress value of the elementary config value later.
Parameters:
[in]objThe genlist object
[in]timeoutThe timeout in seconds
The default value is elm config value(1.0).
See also:
elm_genlist_longpress_timeout_set()

Gets the horizontal stretching mode.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The mode to use (ELM_LIST_LIMIT, ELM_LIST_SCROLL)
See also:
elm_genlist_mode_set()
void elm_genlist_mode_set ( Evas_Object obj,
Elm_List_Mode  mode 
)

Sets the horizontal stretching mode.

This sets the mode used for sizing items horizontally. Valid modes are ELM_LIST_LIMIT, ELM_LIST_SCROLL, and ELM_LIST_COMPRESS. The default is ELM_LIST_SCROLL. This mode means that if items are too wide to fit, the scroller scrolls horizontally. Otherwise items are expanded to fill the width of the viewport of the scroller. If it is ELM_LIST_LIMIT, items are expanded to the viewport width and limited to that size. If it is ELM_LIST_COMPRESS, the item width is fixed (restricted to a minimum of) to the list width when calculating its size in order to allow the height to be calculated based on it. This allows, for instance, a text block to wrap lines if the Edje part is configured with "text.min: 0 1".

Since :
2.3.1
Remarks:
ELM_LIST_COMPRESS makes list resize slower as it recalculates every item height again whenever the list width changes
The homogeneous mode is so that all items in the genlist are of the same width/height. With ELM_LIST_COMPRESS, genlist items are initialized fast. However, there are no sub-objects in the genlist which can be on the flying resizable (such as TEXTBLOCK). If so, then some dynamic resizable objects in the genlist would not be diplayed properly.
Parameters:
[in]objThe genlist object
[in]modeThe mode to use (either ELM_LIST_SCROLL or ELM_LIST_LIMIT)
See also:
elm_genlist_mode_get()

Gets whether multi-selection in genlist is enabled or disabled.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The boolean value that indicates whether multi-selection is enabled or disabled (EINA_TRUE = enabled/EINA_FALSE = disabled). Default is EINA_FALSE.
See also:
elm_genlist_multi_select_set()
void elm_genlist_multi_select_set ( Evas_Object obj,
Eina_Bool  multi 
)

Enables or disables multi-selection in the genlist.

This enables (EINA_TRUE) or disables (EINA_FALSE) multi-selection in the list. This allows more than 1 item to be selected. To retrieve the list of selected items, use elm_genlist_selected_items_get().

Since :
2.3.1
Parameters:
[in]objThe genlist object
[in]multiThe boolean value that enables or disables multi-selection
Default is disabled.
See also:
elm_genlist_selected_items_get()
elm_genlist_multi_select_get()
Elm_Object_Item* elm_genlist_nth_item_get ( const Evas_Object obj,
unsigned int  nth 
)

Gets the nth item in a given genlist widget, placed at position nth, in its internal items list.

Since (EFL) :
1.8
Since :
2.3.1
Parameters:
[in]objThe genlist object
[in]nthThe number of the item to grab (0 being the first)
Returns:
The item stored in obj at position nth, otherwise NULL if there is no item with that index (and on errors)

Gets a list of realized items in the genlist.

This returns a list of realized items in the genlist. The list contains genlist item pointers. The list must be freed by the caller when done with eina_list_free(). The item pointers in the list are only valid as long as those items are not deleted or the genlist is not deleted.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The list of realized items, otherwise NULL if none are realized
See also:
elm_genlist_realized_items_update()

Updates the content of all the realized items.

This updates all the realized items by calling all the item class functions again to get the content, text and states. Use this when the original item data has changed and the changes are desired to reflect.

To update just one item, use elm_genlist_item_update().

Since :
2.3.1
Parameters:
[in]objThe genlist object
See also:
elm_genlist_realized_items_get()
elm_genlist_item_update()

Gets the reorder mode.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The reorder mode (EINA_TRUE = on, EINA_FALSE = off)
void elm_genlist_reorder_mode_set ( Evas_Object obj,
Eina_Bool  reorder_mode 
)

Sets the reorder mode.

Since :
2.3.1
Remarks:
After turning on the reorder mode, longpress on a normal item triggers reordering of the item. You can move the item up and down. However, reordering does not work with group items.
Parameters:
[in]objThe genlist object
[in]reorder_modeThe reorder mode (EINA_TRUE = on, EINA_FALSE = off)

Gets the genlist select mode.

Since :
2.3.1
Parameters:
[in]objThe genlist object
Returns:
The select mode (If getting the mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
See also:
elm_genlist_select_mode_set()

Sets the genlist select mode.

Since :
2.3.1
Remarks:
elm_genlist_select_mode_set() changes the item select mode in the genlist widget.
  • ELM_OBJECT_SELECT_MODE_DEFAULT : Items call their selection func and callback on first getting selected. Any further clicks do nothing, unless you set the always select mode.
  • ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every click calls the selected callbacks.
  • ELM_OBJECT_SELECT_MODE_NONE : This turns off the ability to select items entirely and they neither appear selected nor call selected callback functions.
Parameters:
[in]objThe genlist object
[in]modeThe select mode
See also:
elm_genlist_select_mode_get()

Gets the selected item in the genlist.

This gets the selected item in the list (if multi-selection is enabled, only the item that is first selected in the list is returned, which is not very useful, so see elm_genlist_selected_items_get() to know when multi-selection is used).

Since :
2.3.1
Remarks:
If no item is selected, NULL is returned.
Parameters:
[in]objThe genlist object
Returns:
The selected item, otherwise NULL if none are selected
See also:
elm_genlist_selected_items_get()

Gets a list of selected items in the genlist.

It returns a list of selected items. This list pointer is only valid as long as the selection doesn't change (no items are selected or unselected, or unselected implicitly by deletion). The list contains genlist item pointers. The order of the items in this list is the order in which they were selected, i.e. the first item in this list is the first item that is selected, and so on.

Since :
2.3.1
Remarks:
If not in the multi-select mode, use elm_genlist_selected_item_get() instead.
Parameters:
[in]objThe genlist object
Returns:
The list of selected items, otherwise NULL if none are selected
See also:
elm_genlist_multi_select_set()
elm_genlist_selected_item_get()