Genlist Item

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Macros | Enumerations | Functions
Genlist Item
Elementary » Genlist (Generic list)

Elementary genlist item class. More...

## Macros
#define | ELM_GENLIST_ITEM_CLASS elm_genlist_item_class_get()
| Get genlist item class.

## Enumerations
enum | Elm_Genlist_Item_Type { ELM_GENLIST_ITEM_NONE = 0 , ELM_GENLIST_ITEM_TREE = 1 , ELM_GENLIST_ITEM_GROUP = 2 , ELM_GENLIST_ITEM_MAX = 4 }
| Defines if the item is of any special type (has subitems or it's the index of a group), or is just a simple item. More...
enum | Elm_Genlist_Item_Field_Type { ELM_GENLIST_ITEM_FIELD_ALL = 0 , ELM_GENLIST_ITEM_FIELD_TEXT = 1 , ELM_GENLIST_ITEM_FIELD_CONTENT = 2 , ELM_GENLIST_ITEM_FIELD_STATE = 4 }
| Defines the type of the item part Used while updating item's parts It can be used at updating multi fields. More...
enum | Elm_Genlist_Item_Scrollto_Type { ELM_GENLIST_ITEM_SCROLLTO_NONE = 0 , ELM_GENLIST_ITEM_SCROLLTO_IN = 1 , ELM_GENLIST_ITEM_SCROLLTO_TOP = 2 , ELM_GENLIST_ITEM_SCROLLTO_MIDDLE = 4 , ELM_GENLIST_ITEM_SCROLLTO_BOTTOM = 8 }
| Defines where to position the item in the genlist. More...

## Functions
EOAPI Elm_Widget_Item * | elm_obj_genlist_item_prev_get (const Eo *obj)
| Get the previous item in a genlist widget's internal list of items, given a handle to one of those items.
EOAPI Elm_Widget_Item * | elm_obj_genlist_item_next_get (const Eo *obj)
| Get the next item in a genlist widget's internal lis of items, given a handle to one of those items.
EOAPI Elm_Widget_Item * | elm_obj_genlist_item_parent_item_get (const Eo *obj)
| Get the parent item of the given item.
EOAPI const Eina_List * | elm_obj_genlist_item_subitems_get (const Eo *obj)
| Get the list of subitems of a given item.
EOAPI void | elm_obj_genlist_item_selected_set (Eo *obj, Eina_Bool selected)
| Set whether a given genlist item is selected or not.
EOAPI Eina_Bool | elm_obj_genlist_item_selected_get (const Eo *obj)
| Get whether a given genlist item is selected or not.
EOAPI void | elm_obj_genlist_item_expanded_set (Eo *obj, Eina_Bool expanded)
| Sets the expanded state of an item.
EOAPI Eina_Bool | elm_obj_genlist_item_expanded_get (const Eo *obj)
| Get the expanded state of an item.
EOAPI int | elm_obj_genlist_item_expanded_depth_get (const Eo *obj)
| Get the depth of expanded item.
EOAPI const Elm_Genlist_Item_Class * | elm_obj_genlist_item_class_get (const Eo *obj)
| Get the Genlist Item class for the given Genlist Item.
EOAPI int | elm_obj_genlist_item_index_get (const Eo *obj)
| Get the index of the item.
EOAPI const char * | elm_obj_genlist_item_decorate_mode_get (const Eo *obj)
| Get the item's decorate mode.
EOAPI void | elm_obj_genlist_item_flip_set (Eo *obj, Eina_Bool flip)
| Set the flip state of a given genlist item.
EOAPI Eina_Bool | elm_obj_genlist_item_flip_get (const Eo *obj)
| Get the flip state of a given genlist item.
EOAPI void | elm_obj_genlist_item_select_mode_set (Eo *obj, Elm_Object_Select_Mode mode)
| Set the genlist item's select mode.
EOAPI Elm_Object_Select_Mode | elm_obj_genlist_item_select_mode_get (const Eo *obj)
| Get the genlist item's select mode.
EOAPI Elm_Genlist_Item_Type | elm_obj_genlist_item_type_get (const Eo *obj)
| Get the Item's type.
EOAPI void | elm_obj_genlist_item_pin_set (Eo *obj, Eina_Bool pin)
| Set whether a given genlist item is pinned or not.
EOAPI Eina_Bool | elm_obj_genlist_item_pin_get (const Eo *obj)
| Get whether a given genlist item is pinned or not.
EOAPI unsigned int | elm_obj_genlist_item_subitems_count (Eo *obj)
| Get the number of subitems of a given item.
EOAPI void | elm_obj_genlist_item_subitems_clear (Eo *obj)
| Remove all sub-items (children) of the given item.
EOAPI void | elm_obj_genlist_item_promote (Eo *obj)
| Promote an item to the top of the list.
EOAPI void | elm_obj_genlist_item_demote (Eo *obj)
| Demote an item to the end of the list.
EOAPI void | elm_obj_genlist_item_show (Eo *obj, Elm_Genlist_Item_Scrollto_Type type)
| Show the portion of a genlist's internal list containing a given item, immediately.
EOAPI void | elm_obj_genlist_item_bring_in (Eo *obj, Elm_Genlist_Item_Scrollto_Type type)
| Animatedly bring in, to the visible area of a genlist, a given item on it.
EOAPI void | elm_obj_genlist_item_all_contents_unset (Eo *obj, Eina_List **l)
| Unset all contents fetched by the item class.
EOAPI void | elm_obj_genlist_item_update (Eo *obj)
| Update all the contents of an item.
EOAPI void | elm_obj_genlist_item_fields_update (Eo *obj, const char *parts, Elm_Genlist_Item_Field_Type itf)
| Update the part of an item.
EOAPI void | elm_obj_genlist_item_class_update (Eo *obj, const Elm_Genlist_Item_Class *itc)
| Update the item class of an item.
EOAPI void | elm_obj_genlist_item_decorate_mode_set (Eo *obj, const char *decorate_it_type, Eina_Bool decorate_it_set)
| Activate a genlist mode on an item.
Elm_Widget_Item * | elm_genlist_item_prev_get (const Elm_Genlist_Item *obj)
| Get the previous item in a genlist widget's internal list of items, given a handle to one of those items.
Elm_Widget_Item * | elm_genlist_item_next_get (const Elm_Genlist_Item *obj)
| Get the next item in a genlist widget's internal lis of items, given a handle to one of those items.
Elm_Widget_Item * | elm_genlist_item_parent_get (const Elm_Genlist_Item *obj)
| Get the parent item of the given item.
const Eina_List * | elm_genlist_item_subitems_get (const Elm_Genlist_Item *obj)
| Get the list of subitems of a given item.
void | elm_genlist_item_selected_set (Elm_Genlist_Item *obj, Eina_Bool selected)
| Set whether a given genlist item is selected or not.
Eina_Bool | elm_genlist_item_selected_get (const Elm_Genlist_Item *obj)
| Get whether a given genlist item is selected or not.
void | elm_genlist_item_expanded_set (Elm_Genlist_Item *obj, Eina_Bool expanded)
| Sets the expanded state of an item.
Eina_Bool | elm_genlist_item_expanded_get (const Elm_Genlist_Item *obj)
| Get the expanded state of an item.
int | elm_genlist_item_expanded_depth_get (const Elm_Genlist_Item *obj)
| Get the depth of expanded item.
const Elm_Genlist_Item_Class * | elm_genlist_item_item_class_get (const Elm_Genlist_Item *obj)
| Get the Genlist Item class for the given Genlist Item.
int | elm_genlist_item_index_get (const Elm_Genlist_Item *obj)
| Get the index of the item.
const char * | elm_genlist_item_decorate_mode_get (const Elm_Genlist_Item *obj)
| Get the item's decorate mode.
void | elm_genlist_item_flip_set (Elm_Genlist_Item *obj, Eina_Bool flip)
| Set the flip state of a given genlist item.
Eina_Bool | elm_genlist_item_flip_get (const Elm_Genlist_Item *obj)
| Get the flip state of a given genlist item.
void | elm_genlist_item_select_mode_set (Elm_Genlist_Item *obj, Elm_Object_Select_Mode mode)
| Set the genlist item's select mode.
Elm_Object_Select_Mode | elm_genlist_item_select_mode_get (const Elm_Genlist_Item *obj)
| Get the genlist item's select mode.
Elm_Genlist_Item_Type | elm_genlist_item_type_get (const Elm_Genlist_Item *obj)
| Get the Item's type.
void | elm_genlist_item_pin_set (Elm_Genlist_Item *obj, Eina_Bool pin)
| Set whether a given genlist item is pinned or not.
Eina_Bool | elm_genlist_item_pin_get (const Elm_Genlist_Item *obj)
| Get whether a given genlist item is pinned or not.
unsigned int | elm_genlist_item_subitems_count (Elm_Genlist_Item *obj)
| Get the number of subitems of a given item.
void | elm_genlist_item_subitems_clear (Elm_Genlist_Item *obj)
| Remove all sub-items (children) of the given item.
void | elm_genlist_item_promote (Elm_Genlist_Item *obj)
| Promote an item to the top of the list.
void | elm_genlist_item_demote (Elm_Genlist_Item *obj)
| Demote an item to the end of the list.
void | elm_genlist_item_show (Elm_Genlist_Item *obj, Elm_Genlist_Item_Scrollto_Type type)
| Show the portion of a genlist's internal list containing a given item, immediately.
void | elm_genlist_item_bring_in (Elm_Genlist_Item *obj, Elm_Genlist_Item_Scrollto_Type type)
| Animatedly bring in, to the visible area of a genlist, a given item on it.
void | elm_genlist_item_all_contents_unset (Elm_Genlist_Item *obj, Eina_List **l)
| Unset all contents fetched by the item class.
void | elm_genlist_item_update (Elm_Genlist_Item *obj)
| Update all the contents of an item.
void | elm_genlist_item_fields_update (Elm_Genlist_Item *obj, const char *parts, Elm_Genlist_Item_Field_Type itf)
| Update the part of an item.
void | elm_genlist_item_item_class_update (Elm_Genlist_Item *obj, const Elm_Genlist_Item_Class *itc)
| Update the item class of an item.
void | elm_genlist_item_decorate_mode_set (Elm_Genlist_Item *obj, const char *decorate_it_type, Eina_Bool decorate_it_set)
| Activate a genlist mode on an item.

## Detailed Description

Elementary genlist item class.

## Macro Definition Documentation

## ◆ ELM_GENLIST_ITEM_CLASS

#define ELM_GENLIST_ITEM_CLASS elm_genlist_item_class_get()

Get genlist item class.

## Enumeration Type Documentation

## ◆ Elm_Genlist_Item_Type

enum Elm_Genlist_Item_Type

Defines if the item is of any special type (has subitems or it's the index of a group), or is just a simple item.

Enumerator
ELM_GENLIST_ITEM_NONE | Simple item.
ELM_GENLIST_ITEM_TREE | This may be expanded and have child items.
ELM_GENLIST_ITEM_GROUP | An index item of a group of items. this item can have child items.
ELM_GENLIST_ITEM_MAX | Sentinel value to indicate last enum field during iteration.

## ◆ Elm_Genlist_Item_Field_Type

enum Elm_Genlist_Item_Field_Type

Defines the type of the item part Used while updating item's parts It can be used at updating multi fields.

Enumerator
ELM_GENLIST_ITEM_FIELD_ALL | Type all.
ELM_GENLIST_ITEM_FIELD_TEXT | Type text.
ELM_GENLIST_ITEM_FIELD_CONTENT | Type content.
ELM_GENLIST_ITEM_FIELD_STATE | Type state.

## ◆ Elm_Genlist_Item_Scrollto_Type

enum Elm_Genlist_Item_Scrollto_Type

Defines where to position the item in the genlist.

Enumerator
ELM_GENLIST_ITEM_SCROLLTO_NONE | Nothing will happen, Don't use this value.
ELM_GENLIST_ITEM_SCROLLTO_IN | To the nearest viewport.
ELM_GENLIST_ITEM_SCROLLTO_TOP | To the top of viewport.
ELM_GENLIST_ITEM_SCROLLTO_MIDDLE | To the middle of viewport.
ELM_GENLIST_ITEM_SCROLLTO_BOTTOM | To the bottom of viewport.

## Function Documentation

## ◆ elm_obj_genlist_item_prev_get()

EOAPI Elm_Widget_Item * elm_obj_genlist_item_prev_get | ( | const Eo * | obj | ) |

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

This returns the item placed before the `item`, on the container genlist.

If filter is set on genlist, this returns the filtered item placed before `item` in the list.

Note that parent / child relationship is not taken into account, the previous visual item is always returned, could it be a parent, a child or a group item.

NULL is returned if called on the first item.

Parameters

  [in] | obj | The object.

Returns
  The item before `item`, or `null` if there's none (and on errors).

Referenced by elm_genlist_item_prev_get().

## ◆ elm_obj_genlist_item_next_get()

EOAPI Elm_Widget_Item * elm_obj_genlist_item_next_get | ( | const Eo * | obj | ) |

Get the next item in a genlist widget's internal lis of items, given a handle to one of those items.

This returns the item placed after the `item`, on the container genlist.

If filter is set on genlist, this returns the filtered item placed after `item` in the list.

Note that parent / child relationship is not taken into account, the next visual item is always returned, could it be a parent, a child or a group item.

NULL is returned if called on the last item.

Parameters

  [in] | obj | The object.

Returns
  The item after `item`, or `null` if there's none (and on errors).

Referenced by elm_genlist_item_next_get().

## ◆ elm_obj_genlist_item_parent_item_get()

EOAPI Elm_Widget_Item * elm_obj_genlist_item_parent_item_get | ( | const Eo * | obj | ) |

Get the parent item of the given item.

This returns the item that was specified as parent of the item `it` on elm_genlist_item_append and insertion related functions.

Parameters

  [in] | obj | The object.

Returns
  The parent of the item or `null` if it has no parent.

Referenced by elm_genlist_item_parent_get().

## ◆ elm_obj_genlist_item_subitems_get()

EOAPI const Eina_List * elm_obj_genlist_item_subitems_get | ( | const Eo * | obj | ) |

Get the list of subitems of a given item.

This returns the list of subitems that an item possesses. It cannot be changed.

Parameters

  [in] | obj | The object.

Returns
  The list of subitems, `null` on error.

Since
  1.9

Referenced by elm_genlist_item_subitems_get().

## ◆ elm_obj_genlist_item_selected_set()

EOAPI void elm_obj_genlist_item_selected_set | ( | Eo * | obj,
|  | Eina_Bool | selected
| ) |  |

Set whether a given genlist item is selected or not.

This sets the selected state of an item. If multi selection is not enabled on the containing genlist and `selected` is `true`, any other previously selected items will get unselected in favor of this new one.

Parameters

  [in] | obj | The object.
  [in] | selected | The selected state ($true selected, `false` not selected).

Referenced by elm_genlist_item_selected_set().

## ◆ elm_obj_genlist_item_selected_get()

EOAPI Eina_Bool elm_obj_genlist_item_selected_get | ( | const Eo * | obj | ) |

Get whether a given genlist item is selected or not.

Parameters

  [in] | obj | The object.

Returns
  The selected state ($true selected, `false` not selected).

Referenced by elm_genlist_item_selected_get().

## ◆ elm_obj_genlist_item_expanded_set()

EOAPI void elm_obj_genlist_item_expanded_set | ( | Eo * | obj,
|  | Eina_Bool | expanded
| ) |  |

Sets the expanded state of an item.

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

The theme will respond to this change visually, and a signal "expanded" or "contracted" will be 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] | obj | The object.
  [in] | expanded | The expanded state ($true expanded, `false` not expanded).

Referenced by elm_genlist_item_expanded_set().

## ◆ elm_obj_genlist_item_expanded_get()

EOAPI Eina_Bool elm_obj_genlist_item_expanded_get | ( | const Eo * | obj | ) |

Get the expanded state of an item.

This gets the expanded state of an item.

Parameters

  [in] | obj | The object.

Returns
  The expanded state ($true expanded, `false` not expanded).

Referenced by elm_genlist_item_expanded_get().

## ◆ elm_obj_genlist_item_expanded_depth_get()

EOAPI int elm_obj_genlist_item_expanded_depth_get | ( | const Eo * | obj | ) |

Get the depth of expanded item.

Parameters

  [in] | obj | The object.

Returns
  The depth of expanded item.

Referenced by elm_genlist_item_expanded_depth_get().

## ◆ elm_obj_genlist_item_class_get()

EOAPI const Elm_Genlist_Item_Class * elm_obj_genlist_item_class_get | ( | const Eo * | obj | ) |

Get 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.

Parameters

  [in] | obj | The object.

Returns
  Genlist Item class for the given item.

Referenced by elm_genlist_item_item_class_get().

## ◆ elm_obj_genlist_item_index_get()

EOAPI int elm_obj_genlist_item_index_get | ( | const Eo * | obj | ) |

Get the index of the item.

It is only valid once displayed.

The index start from 1.

Parameters

  [in] | obj | The object.

Returns
  The position inside the list of item.

Referenced by elm_genlist_item_index_get().

## ◆ elm_obj_genlist_item_decorate_mode_get()

EOAPI const char * elm_obj_genlist_item_decorate_mode_get | ( | const Eo * | obj | ) |

Get the item's decorate mode.

This function just returns the name of the item's decorate mode.

Parameters

  [in] | obj | The object.

Returns
  Name of the item's decorate mode.

Referenced by elm_genlist_item_decorate_mode_get().

## ◆ elm_obj_genlist_item_flip_set()

EOAPI void elm_obj_genlist_item_flip_set | ( | Eo * | obj,
|  | Eina_Bool | flip
| ) |  |

Set the flip state of a given genlist item.

This function sets the flip state of a given genlist item. Flip mode overrides current item object. It can be used for on-the-fly item replace. Flip mode can be used with/without decorate mode.

Parameters

  [in] | obj | The object.
  [in] | flip | The flip mode.

Referenced by elm_genlist_item_flip_set().

## ◆ elm_obj_genlist_item_flip_get()

EOAPI Eina_Bool elm_obj_genlist_item_flip_get | ( | const Eo * | obj | ) |

Get the flip state of a given genlist item.

This function returns the flip state of a given genlist item. If the parameter is invalid, it returns `false`.

Parameters

  [in] | obj | The object.

Returns
  The flip mode.

Referenced by elm_genlist_item_flip_get().

## ◆ elm_obj_genlist_item_select_mode_set()

EOAPI void elm_obj_genlist_item_select_mode_set | ( | Eo * | obj,
|  | Elm_Object_Select_Mode | mode
| ) |  |

Set the genlist item's select mode.

ELM_OBJECT_SELECT_MODE_DEFAULT means that the item will only call their selection func and callback when first becoming selected. Any further clicks will do nothing, unless you set always select mode.

ELM_OBJECT_SELECT_MODE_ALWAYS means that even if selected, every click will make the selected callbacks be called.

ELM_OBJECT_SELECT_MODE_NONE will turn off the ability to select the item entirely and they will neither appear selected nor call selected callback functions.

ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be smaller than lower limit. Clickable objects should be bigger than human touch point device (your finger) for some touch or small screen devices. So it is enabled, the item can be shrink than predefined finger-size value. And the item will be updated.

Parameters

  [in] | obj | The object.
  [in] | mode | The selected mode.

Referenced by elm_genlist_item_select_mode_set().

## ◆ elm_obj_genlist_item_select_mode_get()

EOAPI Elm_Object_Select_Mode elm_obj_genlist_item_select_mode_get | ( | const Eo * | obj | ) |

Get the genlist item's select mode.

It's ELM_OBJECT_SELECT_MODE_MAX on failure.

Parameters

  [in] | obj | The object.

Returns
  The selected mode.

Referenced by elm_genlist_item_select_mode_get().

## ◆ elm_obj_genlist_item_type_get()

EOAPI Elm_Genlist_Item_Type elm_obj_genlist_item_type_get | ( | const Eo * | obj | ) |

Get the Item's type.

This function returns the item's type. Normally the item's type. If it failed, return value is ELM_GENLIST_ITEM_MAX.

Parameters

  [in] | obj | The object.

Returns
  Item type.

Referenced by elm_genlist_item_type_get().

## ◆ elm_obj_genlist_item_pin_set()

EOAPI void elm_obj_genlist_item_pin_set | ( | Eo * | obj,
|  | Eina_Bool | pin
| ) |  |

Set whether a given genlist item is pinned or not.

This sets a genlist item as pinned so that it will be always available in the viewport available for user interaction. Group items cannot be pinned. Also when a new item is pinned, the current pinned item will get unpinned. Item pinning cannot be done in reorder mode too.

Parameters

  [in] | obj | The object.
  [in] | pin | The item pin state state ($true pin item, `false` unpin item).

Referenced by elm_genlist_item_pin_set().

## ◆ elm_obj_genlist_item_pin_get()

EOAPI Eina_Bool elm_obj_genlist_item_pin_get | ( | const Eo * | obj | ) |

Get whether a given genlist item is pinned or not.

Parameters

  [in] | obj | The object.

Returns
  The item pin state state ($true pin item, `false` unpin item).

Referenced by elm_genlist_item_pin_get().

## ◆ elm_obj_genlist_item_subitems_count()

EOAPI unsigned int elm_obj_genlist_item_subitems_count | ( | Eo * | obj | ) |

Get the number of subitems of a given item.

This returns the number of subitems that an item possesses.

Parameters

  [in] | obj | The object.

Returns
  The number of subitems, 0 on error.

Since
  1.9

Referenced by elm_genlist_item_subitems_count().

## ◆ elm_obj_genlist_item_subitems_clear()

EOAPI void elm_obj_genlist_item_subitems_clear | ( | Eo * | obj | ) |

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

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

Parameters

  [in] | obj | The object.

Referenced by elm_genlist_item_subitems_clear().

## ◆ elm_obj_genlist_item_show()

EOAPI void elm_obj_genlist_item_show | ( | Eo * | obj,
|  | Elm_Genlist_Item_Scrollto_Type | type
| ) |  |

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

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

Parameters

  [in] | obj | The object.
  [in] | type | The position to bring in, the given item to. Elm_Genlist_Item_Scrollto_Type.

Referenced by elm_genlist_item_show().

## ◆ elm_obj_genlist_item_bring_in()

EOAPI void elm_obj_genlist_item_bring_in | ( | Eo * | obj,
|  | Elm_Genlist_Item_Scrollto_Type | type
| ) |  |

Animatedly bring in, to the visible area of a genlist, a given item on it.

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

Parameters

  [in] | obj | The object.
  [in] | type | The position to bring in, the given item to. Elm_Genlist_Item_Scrollto_Type.

Referenced by elm_genlist_item_bring_in().

## ◆ elm_obj_genlist_item_all_contents_unset()

EOAPI void elm_obj_genlist_item_all_contents_unset | ( | Eo * | obj,
|  | Eina_List ** | l
| ) |  |

Unset all contents fetched by the item class.

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

Parameters

  [in] | obj | The object.
  [out] | l | The contents list to return.

Referenced by elm_genlist_item_all_contents_unset().

## ◆ elm_obj_genlist_item_update()

EOAPI void elm_obj_genlist_item_update | ( | Eo * | obj | ) |

Update all the contents of an item.

This updates an item by calling all the item class functions again to get the contents, texts and states. Use this when the original item data has changed and the changes are desired to be reflected.

Use elm_genlist_realized_items_update() to update all already realized items.

Note
  This also updates internal genlist item object (edje_object as of now). So when this is called between mouse down and mouse up, mouse up event will be ignored because edje_object is deleted and created again by this API. If you want to avoid this, please use elm_genlist_item_fields_update.

Parameters

  [in] | obj | The object.

Referenced by elm_genlist_item_update().

## ◆ elm_obj_genlist_item_fields_update()

EOAPI void elm_obj_genlist_item_fields_update | ( | Eo * | obj,
|  | const char * | parts,
|  | Elm_Genlist_Item_Field_Type | itf
| ) |  |

Update the part of an item.

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

Use elm_genlist_realized_items_update to update an item's all property.

Parameters

  [in] | obj | The object.
  [in] | parts | The name of item's part.
  [in] | itf | The type of item's part type.

Referenced by elm_genlist_item_fields_update().

## ◆ elm_obj_genlist_item_class_update()

EOAPI void elm_obj_genlist_item_class_update | ( | Eo * | obj,
|  | const Elm_Genlist_Item_Class * | itc
| ) |  |

Update the item class of an item.

This sets another class of the item, changing the way that it is displayed. After changing the item class elm_obj_genlist_item_update is called on the item `it`.

Parameters

  [in] | obj | The object.
  [in] | itc | The item class for the item.

Referenced by elm_genlist_item_item_class_update().

## ◆ elm_obj_genlist_item_decorate_mode_set()

EOAPI void elm_obj_genlist_item_decorate_mode_set | ( | Eo * | obj,
|  | const char * | decorate_it_type,
|  | Eina_Bool | decorate_it_set
| ) |  |

Activate a genlist mode on an item.

A genlist mode is a different way of selecting an item. Once a mode is activated on an item, any other selected item is immediately unselected. This feature provides an easy way of implementing a new kind of animation for selecting an item, without having to entirely rewrite the item style theme. However, the elm_genlist_selected_* API can't be used to get what item is activate for a mode.

The current item style will still be used, but applying a genlist mode to an item will select it using a different kind of animation.

The current active item for a mode can be found by elm_genlist_decorated_item_get.

Only one mode can be active at any time, and for only one item. Genlist handles deactivating other items when one item is activated. A mode is defined in the genlist theme (edc), and more modes can easily be added. A mode style and the genlist item style are different things. They can be combined to provide a default style to the item, with some kind of animation for that item when the mode is activated.

When a mode is activated on an item, a new view for that item is created. The theme of this mode defines the animation that will be used to transit the item from the old view to the new view. This second (new) view will be active for that item while the mode is active on the item, and will be destroyed after the mode is totally deactivated from that item.

Parameters

  [in] | obj | The object.
  [in] | decorate_it_type | Mode name.
  [in] | decorate_it_set | Boolean to define set or unset mode.

Referenced by elm_genlist_item_decorate_mode_set().

## ◆ elm_genlist_item_prev_get()

Elm_Widget_Item * elm_genlist_item_prev_get | ( | const Elm_Genlist_Item * | obj | ) |

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

This returns the item placed before the `item`, on the container genlist.

If filter is set on genlist, this returns the filtered item placed before `item` in the list.

Note that parent / child relationship is not taken into account, the previous visual item is always returned, could it be a parent, a child or a group item.

NULL is returned if called on the first item.

Parameters

  [in] | obj | The object.

Returns
  The item before `item`, or `null` if there's none (and on errors).

References elm_obj_genlist_item_prev_get().

## ◆ elm_genlist_item_next_get()

Elm_Widget_Item * elm_genlist_item_next_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the next item in a genlist widget's internal lis of items, given a handle to one of those items.

This returns the item placed after the `item`, on the container genlist.

If filter is set on genlist, this returns the filtered item placed after `item` in the list.

Note that parent / child relationship is not taken into account, the next visual item is always returned, could it be a parent, a child or a group item.

NULL is returned if called on the last item.

Parameters

  [in] | obj | The object.

Returns
  The item after `item`, or `null` if there's none (and on errors).

References elm_obj_genlist_item_next_get().

## ◆ elm_genlist_item_parent_get()

Elm_Widget_Item * elm_genlist_item_parent_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the parent item of the given item.

This returns the item that was specified as parent of the item `it` on elm_genlist_item_append and insertion related functions.

Parameters

  [in] | obj | The object.

Returns
  The parent of the item or `null` if it has no parent.

References elm_obj_genlist_item_parent_item_get().

## ◆ elm_genlist_item_subitems_get()

const Eina_List * elm_genlist_item_subitems_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the list of subitems of a given item.

This returns the list of subitems that an item possesses. It cannot be changed.

Parameters

  [in] | obj | The object.

Returns
  The list of subitems, `null` on error.

Since
  1.9

References elm_obj_genlist_item_subitems_get().

## ◆ elm_genlist_item_selected_set()

void elm_genlist_item_selected_set | ( | Elm_Genlist_Item * | obj,
|  | Eina_Bool | selected
| ) |  |

Set whether a given genlist item is selected or not.

This sets the selected state of an item. If multi selection is not enabled on the containing genlist and `selected` is `true`, any other previously selected items will get unselected in favor of this new one.

Parameters

  [in] | obj | The object.
  [in] | selected | The selected state ($true selected, `false` not selected).

References elm_obj_genlist_item_selected_set().

## ◆ elm_genlist_item_selected_get()

Eina_Bool elm_genlist_item_selected_get | ( | const Elm_Genlist_Item * | obj | ) |

Get whether a given genlist item is selected or not.

Parameters

  [in] | obj | The object.

Returns
  The selected state ($true selected, `false` not selected).

References elm_obj_genlist_item_selected_get().

## ◆ elm_genlist_item_expanded_set()

void elm_genlist_item_expanded_set | ( | Elm_Genlist_Item * | obj,
|  | Eina_Bool | expanded
| ) |  |

Sets the expanded state of an item.

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

The theme will respond to this change visually, and a signal "expanded" or "contracted" will be 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] | obj | The object.
  [in] | expanded | The expanded state ($true expanded, `false` not expanded).

