- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Enumerations | Functions
List

## Enumerations
enum | Elm_List_Mode { ELM_LIST_COMPRESS = 0, ELM_LIST_SCROLL, ELM_LIST_LIMIT, ELM_LIST_EXPAND, ELM_LIST_LAST }
| Set list's resizing behavior, transverse axis scrolling and items cropping. More...

## Functions
EINA_DEPRECATED void | elm_list_bounce_set (Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
| Set bouncing behaviour when the scrolled content reaches an edge. More...
EINA_DEPRECATED void | elm_list_bounce_get (const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
| Get the bouncing behaviour of the internal scroller. More...
EINA_DEPRECATED void | elm_list_scroller_policy_set (Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
| Set the scrollbar policy. More...
EINA_DEPRECATED void | elm_list_scroller_policy_get (const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
| Get the scrollbar policy. More...
void | elm_list_item_selected_set (Elm_Object_Item *it, Eina_Bool selected)
| Set the selected state of an item. More...
void | elm_list_item_separator_set (Elm_Object_Item *it, Eina_Bool setting)
| Set or unset item as a separator. More...
Eina_Bool | elm_list_item_separator_get (const Elm_Object_Item *it)
| Get a value whether item is a separator or not. More...
void | elm_list_item_show (Elm_Object_Item *it)
| Show `item` in the list view. More...
void | elm_list_item_bring_in (Elm_Object_Item *it)
| Bring in the given item to list view. More...
Evas_Object * | elm_list_item_object_get (const Elm_Object_Item *it)
| Get the real Evas(Edje) object created to implement the view of a given list `item`. More...
Elm_Object_Item * | elm_list_item_prev (const Elm_Object_Item *it)
| Get the item before `it` in list. More...
Elm_Object_Item * | elm_list_item_next (const Elm_Object_Item *it)
| Get the item after `it` in list. More...
Evas_Object * | elm_list_add (Evas_Object *parent)
| Add a new list widget to the given parent Elementary (container) object. More...
void | elm_list_go (Evas_Object *obj)
| Starts the list. More...
void | elm_list_multi_select_set (Evas_Object *obj, Eina_Bool multi)
| Enable or disable multiple items selection on the list object. More...
Eina_Bool | elm_list_multi_select_get (const Evas_Object *obj)
| Get a value whether multiple items selection is enabled or not. More...
void | elm_list_multi_select_mode_set (Evas_Object *obj, Elm_Object_Multi_Select_Mode mode)
| Set the list multi select mode. More...
Elm_Object_Multi_Select_Mode | elm_list_multi_select_mode_get (const Evas_Object *obj)
| Get the list multi select mode. More...
void | elm_list_mode_set (Evas_Object *obj, Elm_List_Mode mode)
| Set which mode to use for the list object. More...
Elm_List_Mode | elm_list_mode_get (const Evas_Object *obj)
| Get the mode the list is at. More...
void | elm_list_horizontal_set (Evas_Object *obj, Eina_Bool horizontal)
| Enable or disable horizontal mode on the list object. More...
Eina_Bool | elm_list_horizontal_get (const Evas_Object *obj)
| Get a value whether horizontal mode is enabled or not. More...
void | elm_list_select_mode_set (Evas_Object *obj, Elm_Object_Select_Mode mode)
| Set the list select mode. More...
Elm_Object_Select_Mode | elm_list_select_mode_get (const Evas_Object *obj)
| Get the list select mode. More...
Elm_Object_Item * | elm_list_item_append (Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
| Append a new item to the list object. More...
Elm_Object_Item * | elm_list_item_prepend (Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
| Prepend a new item to the list object. More...
Elm_Object_Item * | elm_list_item_insert_before (Evas_Object *obj, Elm_Object_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
| Insert a new item into the list object before item `before`. More...
Elm_Object_Item * | elm_list_item_insert_after (Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
| Insert a new item into the list object after item `after`. More...
Elm_Object_Item * | elm_list_item_sorted_insert (Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func)
| Insert a new item into the sorted list object. More...
void | elm_list_clear (Evas_Object *obj)
| Remove all list's items. More...
const Eina_List * | elm_list_items_get (const Evas_Object *obj)
| Get a list of all the list items. More...
Elm_Object_Item * | elm_list_selected_item_get (const Evas_Object *obj)
| Get the selected item. More...
const Eina_List * | elm_list_selected_items_get (const Evas_Object *obj)
| Return a list of the currently selected list items. More...
Elm_Object_Item * | elm_list_first_item_get (const Evas_Object *obj)
| Get the first item in the list. More...
Elm_Object_Item * | elm_list_last_item_get (const Evas_Object *obj)
| Get the last item in the list. More...
Elm_Object_Item * | elm_list_at_xy_item_get (const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret)
| Get the item that is at the x, y canvas coords. More...
void | elm_list_focus_on_selection_set (Evas_Object *obj, Eina_Bool enabled)
| Set focus upon items selection mode. More...
Eina_Bool | elm_list_focus_on_selection_get (const Evas_Object *obj)
| Get whether focus upon item's selection mode is enabled. More...
#define | elm_obj_list_go() ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_GO)
#define | elm_obj_list_multi_select_set(multi) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_SET), EO_TYPECHECK(Eina_Bool, multi)
#define | elm_obj_list_multi_select_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_list_multi_select_mode_set(mode) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Multi_Select_Mode, mode)
#define | elm_obj_list_multi_select_mode_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Multi_Select_Mode *, ret)
#define | elm_obj_list_mode_set(mode) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_List_Mode, mode)
#define | elm_obj_list_mode_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MODE_GET), EO_TYPECHECK(Elm_List_Mode *, ret)
#define | elm_obj_list_horizontal_set(horizontal) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal)
#define | elm_obj_list_horizontal_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_list_select_mode_set(mode) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Select_Mode, mode)
#define | elm_obj_list_select_mode_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Select_Mode *, ret)
#define | elm_obj_list_bounce_set(h_bounce, v_bounce) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_BOUNCE_SET), EO_TYPECHECK(Eina_Bool, h_bounce), EO_TYPECHECK(Eina_Bool, v_bounce)
#define | elm_obj_list_bounce_get(h_bounce, v_bounce) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_BOUNCE_GET), EO_TYPECHECK(Eina_Bool *, h_bounce), EO_TYPECHECK(Eina_Bool *, v_bounce)
#define | elm_obj_list_scroller_policy_set(policy_h, policy_v) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SCROLLER_POLICY_SET), EO_TYPECHECK(Elm_Scroller_Policy, policy_h), EO_TYPECHECK(Elm_Scroller_Policy, policy_v)
#define | elm_obj_list_scroller_policy_get(policy_h, policy_v) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SCROLLER_POLICY_GET), EO_TYPECHECK(Elm_Scroller_Policy *, policy_h), EO_TYPECHECK(Elm_Scroller_Policy *, policy_v)
#define | elm_obj_list_clear() ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_CLEAR)
#define | elm_obj_list_items_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)
#define | elm_obj_list_selected_item_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_list_selected_items_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECTED_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)
#define | elm_obj_list_item_append(label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_list_item_prepend(label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_list_item_insert_before(before, label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_BEFORE), EO_TYPECHECK(Elm_Object_Item *, before), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_list_item_insert_after(after, label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_AFTER), EO_TYPECHECK(Elm_Object_Item *, after), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_list_item_sorted_insert(label, icon, end, func, data, cmp_func, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_SORTED_INSERT), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Eina_Compare_Cb, cmp_func), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_list_first_item_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_list_last_item_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_list_at_xy_item_get(x, y, posret, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_AT_XY_ITEM_GET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(int *, posret), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_list_focus_on_selection_set(enabled) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_FOCUS_ON_SELECTION_SET), EO_TYPECHECK(Eina_Bool, enabled)
#define | elm_obj_list_focus_on_selection_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_FOCUS_ON_SELECTION_GET), EO_TYPECHECK(Eina_Bool *, ret)

## Detailed Description

A list widget is a container whose children are displayed vertically or horizontally, in order, and can be selected. The list can accept only one or multiple item selections. Also has many modes of items displaying.

A list is a very simple type of list widget. For more robust lists, Genlist should probably be used.

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

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 was activated.
- `"clicked,double"` - The user has double-clicked an item. The `event_info` parameter is the item that was double-clicked.
- `"selected"` - when the user selected an item
- `"unselected"` - when the user unselected an item
- `"longpressed"` - an item in the list is long-pressed
- `"edge,top"` - the list is scrolled until the top edge
- `"edge,bottom"` - the list is scrolled until the bottom edge
- `"edge,left"` - the list is scrolled until the left edge
- `"edge,right"` - the list is scrolled until the right edge
- `"highlighted"` - an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is physically highlighted. The c event_info parameter is the item that was highlighted.
- `"unhighlighted"` - an item in the list is unhighlighted. This is called when the user releases an item or keyboard selection is moved so the item is physically unhighlighted. The c event_info parameter is the item that was unhighlighted.
- `"language,changed"` - the program's language changed
- `"focused"` - When the list has received focus. (since 1.8)
- `"unfocused"` - When the list has lost focus. (since 1.8)

Available styles for it are:

- `"default"`

Default content parts of the list items that you can use are:

- `"start"` - A start position object in the list item
- `"end"` - An end position object in the list item Another parts for customized styles are not accepted.

Default text parts of the list items that you can use are:

- `"default"` - label in the list item Another parts for customized styles are not accepted.

Supported `elm_object_item` common APIs.

- elm_object_item_disabled_set
- elm_object_item_disabled_get
- elm_object_item_part_text_set
- elm_object_item_part_text_get
- elm_object_item_part_content_set
- elm_object_item_part_content_get
- elm_object_item_part_content_unset
- elm_object_item_del
- elm_object_item_signal_emit

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

Some calls on the list's API are marked as deprecated, as they just wrap the scrollable widgets counterpart functions. Use the ones we point you to, for each case of deprecation here, instead – eventually the deprecated ones will be discarded (next major release).

List of examples:

- List widget example
- List widget example
- List - Items management

## Macro Definition Documentation

#define elm_obj_list_at_xy_item_get | ( |  | x,
|  |  | y,
|  |  | posret,
|  |  | ret
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_AT_XY_ITEM_GET), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(int *, posret), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Get the item that is at the x, y canvas coords.

Parameters

  [in] | x |
  [in] | y |
  [out] | posret |
  [out] | ret |

See Also
  elm_list_at_xy_item_get

Referenced by elm_list_at_xy_item_get().

#define elm_obj_list_bounce_get | ( |  | h_bounce,
|  |  | v_bounce
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_BOUNCE_GET), EO_TYPECHECK(Eina_Bool *, h_bounce), EO_TYPECHECK(Eina_Bool *, v_bounce)

Since
  1.8

Get the bouncing behaviour of the internal scroller.

Parameters

  [out] | h_bounce |
  [out] | v_bounce |

See Also
  elm_list_bounce_get

#define elm_obj_list_bounce_set | ( |  | h_bounce,
|  |  | v_bounce
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_BOUNCE_SET), EO_TYPECHECK(Eina_Bool, h_bounce), EO_TYPECHECK(Eina_Bool, v_bounce)

Since
  1.8

Set bouncing behaviour when the scrolled content reaches an edge.

Parameters

  [in] | h_bounce |
  [in] | v_bounce |

See Also
  elm_list_bounce_set

#define elm_obj_list_clear | ( |  | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_CLEAR)

Since
  1.8

Remove all list's items.

See Also
  elm_list_clear

Referenced by elm_list_clear().

#define elm_obj_list_first_item_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Get the first item in the list

Parameters

  [out] | ret |

See Also
  elm_list_first_item_get

Referenced by elm_list_first_item_get().

#define elm_obj_list_focus_on_selection_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_FOCUS_ON_SELECTION_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether the focus will be set to a widget on an item upon it's selection.

Parameters

  [out] | ret |

See Also
  elm_obj_list_focus_on_selection_set

Referenced by elm_list_focus_on_selection_get().

#define elm_obj_list_focus_on_selection_set | ( |  | enabled | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_FOCUS_ON_SELECTION_SET), EO_TYPECHECK(Eina_Bool, enabled)

Since
  1.8

Set focus to a first from left focusable widget upon item selection.

Parameters

  [in] | enabled |

See Also
  elm_obj_list_focus_on_selection_get

Referenced by elm_list_focus_on_selection_set().

#define elm_obj_list_go | ( |  | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_GO)

Since
  1.8

Starts the list.

See Also
  elm_list_go

Referenced by elm_list_go().

#define elm_obj_list_horizontal_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get a value whether horizontal mode is enabled or not.

Parameters

  [out] | ret |

See Also
  elm_list_horizontal_get

Referenced by elm_list_horizontal_get().

#define elm_obj_list_horizontal_set | ( |  | horizontal | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal)

Since
  1.8

Enable or disable horizontal mode on the list object.

Parameters

  [in] | horizontal |

See Also
  elm_list_horizontal_set

Referenced by elm_list_horizontal_set().

#define elm_obj_list_item_append | ( |  | label,
|  |  | icon,
|  |  | end,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Append a new item to the list object.

Parameters

  [in] | label |
  [in] | icon |
  [in] | end |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_list_item_append

Referenced by elm_list_item_append().

#define elm_obj_list_item_insert_after | ( |  | after,
|  |  | label,
|  |  | icon,
|  |  | end,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_AFTER), EO_TYPECHECK(Elm_Object_Item *, after), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Insert a new item into the list object after item after.

Parameters

  [in] | after |
  [in] | label |
  [in] | icon |
  [in] | end |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_list_item_insert_after

Referenced by elm_list_item_insert_after().

#define elm_obj_list_item_insert_before | ( |  | before,
|  |  | label,
|  |  | icon,
|  |  | end,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_BEFORE), EO_TYPECHECK(Elm_Object_Item *, before), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Insert a new item into the list object before item before.

Parameters

  [in] | before |
  [in] | label |
  [in] | icon |
  [in] | end |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_list_item_insert_before

Referenced by elm_list_item_insert_before().

#define elm_obj_list_item_prepend | ( |  | label,
|  |  | icon,
|  |  | end,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Prepend a new item to the list object.

Parameters

  [in] | label |
  [in] | icon |
  [in] | end |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_list_item_prepend

Referenced by elm_list_item_prepend().

#define elm_obj_list_item_sorted_insert | ( |  | label,
|  |  | icon,
|  |  | end,
|  |  | func,
|  |  | data,
|  |  | cmp_func,
|  |  | ret
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_SORTED_INSERT), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Eina_Compare_Cb, cmp_func), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Insert a new item into the sorted list object.

Parameters

  [in] | label |
  [in] | icon |
  [in] | end |
  [in] | func |
  [in] | data |
  [in] | cmp_func |
  [out] | ret |

See Also
  elm_list_item_sorted_insert

Referenced by elm_list_item_sorted_insert().

#define elm_obj_list_items_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)

Since
  1.8

Get a list of all the list items.

Parameters

  [out] | ret |

See Also
  elm_list_items_get

Referenced by elm_list_items_get().

#define elm_obj_list_last_item_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Get the last item in the list

Parameters

  [out] | ret |

See Also
  elm_list_last_item_get

Referenced by elm_list_last_item_get().

#define elm_obj_list_mode_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MODE_GET), EO_TYPECHECK(Elm_List_Mode *, ret)

Since
  1.8

Get the mode the list is at.

Parameters

  [out] | ret |

See Also
  elm_list_mode_get

Referenced by elm_list_mode_get().

#define elm_obj_list_mode_set | ( |  | mode | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_List_Mode, mode)

Since
  1.8

Set which mode to use for the list object.

Parameters

  [in] | mode |

See Also
  elm_list_mode_set

Referenced by elm_list_mode_set().

#define elm_obj_list_multi_select_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get a value whether multiple items selection is enabled or not.

Parameters

  [out] | ret |

See Also
  elm_list_multi_select_get

Referenced by elm_list_multi_select_get().

#define elm_obj_list_multi_select_mode_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Multi_Select_Mode *, ret)

Since
  1.8

Get the list multi select mode.

Parameters

  [out] | ret | (If getting mode is failed, it returns ELM_OBJECT_MULTI_SELECT_MODE_MAX)

See Also
  elm_list_multi_select_set()
  elm_list_multi_select_mode_set()

Referenced by elm_list_multi_select_mode_get().

#define elm_obj_list_multi_select_mode_set | ( |  | mode | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Multi_Select_Mode, mode)

Since
  1.8

Set the list multi select mode.

Parameters

  [in] | mode | ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever each item is clicked. ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only one item will be selected although multi-selection is enabled, if clicked without pressing control key. This mode is only available with multi-selection.

See Also
  elm_list_multi_select_set()
  elm_list_multi_select_mode_get()

Referenced by elm_list_multi_select_mode_set().

#define elm_obj_list_multi_select_set | ( |  | multi | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_SET), EO_TYPECHECK(Eina_Bool, multi)

Since
  1.8

Enable or disable multiple items selection on the list object.

Parameters

  [in] | multi |

See Also
  elm_list_multi_select_set

Referenced by elm_list_multi_select_set().

#define elm_obj_list_scroller_policy_get | ( |  | policy_h,
|  |  | policy_v
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SCROLLER_POLICY_GET), EO_TYPECHECK(Elm_Scroller_Policy *, policy_h), EO_TYPECHECK(Elm_Scroller_Policy *, policy_v)

