5 * @image html img/widget/list/preview-00.png
6 * @image latex img/widget/list/preview-00.eps width=\textwidth
8 * @image html img/list.png
9 * @image latex img/list.eps width=\textwidth
11 * A list widget is a container whose children are displayed vertically or
12 * horizontally, in order, and can be selected.
13 * The list can accept only one or multiple items selection. Also has many
14 * modes of items displaying.
16 * A list is a very simple type of list widget. For more robust
17 * lists, @ref Genlist should probably be used.
19 * Smart callbacks one can listen to:
20 * - @c "activated" - The user has double-clicked or pressed
21 * (enter|return|spacebar) on an item. The @c event_info parameter
22 * is the item that was activated.
23 * - @c "clicked,double" - The user has double-clicked an item.
24 * The @c event_info parameter is the item that was double-clicked.
25 * - "selected" - when the user selected an item
26 * - "unselected" - when the user unselected an item
27 * - "longpressed" - an item in the list is long-pressed
28 * - "edge,top" - the list is scrolled until the top edge
29 * - "edge,bottom" - the list is scrolled until the bottom edge
30 * - "edge,left" - the list is scrolled until the left edge
31 * - "edge,right" - the list is scrolled until the right edge
32 * - "language,changed" - the program's language changed
34 * Available styles for it:
38 * @li @ref list_example_01
39 * @li @ref list_example_02
40 * @li @ref list_example_03
49 * @enum _Elm_List_Mode
50 * @typedef Elm_List_Mode
52 * Set list's resize behavior, transverse axis scroll and
53 * items cropping. See each mode's description for more details.
55 * @note Default value is #ELM_LIST_SCROLL.
57 * Values <b> don't </b> work as bitmask, only one can be choosen.
59 * @see elm_list_mode_set()
60 * @see elm_list_mode_get()
66 ELM_LIST_COMPRESS = 0, /**< 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 zero 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. */
67 ELM_LIST_SCROLL, /**< Default value. 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 zero dimensions. The list will respect the container's geometry and, if any of its items won't fit into its transverse axis, one will be able to scroll it in that direction (large items will get cropped). */
68 ELM_LIST_LIMIT, /**< Set a minimun 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 @b largest item in that direction fits well. Can have effects bounded by setting the list object's maximum size hints. */
69 ELM_LIST_EXPAND, /**< Besides setting a minimum size on the transverse axis, just like the previous mode, will set a minimum size on the longitudinal axis too, trying to reserve space to all its children to be visible at a time. Can have effects bounded by setting the list object's maximum size hints. */
70 ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get() */
73 typedef struct _Elm_List_Item Elm_List_Item; /**< Item of Elm_List. Sub-type of Elm_Widget_Item. Can be created with elm_list_item_append(), elm_list_item_prepend() and functions to add items in relative positions, like elm_list_item_insert_before(), and deleted with elm_list_item_del(). */
76 * Add a new list widget to the given parent Elementary
79 * @param parent The parent object.
80 * @return a new list widget handle or @c NULL, on errors.
82 * This function inserts a new list widget on the canvas.
86 EAPI Evas_Object *elm_list_add(Evas_Object *parent);
91 * @param obj The list object
93 * @note Call before running show() on the list object.
94 * @warning If not called, it won't display the list properly.
97 * li = elm_list_add(win);
98 * elm_list_item_append(li, "First", NULL, NULL, NULL, NULL);
99 * elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL);
101 * evas_object_show(li);
106 EAPI void elm_list_go(Evas_Object *obj);
109 * Enable or disable multiple items selection on the list object.
111 * @param obj The list object
112 * @param multi @c EINA_TRUE to enable multi selection or @c EINA_FALSE to
115 * Disabled by default. If disabled, the user can select a single item of
116 * the list each time. Selected items are highlighted on list.
117 * If enabled, many items can be selected.
119 * If a selected item is selected again, it will be unselected.
121 * @see elm_list_multi_select_get()
125 EAPI void elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi);
128 * Get a value whether multiple items selection is enabled or not.
130 * @see elm_list_multi_select_set() for details.
132 * @param obj The list object.
133 * @return @c EINA_TRUE means multiple items selection is enabled.
134 * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL,
135 * @c EINA_FALSE is returned.
139 EAPI Eina_Bool elm_list_multi_select_get(const Evas_Object *obj);
142 * Set which mode to use for the list object.
144 * @param obj The list object
145 * @param mode One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL,
146 * #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.
148 * Set list's resize behavior, transverse axis scroll and
149 * items cropping. See each mode's description for more details.
151 * @note Default value is #ELM_LIST_SCROLL.
153 * Only one can be set, if a previous one was set, it will be changed
154 * by the new mode set. Bitmask won't work as well.
156 * @see elm_list_mode_get()
160 EAPI void elm_list_mode_set(Evas_Object *obj, Elm_List_Mode mode);
163 * Get the mode the list is at.
165 * @param obj The list object
166 * @return One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL,
167 * #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors.
169 * @note see elm_list_mode_set() for more information.
173 EAPI Elm_List_Mode elm_list_mode_get(const Evas_Object *obj);
176 * Enable or disable horizontal mode on the list object.
178 * @param obj The list object.
179 * @param horizontal @c EINA_TRUE to enable horizontal or @c EINA_FALSE to
180 * disable it, i.e., to enable vertical mode.
182 * @note Vertical mode is set by default.
184 * On horizontal mode items are displayed on list from left to right,
185 * instead of from top to bottom. Also, the list will scroll horizontally.
186 * Each item will presents left icon on top and right icon, or end, at
189 * @see elm_list_horizontal_get()
193 EAPI void elm_list_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
196 * Get a value whether horizontal mode is enabled or not.
198 * @param obj The list object.
199 * @return @c EINA_TRUE means horizontal mode selection is enabled.
200 * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL,
201 * @c EINA_FALSE is returned.
203 * @see elm_list_horizontal_set() for details.
207 EAPI Eina_Bool elm_list_horizontal_get(const Evas_Object *obj);
210 * Enable or disable always select mode on the list object.
212 * @param obj The list object
213 * @param always_select @c EINA_TRUE to enable always select mode or
214 * @c EINA_FALSE to disable it.
216 * @note Always select mode is disabled by default.
218 * Default behavior of list items is to only call its callback function
219 * the first time it's pressed, i.e., when it is selected. If a selected
220 * item is pressed again, and multi-select is disabled, it won't call
221 * this function (if multi-select is enabled it will unselect the item).
223 * If always select is enabled, it will call the callback function
224 * everytime a item is pressed, so it will call when the item is selected,
225 * and again when a selected item is pressed.
227 * @see elm_list_always_select_mode_get()
228 * @see elm_list_multi_select_set()
232 EAPI void elm_list_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
235 * Get a value whether always select mode is enabled or not, meaning that
236 * an item will always call its callback function, even if already selected.
238 * @param obj The list object
239 * @return @c EINA_TRUE means horizontal mode selection is enabled.
240 * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL,
241 * @c EINA_FALSE is returned.
243 * @see elm_list_always_select_mode_set() for details.
247 EAPI Eina_Bool elm_list_always_select_mode_get(const Evas_Object *obj);
250 * Set bouncing behaviour when the scrolled content reaches an edge.
252 * Tell the internal scroller object whether it should bounce or not
253 * when it reaches the respective edges for each axis.
255 * @param obj The list object
256 * @param h_bounce Whether to bounce or not in the horizontal axis.
257 * @param v_bounce Whether to bounce or not in the vertical axis.
259 * @see elm_scroller_bounce_set()
263 EAPI void elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
266 * Get the bouncing behaviour of the internal scroller.
268 * Get whether the internal scroller should bounce when the edge of each
269 * axis is reached scrolling.
271 * @param obj The list object.
272 * @param h_bounce Pointer where to store the bounce state of the horizontal
274 * @param v_bounce Pointer where to store the bounce state of the vertical
277 * @see elm_scroller_bounce_get()
278 * @see elm_list_bounce_set()
282 EAPI void elm_list_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
285 * Set the scrollbar policy.
287 * @param obj The list object
288 * @param policy_h Horizontal scrollbar policy.
289 * @param policy_v Vertical scrollbar policy.
291 * This sets the scrollbar visibility policy for the given scroller.
292 * #ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it
293 * is needed, and otherwise kept hidden. #ELM_SCROLLER_POLICY_ON turns
294 * it on all the time, and #ELM_SCROLLER_POLICY_OFF always keeps it off.
295 * This applies respectively for the horizontal and vertical scrollbars.
297 * The both are disabled by default, i.e., are set to
298 * #ELM_SCROLLER_POLICY_OFF.
302 EAPI void elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v);
305 * Get the scrollbar policy.
307 * @see elm_list_scroller_policy_get() for details.
309 * @param obj The list object.
310 * @param policy_h Pointer where to store horizontal scrollbar policy.
311 * @param policy_v Pointer where to store vertical scrollbar policy.
315 EAPI void elm_list_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v);
318 * Append a new item to the list object.
320 * @param obj The list object.
321 * @param label The label of the list item.
322 * @param icon The icon object to use for the left side of the item. An
323 * icon can be any Evas object, but usually it is an icon created
324 * with elm_icon_add().
325 * @param end The icon object to use for the right side of the item. An
326 * icon can be any Evas object.
327 * @param func The function to call when the item is clicked.
328 * @param data The data to associate with the item for related callbacks.
330 * @return The created item or @c NULL upon failure.
332 * A new item will be created and appended to the list, i.e., will
333 * be set as @b last item.
335 * Items created with this method can be deleted with
336 * elm_list_item_del().
338 * Associated @p data can be properly freed when item is deleted if a
339 * callback function is set with elm_widget_item_del_cb_set().
341 * If a function is passed as argument, it will be called everytime this item
342 * is selected, i.e., the user clicks over an unselected item.
343 * If always select is enabled it will call this function every time
344 * user clicks over an item (already selected or not).
345 * If such function isn't needed, just passing
346 * @c NULL as @p func is enough. The same should be done for @p data.
348 * Simple example (with no function callback or data associated):
350 * li = elm_list_add(win);
351 * ic = elm_icon_add(win);
352 * elm_icon_file_set(ic, "path/to/image", NULL);
353 * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
354 * elm_list_item_append(li, "label", ic, NULL, NULL, NULL);
356 * evas_object_show(li);
359 * @see elm_list_always_select_mode_set()
360 * @see elm_list_item_del()
361 * @see elm_widget_item_del_cb_set()
362 * @see elm_list_clear()
363 * @see elm_icon_add()
367 EAPI Elm_List_Item *elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
370 * Prepend a new item to the list object.
372 * @param obj The list object.
373 * @param label The label of the list item.
374 * @param icon The icon object to use for the left side of the item. An
375 * icon can be any Evas object, but usually it is an icon created
376 * with elm_icon_add().
377 * @param end The icon object to use for the right side of the item. An
378 * icon can be any Evas object.
379 * @param func The function to call when the item is clicked.
380 * @param data The data to associate with the item for related callbacks.
382 * @return The created item or @c NULL upon failure.
384 * A new item will be created and prepended to the list, i.e., will
385 * be set as @b first item.
387 * Items created with this method can be deleted with
388 * elm_list_item_del().
390 * Associated @p data can be properly freed when item is deleted if a
391 * callback function is set with elm_widget_item_del_cb_set().
393 * If a function is passed as argument, it will be called everytime this item
394 * is selected, i.e., the user clicks over an unselected item.
395 * If always select is enabled it will call this function every time
396 * user clicks over an item (already selected or not).
397 * If such function isn't needed, just passing
398 * @c NULL as @p func is enough. The same should be done for @p data.
400 * @see elm_list_item_append() for a simple code example.
401 * @see elm_list_always_select_mode_set()
402 * @see elm_list_item_del()
403 * @see elm_widget_item_del_cb_set()
404 * @see elm_list_clear()
405 * @see elm_icon_add()
409 EAPI Elm_List_Item *elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
412 * Insert a new item into the list object before item @p before.
414 * @param obj The list object.
415 * @param before The list item to insert before.
416 * @param label The label of the list item.
417 * @param icon The icon object to use for the left side of the item. An
418 * icon can be any Evas object, but usually it is an icon created
419 * with elm_icon_add().
420 * @param end The icon object to use for the right side of the item. An
421 * icon can be any Evas object.
422 * @param func The function to call when the item is clicked.
423 * @param data The data to associate with the item for related callbacks.
425 * @return The created item or @c NULL upon failure.
427 * A new item will be created and added to the list. Its position in
428 * this list will be just before item @p before.
430 * Items created with this method can be deleted with
431 * elm_list_item_del().
433 * Associated @p data can be properly freed when item is deleted if a
434 * callback function is set with elm_widget_item_del_cb_set().
436 * If a function is passed as argument, it will be called everytime this item
437 * is selected, i.e., the user clicks over an unselected item.
438 * If always select is enabled it will call this function every time
439 * user clicks over an item (already selected or not).
440 * If such function isn't needed, just passing
441 * @c NULL as @p func is enough. The same should be done for @p data.
443 * @see elm_list_item_append() for a simple code example.
444 * @see elm_list_always_select_mode_set()
445 * @see elm_list_item_del()
446 * @see elm_widget_item_del_cb_set()
447 * @see elm_list_clear()
448 * @see elm_icon_add()
452 EAPI Elm_List_Item *elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
455 * Insert a new item into the list object after item @p after.
457 * @param obj The list object.
458 * @param after The list item to insert after.
459 * @param label The label of the list item.
460 * @param icon The icon object to use for the left side of the item. An
461 * icon can be any Evas object, but usually it is an icon created
462 * with elm_icon_add().
463 * @param end The icon object to use for the right side of the item. An
464 * icon can be any Evas object.
465 * @param func The function to call when the item is clicked.
466 * @param data The data to associate with the item for related callbacks.
468 * @return The created item or @c NULL upon failure.
470 * A new item will be created and added to the list. Its position in
471 * this list will be just after item @p after.
473 * Items created with this method can be deleted with
474 * elm_list_item_del().
476 * Associated @p data can be properly freed when item is deleted if a
477 * callback function is set with elm_widget_item_del_cb_set().
479 * If a function is passed as argument, it will be called everytime this item
480 * is selected, i.e., the user clicks over an unselected item.
481 * If always select is enabled it will call this function every time
482 * user clicks over an item (already selected or not).
483 * If such function isn't needed, just passing
484 * @c NULL as @p func is enough. The same should be done for @p data.
486 * @see elm_list_item_append() for a simple code example.
487 * @see elm_list_always_select_mode_set()
488 * @see elm_list_item_del()
489 * @see elm_widget_item_del_cb_set()
490 * @see elm_list_clear()
491 * @see elm_icon_add()
495 EAPI Elm_List_Item *elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data);
498 * Insert a new item into the sorted list object.
500 * @param obj The list object.
501 * @param label The label of the list item.
502 * @param icon The icon object to use for the left side of the item. An
503 * icon can be any Evas object, but usually it is an icon created
504 * with elm_icon_add().
505 * @param end The icon object to use for the right side of the item. An
506 * icon can be any Evas object.
507 * @param func The function to call when the item is clicked.
508 * @param data The data to associate with the item for related callbacks.
509 * @param cmp_func The comparing function to be used to sort list
510 * items <b>by #Elm_List_Item item handles</b>. This function will
511 * receive two items and compare them, returning a non-negative integer
512 * if the second item should be place after the first, or negative value
513 * if should be placed before.
515 * @return The created item or @c NULL upon failure.
517 * @note This function inserts values into a list object assuming it was
518 * sorted and the result will be sorted.
520 * A new item will be created and added to the list. Its position in
521 * this list will be found comparing the new item with previously inserted
522 * items using function @p cmp_func.
524 * Items created with this method can be deleted with
525 * elm_list_item_del().
527 * Associated @p data can be properly freed when item is deleted if a
528 * callback function is set with elm_widget_item_del_cb_set().
530 * If a function is passed as argument, it will be called everytime this item
531 * is selected, i.e., the user clicks over an unselected item.
532 * If always select is enabled it will call this function every time
533 * user clicks over an item (already selected or not).
534 * If such function isn't needed, just passing
535 * @c NULL as @p func is enough. The same should be done for @p data.
537 * @see elm_list_item_append() for a simple code example.
538 * @see elm_list_always_select_mode_set()
539 * @see elm_list_item_del()
540 * @see elm_widget_item_del_cb_set()
541 * @see elm_list_clear()
542 * @see elm_icon_add()
546 EAPI Elm_List_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);
549 * Remove all list's items.
551 * @param obj The list object
553 * @see elm_list_item_del()
554 * @see elm_list_item_append()
558 EAPI void elm_list_clear(Evas_Object *obj);
561 * Get a list of all the list items.
563 * @param obj The list object
564 * @return An @c Eina_List of list items, #Elm_List_Item,
565 * or @c NULL on failure.
567 * @see elm_list_item_append()
568 * @see elm_list_item_del()
569 * @see elm_list_clear()
573 EAPI const Eina_List *elm_list_items_get(const Evas_Object *obj);
576 * Get the selected item.
578 * @param obj The list object.
579 * @return The selected list item.
581 * The selected item can be unselected with function
582 * elm_list_item_selected_set().
584 * The selected item always will be highlighted on list.
586 * @see elm_list_selected_items_get()
590 EAPI Elm_List_Item *elm_list_selected_item_get(const Evas_Object *obj);
593 * Return a list of the currently selected list items.
595 * @param obj The list object.
596 * @return An @c Eina_List of list items, #Elm_List_Item,
597 * or @c NULL on failure.
599 * Multiple items can be selected if multi select is enabled. It can be
600 * done with elm_list_multi_select_set().
602 * @see elm_list_selected_item_get()
603 * @see elm_list_multi_select_set()
607 EAPI const Eina_List *elm_list_selected_items_get(const Evas_Object *obj);
610 * Set the selected state of an item.
612 * @param item The list item
613 * @param selected The selected state
615 * This sets the selected state of the given item @p it.
616 * @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
618 * If a new item is selected the previosly selected will be unselected,
619 * unless multiple selection is enabled with elm_list_multi_select_set().
620 * Previoulsy selected item can be get with function
621 * elm_list_selected_item_get().
623 * Selected items will be highlighted.
625 * @see elm_list_item_selected_get()
626 * @see elm_list_selected_item_get()
627 * @see elm_list_multi_select_set()
631 EAPI void elm_list_item_selected_set(Elm_List_Item *item, Eina_Bool selected);
634 * Get whether the @p item is selected or not.
636 * @param item The list item.
637 * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
638 * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
640 * @see elm_list_selected_item_set() for details.
641 * @see elm_list_item_selected_get()
645 EAPI Eina_Bool elm_list_item_selected_get(const Elm_List_Item *item);
648 * Set or unset item as a separator.
650 * @param it The list item.
651 * @param setting @c EINA_TRUE to set item @p it as separator or
652 * @c EINA_FALSE to unset, i.e., item will be used as a regular item.
654 * Items aren't set as separator by default.
656 * If set as separator it will display separator theme, so won't display
659 * @see elm_list_item_separator_get()
663 EAPI void elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting);
666 * Get a value whether item is a separator or not.
668 * @see elm_list_item_separator_set() for details.
670 * @param it The list item.
671 * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE
672 * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned.
676 EAPI Eina_Bool elm_list_item_separator_get(const Elm_List_Item *it);
679 * Show @p item in the list view.
681 * @param item The list item to be shown.
683 * It won't animate list until item is visible. If such behavior is wanted,
684 * use elm_list_bring_in() intead.
688 EAPI void elm_list_item_show(Elm_List_Item *item);
691 * Bring in the given item to list view.
693 * @param item The item.
695 * This causes list to jump to the given item @p item and show it
696 * (by scrolling), if it is not fully visible.
698 * This may use animation to do so and take a period of time.
700 * If animation isn't wanted, elm_list_item_show() can be used.
704 EAPI void elm_list_item_bring_in(Elm_List_Item *item);
707 * Delete them item from the list.
709 * @param item The item of list to be deleted.
711 * If deleting all list items is required, elm_list_clear()
712 * should be used instead of getting items list and deleting each one.
714 * @see elm_list_clear()
715 * @see elm_list_item_append()
716 * @see elm_widget_item_del_cb_set()
720 EAPI void elm_list_item_del(Elm_List_Item *item);
723 * Gets the base object of the item.
725 * @param item The list item
726 * @return The base object associated with @p item
728 * Base object is the @c Evas_Object that represents that item.
732 EAPI Evas_Object *elm_list_item_object_get(const Elm_List_Item *item);
735 * Get the item before @p it in list.
737 * @param it The list item.
738 * @return The item before @p it, or @c NULL if none or on failure.
740 * @note If it is the first item, @c NULL will be returned.
742 * @see elm_list_item_append()
743 * @see elm_list_items_get()
747 EAPI Elm_List_Item *elm_list_item_prev(const Elm_List_Item *it);
750 * Get the item after @p it in list.
752 * @param it The list item.
753 * @return The item after @p it, or @c NULL if none or on failure.
755 * @note If it is the last item, @c NULL will be returned.
757 * @see elm_list_item_append()
758 * @see elm_list_items_get()
762 EAPI Elm_List_Item *elm_list_item_next(const Elm_List_Item *it);
765 * Set the text to be shown in a given list item's tooltips.
767 * @param item Target item.
768 * @param text The text to set in the content.
770 * Setup the text as tooltip to object. The item can have only one tooltip,
771 * so any previous tooltip data - set with this function or
772 * elm_list_item_tooltip_content_cb_set() - is removed.
774 * @see elm_object_tooltip_text_set() for more details.
778 EAPI void elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text);
781 * @brief Disable size restrictions on an object's tooltip
782 * @param item The tooltip's anchor object
783 * @param disable If EINA_TRUE, size restrictions are disabled
784 * @return EINA_FALSE on failure, EINA_TRUE on success
786 * This function allows a tooltip to expand beyond its parant window's canvas.
787 * It will instead be limited only by the size of the display.
789 EAPI Eina_Bool elm_list_item_tooltip_window_mode_set(Elm_List_Item *item, Eina_Bool disable);
792 * @brief Retrieve size restriction state of an object's tooltip
793 * @param obj The tooltip's anchor object
794 * @return If EINA_TRUE, size restrictions are disabled
796 * This function returns whether a tooltip is allowed to expand beyond
797 * its parant window's canvas.
798 * It will instead be limited only by the size of the display.
800 EAPI Eina_Bool elm_list_item_tooltip_window_mode_get(const Elm_List_Item *item);
803 * Set the content to be shown in the tooltip item.
805 * Setup the tooltip to item. The item can have only one tooltip,
806 * so any previous tooltip data is removed. @p func(with @p data) will
807 * be called every time that need show the tooltip and it should
808 * return a valid Evas_Object. This object is then managed fully by
809 * tooltip system and is deleted when the tooltip is gone.
811 * @param item the list item being attached a tooltip.
812 * @param func the function used to create the tooltip contents.
813 * @param data what to provide to @a func as callback data/context.
814 * @param del_cb called when data is not needed anymore, either when
815 * another callback replaces @a func, the tooltip is unset with
816 * elm_list_item_tooltip_unset() or the owner @a item
817 * dies. This callback receives as the first parameter the
818 * given @a data, and @c event_info is the item.
820 * @see elm_object_tooltip_content_cb_set() for more details.
824 EAPI void elm_list_item_tooltip_content_cb_set(Elm_List_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
827 * Unset tooltip from item.
829 * @param item list item to remove previously set tooltip.
831 * Remove tooltip from item. The callback provided as del_cb to
832 * elm_list_item_tooltip_content_cb_set() will be called to notify
833 * it is not used anymore.
835 * @see elm_object_tooltip_unset() for more details.
836 * @see elm_list_item_tooltip_content_cb_set()
840 EAPI void elm_list_item_tooltip_unset(Elm_List_Item *item);
843 * Sets a different style for this item tooltip.
845 * @note before you set a style you should define a tooltip with
846 * elm_list_item_tooltip_content_cb_set() or
847 * elm_list_item_tooltip_text_set()
849 * @param item list item with tooltip already set.
850 * @param style the theme style to use (default, transparent, ...)
852 * @see elm_object_tooltip_style_set() for more details.
856 EAPI void elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style);
859 * Get the style for this item tooltip.
861 * @param item list item with tooltip already set.
862 * @return style the theme style in use, defaults to "default". If the
863 * object does not have a tooltip set, then NULL is returned.
865 * @see elm_object_tooltip_style_get() for more details.
866 * @see elm_list_item_tooltip_style_set()
870 EAPI const char *elm_list_item_tooltip_style_get(const Elm_List_Item *item);
873 * Set the type of mouse pointer/cursor decoration to be shown,
874 * when the mouse pointer is over the given list widget item
876 * @param item list item to customize cursor on
877 * @param cursor the cursor type's name
879 * This function works analogously as elm_object_cursor_set(), but
880 * here the cursor's changing area is restricted to the item's
881 * area, and not the whole widget's. Note that that item cursors
882 * have precedence over widget cursors, so that a mouse over an
883 * item with custom cursor set will always show @b that cursor.
885 * If this function is called twice for an object, a previously set
886 * cursor will be unset on the second call.
888 * @see elm_object_cursor_set()
889 * @see elm_list_item_cursor_get()
890 * @see elm_list_item_cursor_unset()
894 EAPI void elm_list_item_cursor_set(Elm_List_Item *item, const char *cursor);
897 * Get the type of mouse pointer/cursor decoration set to be shown,
898 * when the mouse pointer is over the given list widget item
900 * @param item list item with custom cursor set
901 * @return the cursor type's name or @c NULL, if no custom cursors
902 * were set to @p item (and on errors)
904 * @see elm_object_cursor_get()
905 * @see elm_list_item_cursor_set()
906 * @see elm_list_item_cursor_unset()
910 EAPI const char *elm_list_item_cursor_get(const Elm_List_Item *item);
913 * Unset any custom mouse pointer/cursor decoration set to be
914 * shown, when the mouse pointer is over the given list widget
915 * item, thus making it show the @b default cursor again.
917 * @param item a list item
919 * Use this call to undo any custom settings on this item's cursor
920 * decoration, bringing it back to defaults (no custom style set).
922 * @see elm_object_cursor_unset()
923 * @see elm_list_item_cursor_set()
927 EAPI void elm_list_item_cursor_unset(Elm_List_Item *item);
930 * Set a different @b style for a given custom cursor set for a
933 * @param item list item with custom cursor set
934 * @param style the <b>theme style</b> to use (e.g. @c "default",
935 * @c "transparent", etc)
937 * This function only makes sense when one is using custom mouse
938 * cursor decorations <b>defined in a theme file</b>, which can have,
939 * given a cursor name/type, <b>alternate styles</b> on it. It
940 * works analogously as elm_object_cursor_style_set(), but here
941 * applyed only to list item objects.
943 * @warning Before you set a cursor style you should have definen a
944 * custom cursor previously on the item, with
945 * elm_list_item_cursor_set()
947 * @see elm_list_item_cursor_engine_only_set()
948 * @see elm_list_item_cursor_style_get()
952 EAPI void elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style);
955 * Get the current @b style set for a given list item's custom
958 * @param item list item with custom cursor set.
959 * @return style the cursor style in use. If the object does not
960 * have a cursor set, then @c NULL is returned.
962 * @see elm_list_item_cursor_style_set() for more details
966 EAPI const char *elm_list_item_cursor_style_get(const Elm_List_Item *item);
969 * Set if the (custom)cursor for a given list item should be
970 * searched in its theme, also, or should only rely on the
973 * @param item item with custom (custom) cursor already set on
974 * @param engine_only Use @c EINA_TRUE to have cursors looked for
975 * only on those provided by the rendering engine, @c EINA_FALSE to
976 * have them searched on the widget's theme, as well.
978 * @note This call is of use only if you've set a custom cursor
979 * for list items, with elm_list_item_cursor_set().
981 * @note By default, cursors will only be looked for between those
982 * provided by the rendering engine.
986 EAPI void elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only);
989 * Get if the (custom) cursor for a given list item is being
990 * searched in its theme, also, or is only relying on the rendering
993 * @param item a list item
994 * @return @c EINA_TRUE, if cursors are being looked for only on
995 * those provided by the rendering engine, @c EINA_FALSE if they
996 * are being searched on the widget's theme, as well.
998 * @see elm_list_item_cursor_engine_only_set(), for more details
1002 EAPI Eina_Bool elm_list_item_cursor_engine_only_get(const Elm_List_Item *item);