References elm_obj_genlist_item_expanded_set().

## ◆ elm_genlist_item_expanded_get()

Eina_Bool elm_genlist_item_expanded_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the expanded state of an item.

This gets the expanded state of an item.

Parameters

  [in] | obj | The object.

Returns
  The expanded state ($true expanded, `false` not expanded).

References elm_obj_genlist_item_expanded_get().

## ◆ elm_genlist_item_expanded_depth_get()

int elm_genlist_item_expanded_depth_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the depth of expanded item.

Parameters

  [in] | obj | The object.

Returns
  The depth of expanded item.

References elm_obj_genlist_item_expanded_depth_get().

## ◆ elm_genlist_item_item_class_get()

const Elm_Genlist_Item_Class * elm_genlist_item_item_class_get | ( | const Elm_Genlist_Item * | obj | ) |

Get 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.

Parameters

  [in] | obj | The object.

Returns
  Genlist Item class for the given item.

References elm_obj_genlist_item_class_get().

## ◆ elm_genlist_item_index_get()

int elm_genlist_item_index_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the index of the item.

It is only valid once displayed.

The index start from 1.

Parameters

  [in] | obj | The object.

Returns
  The position inside the list of item.

References elm_obj_genlist_item_index_get().

## ◆ elm_genlist_item_decorate_mode_get()