Since
  1.8

Get the scrollbar policy.

Parameters

  [out] | policy_h |
  [out] | policy_v |

See Also
  elm_list_scroller_policy_get

#define elm_obj_list_scroller_policy_set | ( |  | policy_h,
|  |  | policy_v
| ) |  | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SCROLLER_POLICY_SET), EO_TYPECHECK(Elm_Scroller_Policy, policy_h), EO_TYPECHECK(Elm_Scroller_Policy, policy_v)

Since
  1.8

Set the scrollbar policy.

Parameters

  [in] | policy_h |
  [in] | policy_v |

See Also
  elm_list_scroller_policy_set

#define elm_obj_list_select_mode_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Select_Mode *, ret)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [out] | ret |

See Also
  elm_list_select_mode_get

Referenced by elm_list_select_mode_get().

#define elm_obj_list_select_mode_set | ( |  | mode | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Select_Mode, mode)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [in] | mode |

See Also
  elm_list_select_mode_set

Referenced by elm_list_select_mode_set().

#define elm_obj_list_selected_item_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Get the selected item.

Parameters

  [out] | ret |

See Also
  elm_list_selected_item_get

Referenced by elm_list_selected_item_get().

#define elm_obj_list_selected_items_get | ( |  | ret | ) | ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECTED_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)

