summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_list_item_eo.h
blob: 0b3800a8931a08c568b859cb1eb35a3602f9bd1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#ifndef _ELM_LIST_ITEM_EO_H_
#define _ELM_LIST_ITEM_EO_H_

#ifndef _ELM_LIST_ITEM_EO_CLASS_TYPE
#define _ELM_LIST_ITEM_EO_CLASS_TYPE

typedef Eo Elm_List_Item;

#endif

#ifndef _ELM_LIST_ITEM_EO_TYPES
#define _ELM_LIST_ITEM_EO_TYPES


#endif
/** Elementary list item class
 *
 * @ingroup Elm_List_Item
 */
#define ELM_LIST_ITEM_CLASS elm_list_item_class_get()

EWAPI const Efl_Class *elm_list_item_class_get(void) EINA_CONST;

/**
 * @brief Set or unset item as a separator.
 *
 * Items aren't set as separator by default.
 *
 * If set as separator it will display separator theme, so won't display icons
 * or label.
 *
 * @param[in] obj The object.
 * @param[in] setting @c true means item @c it is a separator. @c false
 * indicates it's not.
 *
 * @ingroup Elm_List_Item
 */
EOAPI void elm_obj_list_item_separator_set(Eo *obj, Eina_Bool setting);

/**
 * @brief Get a value whether item is a separator or not.
 *
 * @param[in] obj The object.
 *
 * @return @c true means item @c it is a separator. @c false indicates it's
 * not.
 *
 * @ingroup Elm_List_Item
 */
EOAPI Eina_Bool elm_obj_list_item_separator_get(const Eo *obj);

/**
 * @brief Set the selected state of an item.
 *
 * This sets the selected state of the given item.
 *
 * If a new item is selected the previously selected will be unselected, unless
 * multiple selection is enabled with @ref elm_list_multi_select_set.
 * Previously selected item can be get with function @ref
 * elm_list_selected_item_get.
 *
 * Selected items will be highlighted.
 *
 * @param[in] obj The object.
 * @param[in] selected The selected state.
 *
 * @ingroup Elm_List_Item
 */
EOAPI void elm_obj_list_item_selected_set(Eo *obj, Eina_Bool selected);

/**
 * @brief Get whether the item is selected or not.
 *
 * @param[in] obj The object.
 *
 * @return The selected state.
 *
 * @ingroup Elm_List_Item
 */
EOAPI Eina_Bool elm_obj_list_item_selected_get(const Eo *obj);

/**
 * @brief Get the real Evas(Edje) object created to implement the view of a
 * given list item.
 *
 * Base object is the @c Evas_Object that represents that item.
 *
 * @param[in] obj The object.
 *
 * @return The base Edje object associated with the item.
 *
 * @ingroup Elm_List_Item
 */
EOAPI Efl_Canvas_Object *elm_obj_list_item_object_get(const Eo *obj);

/**
 * @brief Get the item before the item in list.
 *
 * @note If it is the first item, @c null will be returned.
 *
 * @param[in] obj The object.
 *
 * @return The item before or @c null.
 *
 * @ingroup Elm_List_Item
 */
EOAPI Elm_Widget_Item *elm_obj_list_item_prev_get(const Eo *obj);

/**
 * @brief Get the item after the item in list.
 *
 * @note If it is the last item, @c null will be returned.
 *
 * @param[in] obj The object.
 *
 * @return The item after or @c null.
 *
 * @ingroup Elm_List_Item
 */
EOAPI Elm_Widget_Item *elm_obj_list_item_next_get(const Eo *obj);

/**
 * @brief Show item in the list view.
 *
 * It won't animate list until item is visible. If such behavior is wanted, use
 * @ref elm_obj_list_item_bring_in instead.
 * @param[in] obj The object.
 *
 * @ingroup Elm_List_Item
 */
EOAPI void elm_obj_list_item_show(Eo *obj);

/**
 * @brief Bring in the given item to list view.
 *
 * This causes list to jump to the given 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, @ref elm_obj_list_item_show can be used.
 * @param[in] obj The object.
 *
 * @ingroup Elm_List_Item
 */
EOAPI void elm_obj_list_item_bring_in(Eo *obj);

#endif