const char * elm_genlist_item_decorate_mode_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the item's decorate mode.

This function just returns the name of the item's decorate mode.

Parameters

  [in] | obj | The object.

Returns
  Name of the item's decorate mode.

References elm_obj_genlist_item_decorate_mode_get().

## ◆ elm_genlist_item_flip_set()

void elm_genlist_item_flip_set | ( | Elm_Genlist_Item * | obj,
|  | Eina_Bool | flip
| ) |  |

Set the flip state of a given genlist item.

This function sets the flip state of a given genlist item. Flip mode overrides current item object. It can be used for on-the-fly item replace. Flip mode can be used with/without decorate mode.

Parameters

  [in] | obj | The object.
  [in] | flip | The flip mode.

References elm_obj_genlist_item_flip_set().

## ◆ elm_genlist_item_flip_get()

Eina_Bool elm_genlist_item_flip_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the flip state of a given genlist item.

This function returns the flip state of a given genlist item. If the parameter is invalid, it returns `false`.

Parameters

  [in] | obj | The object.

Returns
  The flip mode.

References elm_obj_genlist_item_flip_get().

## ◆ elm_genlist_item_select_mode_set()

void elm_genlist_item_select_mode_set | ( | Elm_Genlist_Item * | obj,
|  | Elm_Object_Select_Mode | mode
| ) |  |