Since
  1.8

Return a list of the currently selected list items.

Parameters

  [out] | ret |

See Also
  elm_list_selected_items_get

Referenced by elm_list_selected_items_get().

## Enumeration Type Documentation

enum Elm_List_Mode

Set list's resizing behavior, transverse axis scrolling and items cropping.

See each mode's description for more details.

Note
  Default value is ELM_LIST_SCROLL.

Values here don't work as bitmasks – only one can be chosen at a time.

See Also
  elm_list_mode_set()
  elm_list_mode_get()

Enumerator
ELM_LIST_COMPRESS | The list won't set any of its size hints to inform how a possible container should resize it. Then, if it's not created as a "resize object", it might end with zeroed dimensions. The list will respect the container's geometry and, if any of its items won't fit into its transverse axis, one won't be able to scroll it in that direction.
ELM_LIST_SCROLL | Default value. This is the same as ELM_LIST_COMPRESS, with the exception that if any of its items won't fit into its transverse axis, one will be able to scroll it in that direction.
ELM_LIST_LIMIT | Sets a minimum size hint on the list object, so that containers may respect it (and resize itself to fit the child properly). More specifically, a minimum size hint will be set for its transverse axis, so that the largest item in that direction fits well. This is naturally bound by the list object's maximum size hints, set externally.
ELM_LIST_EXPAND | Besides setting a minimum size on the transverse axis, just like on ELM_LIST_LIMIT, the list will set a minimum size on the longitudinal axis, trying to reserve space to all its children to be visible at a time. . This is naturally bound by the list object's maximum size hints, set externally.
ELM_LIST_LAST | Indicates error if returned by elm_list_mode_get()

