summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_flipselector_eo.legacy.h
blob: 707d7a3d5e73b5ac5adff338a7e0f85f97526255 (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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#ifndef _ELM_FLIPSELECTOR_EO_LEGACY_H_
#define _ELM_FLIPSELECTOR_EO_LEGACY_H_

#ifndef _ELM_FLIPSELECTOR_EO_CLASS_TYPE
#define _ELM_FLIPSELECTOR_EO_CLASS_TYPE

typedef Eo Elm_Flipselector;

#endif

#ifndef _ELM_FLIPSELECTOR_EO_TYPES
#define _ELM_FLIPSELECTOR_EO_TYPES


#endif

/**
 * @brief Get the internal list of items in a given flip selector widget.
 *
 * This list is not to be modified in any way and must not be freed. Use the
 * list members with functions like @ref elm_object_item_text_set, @ref
 * elm_object_item_text_get, @ref elm_object_item_del, @ref
 * elm_flipselector_item_selected_get, @ref elm_flipselector_item_selected_set.
 *
 * @warning This list is only valid until @c obj object's internal items list
 * is changed. It should be fetched again with another call to this function
 * when changes happen.
 *
 * @param[in] obj The object.
 *
 * @return List of items
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI const Eina_List *elm_flipselector_items_get(const Elm_Flipselector *obj);

/**
 * @brief Get the first item in the given flip selector widget's list of items.
 *
 * See also @ref elm_flipselector_item_append,
 * @ref elm_flipselector_last_item_get.
 *
 * @param[in] obj The object.
 *
 * @return The first item or @c null, if it has no items (and on errors).
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI Elm_Widget_Item *elm_flipselector_first_item_get(const Elm_Flipselector *obj);

/**
 * @brief Get the last item in the given flip selector widget's list of items.
 *
 * See also @ref elm_flipselector_item_prepend,
 * @ref elm_flipselector_first_item_get.
 *
 * @param[in] obj The object.
 *
 * @return The last item or @c null, if it has no items (and on errors).
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI Elm_Widget_Item *elm_flipselector_last_item_get(const Elm_Flipselector *obj);

/**
 * @brief Get the currently selected item in a flip selector widget.
 *
 * @param[in] obj The object.
 *
 * @return The selected item or @c null, if the widget has no items (and on
 * errors).
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI Elm_Widget_Item *elm_flipselector_selected_item_get(const Elm_Flipselector *obj);

/**
 * @brief Set the interval on time updates for a user mouse button hold on a
 * flip selector widget.
 *
 * This interval value is decreased while the user holds the mouse pointer
 * either flipping up or flipping down a given flip selector.
 *
 * This helps the user to get to a given item distant from the current one
 * easier/faster, as it will start to flip quicker and quicker on mouse button
 * holds.
 *
 * The calculation for the next flip interval value, starting from the one set
 * with this call, is the previous interval divided by 1.05, so it decreases a
 * little bit.
 *
 * The default starting interval value for automatic flips is 0.85 seconds.
 *
 * See also @ref elm_flipselector_first_interval_get.
 *
 * @param[in] obj The object.
 * @param[in] interval The (first) interval value in seconds.
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI void elm_flipselector_first_interval_set(Elm_Flipselector *obj, double interval);

/**
 * @brief Get the interval on time updates for an user mouse button hold on a
 * flip selector widget.
 *
 * See also @ref elm_flipselector_first_interval_set for more details.
 *
 * @param[in] obj The object.
 *
 * @return The (first) interval value in seconds.
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI double elm_flipselector_first_interval_get(const Elm_Flipselector *obj);

/**
 * @brief Prepend a (text) item to a flip selector widget
 *
 * The widget's list of labels to show will be prepended with the given value.
 * If the user wishes so, a callback function pointer can be passed, which will
 * get called when this same item is selected.
 *
 * @note The current selection won't be modified by prepending an element to
 * the list.
 *
 * @note The maximum length of the text label is going to be determined by the
 * widget's theme. Strings larger than that value are going to be truncated.
 *
 * @param[in] obj The object.
 * @param[in] label The (text) label of the new item.
 * @param[in] func Convenience callback function to take place when item is
 * selected.
 * @param[in] data Data passed to @c func, above.
 *
 * @return New widget item
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI Elm_Widget_Item *elm_flipselector_item_prepend(Elm_Flipselector *obj, const char *label, Evas_Smart_Cb func, void *data);

/**
 * @brief Programmatically select the next item of a flip selector widget
 *
 * @note The selection will be animated. Also, if it reaches the end of its
 * list of member items, it will continue with the first one onwards.
 * @param[in] obj The object.
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI void elm_flipselector_flip_next(Elm_Flipselector *obj);

/**
 * @brief Append a (text) item to a flip selector widget
 *
 * The widget's list of labels to show will be appended with the given value.
 * If the user wishes so, a callback function pointer can be passed, which will
 * get called when this same item is selected.
 *
 * @note The current selection won't be modified by appending an element to the
 * list.
 *
 * @note The maximum length of the text label is going to be determined by the
 * widget's theme. Strings larger than that value are going to be truncated.
 *
 * @param[in] obj The object.
 * @param[in] label The (text) label of the new item.
 * @param[in] func Convenience callback function to take place when item is
 * selected.
 * @param[in] data Data passed to @c func, above.
 *
 * @return New widget item
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI Elm_Widget_Item *elm_flipselector_item_append(Elm_Flipselector *obj, const char *label, Evas_Smart_Cb func, const void *data);

/**
 * @brief Programmatically select the previous item of a flip selector widget
 *
 * @note The selection will be animated. Also, if it reaches the beginning of
 * its list of member items, it will continue with the last one backwards.
 * @param[in] obj The object.
 *
 * @ingroup Elm_Flipselector_Group
 */
EAPI void elm_flipselector_flip_prev(Elm_Flipselector *obj);

#endif