Set the genlist item's select mode.

ELM_OBJECT_SELECT_MODE_DEFAULT means that the item will only call their selection func and callback when first becoming selected. Any further clicks will do nothing, unless you set always select mode.

ELM_OBJECT_SELECT_MODE_ALWAYS means that even if selected, every click will make the selected callbacks be called.

ELM_OBJECT_SELECT_MODE_NONE will turn off the ability to select the item entirely and they will neither appear selected nor call selected callback functions.

ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be smaller than lower limit. Clickable objects should be bigger than human touch point device (your finger) for some touch or small screen devices. So it is enabled, the item can be shrink than predefined finger-size value. And the item will be updated.

Parameters

  [in] | obj | The object.
  [in] | mode | The selected mode.

References elm_obj_genlist_item_select_mode_set().

## ◆ elm_genlist_item_select_mode_get()

Elm_Object_Select_Mode elm_genlist_item_select_mode_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the genlist item's select mode.

It's ELM_OBJECT_SELECT_MODE_MAX on failure.

Parameters

  [in] | obj | The object.

Returns
  The selected mode.

References elm_obj_genlist_item_select_mode_get().

## ◆ elm_genlist_item_type_get()

Elm_Genlist_Item_Type elm_genlist_item_type_get | ( | const Elm_Genlist_Item * | obj | ) |