## Function Documentation

Evas_Object* elm_list_add | ( | Evas_Object * | parent | ) |

Add a new list widget to the given parent Elementary (container) object.

Parameters

  parent | The parent object.

Returns
  a new list widget handle or `NULL`, on errors.

This function inserts a new list widget on the canvas.

Elm_Object_Item* elm_list_at_xy_item_get | ( | const Evas_Object * | obj,
|  | Evas_Coord | x,
|  | Evas_Coord | y,
|  | int * | posret
| ) |  |

Get the item that is at the x, y canvas coords.

Parameters

  obj | The list object.
  x | The input x coordinate
  y | The input y coordinate
  posret | The position relative to the item returned here

Returns
  The item at the coordinates or NULL if none

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 pointed to is set to a value of -1, 0 or 1, depending if the coordinate is on the upper portion of that item (-1), on 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 based if the coordinate is above or below all items respectively in the list.

References elm_obj_list_at_xy_item_get.

EINA_DEPRECATED void elm_list_bounce_get | ( | const Evas_Object * | obj,
|  | Eina_Bool * | h_bounce,
|  | Eina_Bool * | v_bounce
| ) |  |

Get the bouncing behaviour of the internal scroller.

Get whether the internal scroller should bounce when the edge of each axis is reached scrolling.