Get the Item's type.

This function returns the item's type. Normally the item's type. If it failed, return value is ELM_GENLIST_ITEM_MAX.

Parameters

  [in] | obj | The object.

Returns
  Item type.

References elm_obj_genlist_item_type_get().

## ◆ elm_genlist_item_pin_set()

void elm_genlist_item_pin_set | ( | Elm_Genlist_Item * | obj,
|  | Eina_Bool | pin
| ) |  |

Set whether a given genlist item is pinned or not.

This sets a genlist item as pinned so that it will be always available in the viewport available for user interaction. Group items cannot be pinned. Also when a new item is pinned, the current pinned item will get unpinned. Item pinning cannot be done in reorder mode too.

Parameters

  [in] | obj | The object.
  [in] | pin | The item pin state state ($true pin item, `false` unpin item).

References elm_obj_genlist_item_pin_set().

## ◆ elm_genlist_item_pin_get()

Eina_Bool elm_genlist_item_pin_get | ( | const Elm_Genlist_Item * | obj | ) |

Get whether a given genlist item is pinned or not.

Parameters

  [in] | obj | The object.

Returns
  The item pin state state ($true pin item, `false` unpin item).

References elm_obj_genlist_item_pin_get().

## ◆ elm_genlist_item_subitems_count()

unsigned int elm_genlist_item_subitems_count | ( | Elm_Genlist_Item * | obj | ) |

Get the number of subitems of a given item.

This returns the number of subitems that an item possesses.

Parameters

  [in] | obj | The object.

Returns
  The number of subitems, 0 on error.

Since
  1.9

References elm_obj_genlist_item_subitems_count().

## ◆ elm_genlist_item_subitems_clear()

void elm_genlist_item_subitems_clear | ( | Elm_Genlist_Item * | obj | ) |

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

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

Parameters

  [in] | obj | The object.

References elm_obj_genlist_item_subitems_clear().

## ◆ elm_genlist_item_show()

void elm_genlist_item_show | ( | Elm_Genlist_Item * | obj,
|  | Elm_Genlist_Item_Scrollto_Type | type
| ) |  |

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

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

Parameters

  [in] | obj | The object.
  [in] | type | The position to bring in, the given item to. Elm_Genlist_Item_Scrollto_Type.

References elm_obj_genlist_item_show().

## ◆ elm_genlist_item_bring_in()

void elm_genlist_item_bring_in | ( | Elm_Genlist_Item * | obj,
|  | Elm_Genlist_Item_Scrollto_Type | type
| ) |  |

Animatedly bring in, to the visible area of a genlist, a given item on it.

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

Parameters

  [in] | obj | The object.
  [in] | type | The position to bring in, the given item to. Elm_Genlist_Item_Scrollto_Type.