Parameters

  obj | The list object.
  h_bounce | Pointer to store the bounce state of the horizontal axis.
  v_bounce | Pointer to store the bounce state of the vertical axis.

Deprecated:
  Use elm_scroller_bounce_get() instead.

See Also
  elm_scroller_bounce_get()
  elm_list_bounce_set()

References elm_scrollable_interface_bounce_allow_get.

EINA_DEPRECATED void elm_list_bounce_set | ( | Evas_Object * | obj,
|  | Eina_Bool | h_bounce,
|  | Eina_Bool | v_bounce
| ) |  |

Set bouncing behaviour when the scrolled content reaches an edge.

Tell the internal scroller object whether it should bounce or not when it reaches the respective edges for each axis.

Parameters

  obj | The list object
  h_bounce | Whether to bounce or not in the horizontal axis.
  v_bounce | Whether to bounce or not in the vertical axis.

Deprecated:
  Use elm_scroller_bounce_set() instead.

See Also
  elm_scroller_bounce_set()

References elm_scrollable_interface_bounce_allow_set.

void elm_list_clear | ( | Evas_Object * | obj | ) |

Remove all list's items.

Parameters

  obj | The list object

See Also
  elm_object_item_del()
  elm_list_item_append()

References elm_obj_list_clear.

Elm_Object_Item* elm_list_first_item_get | ( | const Evas_Object * | obj | ) |

Get the first item in the list.

This returns the first item in the list.

Parameters

  obj | The list object

Returns
  The first item, or NULL if none

References elm_obj_list_first_item_get.

Eina_Bool elm_list_focus_on_selection_get | ( | const Evas_Object * | obj | ) |

Get whether focus upon item's selection mode is enabled.

Parameters

  obj | The genlist object

Returns
  The tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)

References elm_obj_list_focus_on_selection_get.

void elm_list_focus_on_selection_set | ( | Evas_Object * | obj,
|  | Eina_Bool | enabled
| ) |  |

Set focus upon items selection mode.

Parameters

  obj | The genlist object
  enabled | The tree effect status (EINA_TRUE = enabled, EINA_FALSE = disabled)

When enabled, every selection of an item inside the genlist will automatically set focus to its first focusable widget from the left. This is true of course if the selection was made by clicking an unfocusable area in an item or selecting it with a key movement. Clicking on a focusable widget inside an item will couse this particular item to get focus as usual.

References elm_obj_list_focus_on_selection_set.

void elm_list_go | ( | Evas_Object * | obj | ) |

Starts the list.

Parameters

  obj | The list object

Note
  Call before running show() on the list object.

Warning
  If not called, it won't display the list properly.

li = elm_list_add(win);
elm_list_item_append(li, "First", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL);
elm_list_go(li);
evas_object_show(li);

References elm_obj_list_go.

Eina_Bool elm_list_horizontal_get | ( | const Evas_Object * | obj | ) |

Get a value whether horizontal mode is enabled or not.

Parameters

  obj | The list object.

Returns
  `EINA_TRUE` means horizontal mode selection is enabled. `EINA_FALSE` indicates it's disabled. If `obj` is `NULL`, `EINA_FALSE` is returned.

See Also
  elm_list_horizontal_set() for details.

References elm_obj_list_horizontal_get.

void elm_list_horizontal_set | ( | Evas_Object * | obj,
|  | Eina_Bool | horizontal
| ) |  |

Enable or disable horizontal mode on the list object.

Parameters

  obj | The list object.
  horizontal | `EINA_TRUE` to enable horizontal or `EINA_FALSE` to disable it, i.e., to enable vertical mode.

Note
  Vertical mode is set by default.

On horizontal mode items are displayed on list from left to right, instead of from top to bottom. Also, the list will scroll horizontally. Each item will presents left icon on top and right icon, or end, at the bottom.

See Also
  elm_list_horizontal_get()

References elm_obj_list_horizontal_set.