References elm_obj_genlist_item_bring_in().

## ◆ elm_genlist_item_all_contents_unset()

void elm_genlist_item_all_contents_unset | ( | Elm_Genlist_Item * | obj,
|  | Eina_List ** | l
| ) |  |

Unset all contents fetched by the item class.

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

Parameters

  [in] | obj | The object.
  [out] | l | The contents list to return.

References elm_obj_genlist_item_all_contents_unset().

## ◆ elm_genlist_item_update()

void elm_genlist_item_update | ( | Elm_Genlist_Item * | obj | ) |

Update all the contents of an item.

This updates an item by calling all the item class functions again to get the contents, texts and states. Use this when the original item data has changed and the changes are desired to be reflected.

Use elm_genlist_realized_items_update() to update all already realized items.

Note
  This also updates internal genlist item object (edje_object as of now). So when this is called between mouse down and mouse up, mouse up event will be ignored because edje_object is deleted and created again by this API. If you want to avoid this, please use elm_genlist_item_fields_update.

Parameters

  [in] | obj | The object.

References elm_obj_genlist_item_update().

## ◆ elm_genlist_item_fields_update()

void elm_genlist_item_fields_update | ( | Elm_Genlist_Item * | obj,
|  | const char * | parts,
|  | Elm_Genlist_Item_Field_Type | itf
| ) |  |