Elm_Object_Item* elm_list_item_append | ( | Evas_Object * | obj,
|  | const char * | label,
|  | Evas_Object * | icon,
|  | Evas_Object * | end,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Append a new item to the list object.

Parameters

  obj | The list object.
  label | The label of the list item.
  icon | The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
  end | The icon object to use for the right side of the item. An icon can be any Evas object.
  func | The function to call when the item is clicked.
  data | The data to associate with the item for related callbacks.

Returns
  The created item or `NULL` upon failure.

A new item will be created and appended to the list, i.e., will be set as last item.

Items created with this method can be deleted with elm_object_item_del().

Associated `data` can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing `NULL` as `func` is enough. The same should be done for `data`.

Note
  Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.

Simple example (with no function callback or data associated):

li = elm_list_add(win);
ic = elm_icon_add(win);
elm_image_file_set(ic, "path/to/image", NULL);
elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
elm_list_item_append(li, "label", ic, NULL, NULL, NULL);
elm_list_go(li);
evas_object_show(li);

See Also
  elm_list_select_mode_set()
  elm_object_item_del()
  elm_object_item_del_cb_set()
  elm_list_clear()
  elm_icon_add()

References elm_obj_list_item_append.

void elm_list_item_bring_in | ( | Elm_Object_Item * | it | ) |

Bring in the given item to list view.

Parameters

  it | The item.

This causes list to jump to the given item `item` and show it (by scrolling), if it is not fully visible.

This may use animation to do so and take a period of time.

If animation isn't wanted, elm_list_item_show() can be used.

References elm_scrollable_interface_region_bring_in.

Elm_Object_Item* elm_list_item_insert_after | ( | Evas_Object * | obj,
|  | Elm_Object_Item * | after,
|  | const char * | label,
|  | Evas_Object * | icon,
|  | Evas_Object * | end,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Insert a new item into the list object after item `after`.

Parameters

  obj | The list object.
  after | The list item to insert after.
  label | The label of the list item.
  icon | The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
  end | The icon object to use for the right side of the item. An icon can be any Evas object.
  func | The function to call when the item is clicked.
  data | The data to associate with the item for related callbacks.

Returns
  The created item or `NULL` upon failure.

A new item will be created and added to the list. Its position in this list will be just after item `after`.

Items created with this method can be deleted with elm_object_item_del().

Associated `data` can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing `NULL` as `func` is enough. The same should be done for `data`.

Note
  Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.

See Also
  elm_list_item_append() for a simple code example.
  elm_list_select_mode_set()
  elm_object_item_del()
  elm_object_item_del_cb_set()
  elm_list_clear()
  elm_icon_add()

References elm_obj_list_item_insert_after.

Elm_Object_Item* elm_list_item_insert_before | ( | Evas_Object * | obj,
|  | Elm_Object_Item * | before,
|  | const char * | label,
|  | Evas_Object * | icon,
|  | Evas_Object * | end,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Insert a new item into the list object before item `before`.

Parameters

  obj | The list object.
  before | The list item to insert before.
  label | The label of the list item.
  icon | The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
  end | The icon object to use for the right side of the item. An icon can be any Evas object.
  func | The function to call when the item is clicked.
  data | The data to associate with the item for related callbacks.

Returns
  The created item or `NULL` upon failure.

A new item will be created and added to the list. Its position in this list will be just before item `before`.

Items created with this method can be deleted with elm_object_item_del().

Associated `data` can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing `NULL` as `func` is enough. The same should be done for `data`.

Note
  Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.

See Also
  elm_list_item_append() for a simple code example.
  elm_list_select_mode_set()
  elm_object_item_del()
  elm_object_item_del_cb_set()
  elm_list_clear()
  elm_icon_add()

References elm_obj_list_item_insert_before.

Elm_Object_Item* elm_list_item_next | ( | const Elm_Object_Item * | it | ) |

Get the item after `it` in list.

Parameters

  it | The list item.

Returns
  The item after `it`, or `NULL` if none or on failure.

Note
  If it is the last item, `NULL` will be returned.

See Also
  elm_list_item_append()
  elm_list_items_get()

Evas_Object* elm_list_item_object_get | ( | const Elm_Object_Item * | it | ) |

Get the real Evas(Edje) object created to implement the view of a given list `item`.

Parameters

  it | The list item

Returns
  The base Edje object associated with `it`.

Base object is the `Evas_Object` that represents that item.

Elm_Object_Item* elm_list_item_prepend | ( | Evas_Object * | obj,
|  | const char * | label,
|  | Evas_Object * | icon,
|  | Evas_Object * | end,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Prepend a new item to the list object.

Parameters

  obj | The list object.
  label | The label of the list item.
  icon | The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
  end | The icon object to use for the right side of the item. An icon can be any Evas object.
  func | The function to call when the item is clicked.
  data | The data to associate with the item for related callbacks.

Returns
  The created item or `NULL` upon failure.

A new item will be created and prepended to the list, i.e., will be set as first item.

Items created with this method can be deleted with elm_object_item_del().

Associated `data` can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing `NULL` as `func` is enough. The same should be done for `data`.

Note
  Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.

See Also
  elm_list_item_append() for a simple code example.
  elm_list_select_mode_set()
  elm_object_item_del()
  elm_object_item_del_cb_set()
  elm_list_clear()
  elm_icon_add()

References elm_obj_list_item_prepend.

Elm_Object_Item* elm_list_item_prev | ( | const Elm_Object_Item * | it | ) |

Get the item before `it` in list.

Parameters

  it | The list item.

Returns
  The item before `it`, or `NULL` if none or on failure.

Note
  If it is the first item, `NULL` will be returned.

See Also
  elm_list_item_append()
  elm_list_items_get()

void elm_list_item_selected_set | ( | Elm_Object_Item * | it,
|  | Eina_Bool | selected
| ) |  |

Set the selected state of an item.

Parameters

  it | The list item
  selected | The selected state

This sets the selected state of the given item `it`. `EINA_TRUE` for selected, `EINA_FALSE` for not selected.

If a new item is selected the previously selected will be unselected, unless multiple selection is enabled with elm_list_multi_select_set(). Previously selected item can be get with function elm_list_selected_item_get().

Selected items will be highlighted.

See Also
  elm_list_item_selected_get()
  elm_list_selected_item_get()
  elm_list_multi_select_set()

Eina_Bool elm_list_item_separator_get | ( | const Elm_Object_Item * | it | ) |

Get a value whether item is a separator or not.

See Also
  elm_list_item_separator_set() for details.

Parameters

  it | The list item.

Returns
  `EINA_TRUE` means item `it` is a separator. `EINA_FALSE` indicates it's not. If `it` is `NULL`, `EINA_FALSE` is returned.

void elm_list_item_separator_set | ( | Elm_Object_Item * | it,
|  | Eina_Bool | setting
| ) |  |

Set or unset item as a separator.

Parameters

  it | The list item.
  setting | `EINA_TRUE` to set item `it` as separator or `EINA_FALSE` to unset, i.e., item will be used as a regular item.

Items aren't set as separator by default.

If set as separator it will display separator theme, so won't display icons or label.

See Also
  elm_list_item_separator_get()

void elm_list_item_show | ( | Elm_Object_Item * | it | ) |

Show `item` in the list view.

Parameters

  it | The list item to be shown.

It won't animate list until item is visible. If such behavior is wanted, use elm_list_bring_in() instead.

References elm_scrollable_interface_content_region_show.

Elm_Object_Item* elm_list_item_sorted_insert | ( | Evas_Object * | obj,
|  | const char * | label,
|  | Evas_Object * | icon,
|  | Evas_Object * | end,
|  | Evas_Smart_Cb | func,
|  | const void * | data,
|  | Eina_Compare_Cb | cmp_func
| ) |  |

Insert a new item into the sorted list object.

Parameters

  obj | The list object.
  label | The label of the list item.
  icon | The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().
  end | The icon object to use for the right side of the item. An icon can be any Evas object.
  func | The function to call when the item is clicked.
  data | The data to associate with the item for related callbacks.
  cmp_func | The comparing function to be used to sort list items by Elm_Object_Item item handles. This function will receive two items and compare them, returning a non-negative integer if the second item should be place after the first, or negative value if should be placed before.

Returns
  The created item or `NULL` upon failure.

Note
  This function inserts values into a list object assuming it was sorted and the result will be sorted.

A new item will be created and added to the list. Its position in this list will be found comparing the new item with previously inserted items using function `cmp_func`.

Items created with this method can be deleted with elm_object_item_del().

Associated `data` can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If always select is enabled it will call this function every time user clicks over an item (already selected or not). If such function isn't needed, just passing `NULL` as `func` is enough. The same should be done for `data`.

Note
  Remember that the label parameter is copied inside the list. So if an application dynamically allocated the label, the application should free the label after this call.

See Also
  elm_list_item_append() for a simple code example.
  elm_list_select_mode_set()
  elm_object_item_del()
  elm_object_item_del_cb_set()
  elm_list_clear()
  elm_icon_add()

References elm_obj_list_item_sorted_insert.

const Eina_List* elm_list_items_get | ( | const Evas_Object * | obj | ) |

Get a list of all the list items.

Parameters

  obj | The list object

Returns
  An `Eina_List` of list items, Elm_Object_Item, or `NULL` on failure.

See Also
  elm_list_item_append()
  elm_object_item_del()
  elm_list_clear()

References elm_obj_list_items_get.

Elm_Object_Item* elm_list_last_item_get | ( | const Evas_Object * | obj | ) |

Get the last item in the list.

This returns the last item in the list.

Returns
  The last item, or NULL if none

References elm_obj_list_last_item_get.

Elm_List_Mode elm_list_mode_get | ( | const Evas_Object * | obj | ) |

Get the mode the list is at.

Parameters

  obj | The list object

Returns
  One of Elm_List_Mode: ELM_LIST_COMPRESS, ELM_LIST_SCROLL, ELM_LIST_LIMIT, ELM_LIST_EXPAND or ELM_LIST_LAST on errors.

Note
  see elm_list_mode_set() for more information.

References ELM_LIST_LAST, and elm_obj_list_mode_get.

void elm_list_mode_set | ( | Evas_Object * | obj,
|  | Elm_List_Mode | mode
| ) |  |

Set which mode to use for the list object.

Parameters

  obj | The list object
  mode | One of Elm_List_Mode: ELM_LIST_COMPRESS, ELM_LIST_SCROLL, ELM_LIST_LIMIT or ELM_LIST_EXPAND.

Set list's resize behavior, transverse axis scroll and items cropping. See each mode's description for more details.

Note
  Default value is ELM_LIST_SCROLL.

Only one mode at a time can be set. If a previous one was set, it will be changed by the new mode after this call. Bitmasks won't work here as well.

Warning
  This function's behavior will clash with those of elm_scroller_content_min_limit(), so use either one of them, but not both.

See Also
  elm_list_mode_get()

References elm_obj_list_mode_set.

Eina_Bool elm_list_multi_select_get | ( | const Evas_Object * | obj | ) |

Get a value whether multiple items selection is enabled or not.

See Also
  elm_list_multi_select_set() for details.

Parameters

  obj | The list object.

Returns
  `EINA_TRUE` means multiple items selection is enabled. `EINA_FALSE` indicates it's disabled. If `obj` is `NULL`, `EINA_FALSE` is returned.

References elm_obj_list_multi_select_get.

Elm_Object_Multi_Select_Mode elm_list_multi_select_mode_get | ( | const Evas_Object * | obj | ) |

Get the list multi select mode.

Parameters

  obj | The list object

Returns
  The multi select mode (If getting mode is failed, it returns ELM_OBJECT_MULTI_SELECT_MODE_MAX)

See Also
  elm_list_multi_select_set()
  elm_list_multi_select_mode_set()

Since
  1.8

References elm_obj_list_multi_select_mode_get.

void elm_list_multi_select_mode_set | ( | Evas_Object * | obj,
|  | Elm_Object_Multi_Select_Mode | mode
| ) |  |

Set the list multi select mode.

Parameters

  obj | The list object
  mode | The multi select mode

- ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever each item is clicked.
- ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only one item will be selected although multi-selection is enabled, if clicked without pressing control key. This mode is only available with multi-selection.

See Also
  elm_list_multi_select_set()
  elm_list_multi_select_mode_get()

Since
  1.8

References elm_obj_list_multi_select_mode_set.

void elm_list_multi_select_set | ( | Evas_Object * | obj,
|  | Eina_Bool | multi
| ) |  |

Enable or disable multiple items selection on the list object.

Parameters

  obj | The list object
  multi | `EINA_TRUE` to enable multi selection or `EINA_FALSE` to disable it.

Disabled by default. If disabled, the user can select a single item of the list each time. Selected items are highlighted on list. If enabled, many items can be selected.

If a selected item is selected again, it will be unselected.

See Also
  elm_list_multi_select_get()

References elm_obj_list_multi_select_set.

EINA_DEPRECATED void elm_list_scroller_policy_get | ( | const Evas_Object * | obj,
|  | Elm_Scroller_Policy * | policy_h,
|  | Elm_Scroller_Policy * | policy_v
| ) |  |

Get the scrollbar policy.

See Also
  elm_list_scroller_policy_get() for details.

Parameters

  obj | The list object.
  policy_h | Pointer to store horizontal scrollbar policy.
  policy_v | Pointer to store vertical scrollbar policy.

Deprecated:
  Use elm_scroller_policy_get() instead.

References elm_scrollable_interface_policy_get.

EINA_DEPRECATED void elm_list_scroller_policy_set | ( | Evas_Object * | obj,
|  | Elm_Scroller_Policy | policy_h,
|  | Elm_Scroller_Policy | policy_v
| ) |  |

Set the scrollbar policy.

Parameters

  obj | The list object
  policy_h | Horizontal scrollbar policy.
  policy_v | Vertical scrollbar policy.

This sets the scrollbar visibility policy for the given scroller. #ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it is needed, and otherwise kept hidden. #ELM_SCROLLER_POLICY_ON turns it on all the time, and #ELM_SCROLLER_POLICY_OFF always keeps it off. This applies respectively for the horizontal and vertical scrollbars.

The both are disabled by default, i.e., are set to #ELM_SCROLLER_POLICY_OFF.

Deprecated:
  Use elm_scroller_policy_set() instead.

References elm_scrollable_interface_policy_set.

Elm_Object_Select_Mode elm_list_select_mode_get | ( | const Evas_Object * | obj | ) |

Get the list select mode.

Parameters

  obj | The list object

Returns
  The select mode (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)

See Also
  elm_list_select_mode_set()

References elm_obj_list_select_mode_get.

void elm_list_select_mode_set | ( | Evas_Object * | obj,
|  | Elm_Object_Select_Mode | mode
| ) |  |

Set the list select mode.

Parameters

  obj | The list object
  mode | The select mode

elm_list_select_mode_set() changes item select mode in the list widget.

- ELM_OBJECT_SELECT_MODE_DEFAULT : Items 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 : This means that, even if selected, every click will make the selected callbacks be called.
- ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items entirely and they will neither appear selected nor call selected callback functions.

See Also
  elm_list_select_mode_get()

References elm_obj_list_select_mode_set.

Elm_Object_Item* elm_list_selected_item_get | ( | const Evas_Object * | obj | ) |

Get the selected item.

Parameters

  obj | The list object.

Returns
  The selected list item.

The selected item can be unselected with function elm_list_item_selected_set().

The selected item always will be highlighted on list.

See Also
  elm_list_selected_items_get()

References elm_obj_list_selected_item_get.

const Eina_List* elm_list_selected_items_get | ( | const Evas_Object * | obj | ) |

Return a list of the currently selected list items.

Parameters

  obj | The list object.

Returns
  An `Eina_List` of list items, Elm_Object_Item, or `NULL` on failure.

Multiple items can be selected if multi select is enabled. It can be done with elm_list_multi_select_set().

See Also
  elm_list_selected_item_get()
  elm_list_multi_select_set()

References elm_obj_list_selected_items_get.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:14