Update the part of an item.

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

Use elm_genlist_realized_items_update to update an item's all property.

Parameters

  [in] | obj | The object.
  [in] | parts | The name of item's part.
  [in] | itf | The type of item's part type.

References elm_obj_genlist_item_fields_update().

## ◆ elm_genlist_item_item_class_update()

void elm_genlist_item_item_class_update | ( | Elm_Genlist_Item * | obj,
|  | const Elm_Genlist_Item_Class * | itc
| ) |  |

Update the item class of an item.

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

Parameters

  [in] | obj | The object.
  [in] | itc | The item class for the item.

References elm_obj_genlist_item_class_update().

## ◆ elm_genlist_item_decorate_mode_set()

void elm_genlist_item_decorate_mode_set | ( | Elm_Genlist_Item * | obj,
|  | const char * | decorate_it_type,
|  | Eina_Bool | decorate_it_set
| ) |  |

Activate a genlist mode on an item.

A genlist mode is a different way of selecting an item. Once a mode is activated on an item, any other selected item is immediately unselected. This feature provides an easy way of implementing a new kind of animation for selecting an item, without having to entirely rewrite the item style theme. However, the elm_genlist_selected_* API can't be used to get what item is activate for a mode.

The current item style will still be used, but applying a genlist mode to an item will select it using a different kind of animation.

The current active item for a mode can be found by elm_genlist_decorated_item_get.

Only one mode can be active at any time, and for only one item. Genlist handles deactivating other items when one item is activated. A mode is defined in the genlist theme (edc), and more modes can easily be added. A mode style and the genlist item style are different things. They can be combined to provide a default style to the item, with some kind of animation for that item when the mode is activated.

When a mode is activated on an item, a new view for that item is created. The theme of this mode defines the animation that will be used to transit the item from the old view to the new view. This second (new) view will be active for that item while the mode is active on the item, and will be destroyed after the mode is totally deactivated from that item.

Parameters

  [in] | obj | The object.
  [in] | decorate_it_type | Mode name.
  [in] | decorate_it_set | Boolean to define set or unset mode.

References elm_obj_genlist_item_decorate_mode_set().