diff options
Diffstat (limited to 'src/lib/elementary/elm_spinner_eo.legacy.h')
-rw-r--r-- | src/lib/elementary/elm_spinner_eo.legacy.h | 295 |
1 files changed, 295 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_spinner_eo.legacy.h b/src/lib/elementary/elm_spinner_eo.legacy.h new file mode 100644 index 0000000..798ec39 --- /dev/null +++ b/src/lib/elementary/elm_spinner_eo.legacy.h | |||
@@ -0,0 +1,295 @@ | |||
1 | #ifndef _ELM_SPINNER_EO_LEGACY_H_ | ||
2 | #define _ELM_SPINNER_EO_LEGACY_H_ | ||
3 | |||
4 | #ifndef _ELM_SPINNER_EO_CLASS_TYPE | ||
5 | #define _ELM_SPINNER_EO_CLASS_TYPE | ||
6 | |||
7 | typedef Eo Elm_Spinner; | ||
8 | |||
9 | #endif | ||
10 | |||
11 | #ifndef _ELM_SPINNER_EO_TYPES | ||
12 | #define _ELM_SPINNER_EO_TYPES | ||
13 | |||
14 | |||
15 | #endif | ||
16 | |||
17 | /** | ||
18 | * @brief Control whether the spinner should wrap when it reaches its minimum | ||
19 | * or maximum value. | ||
20 | * | ||
21 | * Disabled by default. If disabled, when the user tries to increment the | ||
22 | * value, but displayed value plus step value is bigger than maximum value, the | ||
23 | * new value will be the maximum value. The same happens when the user tries to | ||
24 | * decrement it, but the value less step is less than minimum value. In this | ||
25 | * case, the new displayed value will be the minimum value. | ||
26 | * | ||
27 | * When wrap is enabled, when the user tries to increment the value, but | ||
28 | * displayed value plus step value is bigger than maximum value, the new value | ||
29 | * will be the minimum value. When the the user tries to decrement it, but the | ||
30 | * value less step is less than minimum value, the new displayed value will be | ||
31 | * the maximum value. | ||
32 | * | ||
33 | * E.g.: @c min = 10 @c max = 50 @c step = 20 @c displayed = 20 | ||
34 | * | ||
35 | * When the user decrement value (using left or bottom arrow), it will displays | ||
36 | * $50. | ||
37 | * | ||
38 | * @param[in] obj The object. | ||
39 | * @param[in] wrap @c true to enable wrap or @c false to disable it. | ||
40 | * | ||
41 | * @ingroup Elm_Spinner_Group | ||
42 | */ | ||
43 | EAPI void elm_spinner_wrap_set(Elm_Spinner *obj, Eina_Bool wrap); | ||
44 | |||
45 | /** | ||
46 | * @brief Control whether the spinner should wrap when it reaches its minimum | ||
47 | * or maximum value. | ||
48 | * | ||
49 | * Disabled by default. If disabled, when the user tries to increment the | ||
50 | * value, but displayed value plus step value is bigger than maximum value, the | ||
51 | * new value will be the maximum value. The same happens when the user tries to | ||
52 | * decrement it, but the value less step is less than minimum value. In this | ||
53 | * case, the new displayed value will be the minimum value. | ||
54 | * | ||
55 | * When wrap is enabled, when the user tries to increment the value, but | ||
56 | * displayed value plus step value is bigger than maximum value, the new value | ||
57 | * will be the minimum value. When the the user tries to decrement it, but the | ||
58 | * value less step is less than minimum value, the new displayed value will be | ||
59 | * the maximum value. | ||
60 | * | ||
61 | * E.g.: @c min = 10 @c max = 50 @c step = 20 @c displayed = 20 | ||
62 | * | ||
63 | * When the user decrement value (using left or bottom arrow), it will displays | ||
64 | * $50. | ||
65 | * | ||
66 | * @param[in] obj The object. | ||
67 | * | ||
68 | * @return @c true to enable wrap or @c false to disable it. | ||
69 | * | ||
70 | * @ingroup Elm_Spinner_Group | ||
71 | */ | ||
72 | EAPI Eina_Bool elm_spinner_wrap_get(const Elm_Spinner *obj); | ||
73 | |||
74 | /** | ||
75 | * @brief Control the interval on time updates for an user mouse button hold on | ||
76 | * spinner widgets' arrows. | ||
77 | * | ||
78 | * This interval value is decreased while the user holds the mouse pointer | ||
79 | * either incrementing or decrementing spinner's value. | ||
80 | * | ||
81 | * This helps the user to get to a given value distant from the current one | ||
82 | * easier/faster, as it will start to change quicker and quicker on mouse | ||
83 | * button holds. | ||
84 | * | ||
85 | * The calculation for the next change interval value, starting from the one | ||
86 | * set with this call, is the previous interval divided by $1.05, so it | ||
87 | * decreases a little bit. | ||
88 | * | ||
89 | * The default starting interval value for automatic changes is $0.85 seconds. | ||
90 | * | ||
91 | * @param[in] obj The object. | ||
92 | * @param[in] interval The (first) interval value in seconds. | ||
93 | * | ||
94 | * @ingroup Elm_Spinner_Group | ||
95 | */ | ||
96 | EAPI void elm_spinner_interval_set(Elm_Spinner *obj, double interval); | ||
97 | |||
98 | /** | ||
99 | * @brief Control the interval on time updates for an user mouse button hold on | ||
100 | * spinner widgets' arrows. | ||
101 | * | ||
102 | * This interval value is decreased while the user holds the mouse pointer | ||
103 | * either incrementing or decrementing spinner's value. | ||
104 | * | ||
105 | * This helps the user to get to a given value distant from the current one | ||
106 | * easier/faster, as it will start to change quicker and quicker on mouse | ||
107 | * button holds. | ||
108 | * | ||
109 | * The calculation for the next change interval value, starting from the one | ||
110 | * set with this call, is the previous interval divided by $1.05, so it | ||
111 | * decreases a little bit. | ||
112 | * | ||
113 | * The default starting interval value for automatic changes is $0.85 seconds. | ||
114 | * | ||
115 | * @param[in] obj The object. | ||
116 | * | ||
117 | * @return The (first) interval value in seconds. | ||
118 | * | ||
119 | * @ingroup Elm_Spinner_Group | ||
120 | */ | ||
121 | EAPI double elm_spinner_interval_get(const Elm_Spinner *obj); | ||
122 | |||
123 | /** | ||
124 | * @brief Control the round value for rounding | ||
125 | * | ||
126 | * Sets the rounding value used for value rounding in the spinner. | ||
127 | * | ||
128 | * @param[in] obj The object. | ||
129 | * @param[in] rnd The rounding value | ||
130 | * | ||
131 | * @ingroup Elm_Spinner_Group | ||
132 | */ | ||
133 | EAPI void elm_spinner_round_set(Elm_Spinner *obj, int rnd); | ||
134 | |||
135 | /** | ||
136 | * @brief Control the round value for rounding | ||
137 | * | ||
138 | * Sets the rounding value used for value rounding in the spinner. | ||
139 | * | ||
140 | * @param[in] obj The object. | ||
141 | * | ||
142 | * @return The rounding value | ||
143 | * | ||
144 | * @ingroup Elm_Spinner_Group | ||
145 | */ | ||
146 | EAPI int elm_spinner_round_get(const Elm_Spinner *obj); | ||
147 | |||
148 | /** | ||
149 | * @brief Control whether the spinner can be directly edited by the user or | ||
150 | * not. | ||
151 | * | ||
152 | * Spinner objects can have edition disabled, in which state they will be | ||
153 | * changed only by arrows. Useful for contexts where you don't want your users | ||
154 | * to interact with it writing the value. Specially when using special values, | ||
155 | * the user can see real value instead of special label on edition. | ||
156 | * | ||
157 | * It's enabled by default. | ||
158 | * | ||
159 | * @param[in] obj The object. | ||
160 | * @param[in] editable @c true to allow users to edit it or @c false to don't | ||
161 | * allow users to edit it directly. | ||
162 | * | ||
163 | * @ingroup Elm_Spinner_Group | ||
164 | */ | ||
165 | EAPI void elm_spinner_editable_set(Elm_Spinner *obj, Eina_Bool editable); | ||
166 | |||
167 | /** | ||
168 | * @brief Control whether the spinner can be directly edited by the user or | ||
169 | * not. | ||
170 | * | ||
171 | * Spinner objects can have edition disabled, in which state they will be | ||
172 | * changed only by arrows. Useful for contexts where you don't want your users | ||
173 | * to interact with it writing the value. Specially when using special values, | ||
174 | * the user can see real value instead of special label on edition. | ||
175 | * | ||
176 | * It's enabled by default. | ||
177 | * | ||
178 | * @param[in] obj The object. | ||
179 | * | ||
180 | * @return @c true to allow users to edit it or @c false to don't allow users | ||
181 | * to edit it directly. | ||
182 | * | ||
183 | * @ingroup Elm_Spinner_Group | ||
184 | */ | ||
185 | EAPI Eina_Bool elm_spinner_editable_get(const Elm_Spinner *obj); | ||
186 | |||
187 | /** | ||
188 | * @brief Control the base for rounding | ||
189 | * | ||
190 | * Rounding works as follows: | ||
191 | * | ||
192 | * rounded_val = base + (double)(((value - base) / round) * round) | ||
193 | * | ||
194 | * Where rounded_val, value and base are doubles, and round is an integer. | ||
195 | * | ||
196 | * This means that things will be rounded to increments (or decrements) of | ||
197 | * "round" starting from value @c base. The default base for rounding is 0. | ||
198 | * | ||
199 | * Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ... | ||
200 | * | ||
201 | * Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5, | ||
202 | * 11.5, ... | ||
203 | * | ||
204 | * @param[in] obj The object. | ||
205 | * @param[in] base The base value | ||
206 | * | ||
207 | * @ingroup Elm_Spinner_Group | ||
208 | */ | ||
209 | EAPI void elm_spinner_base_set(Elm_Spinner *obj, double base); | ||
210 | |||
211 | /** | ||
212 | * @brief Control the base for rounding | ||
213 | * | ||
214 | * Rounding works as follows: | ||
215 | * | ||
216 | * rounded_val = base + (double)(((value - base) / round) * round) | ||
217 | * | ||
218 | * Where rounded_val, value and base are doubles, and round is an integer. | ||
219 | * | ||
220 | * This means that things will be rounded to increments (or decrements) of | ||
221 | * "round" starting from value @c base. The default base for rounding is 0. | ||
222 | * | ||
223 | * Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ... | ||
224 | * | ||
225 | * Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5, | ||
226 | * 11.5, ... | ||
227 | * | ||
228 | * @param[in] obj The object. | ||
229 | * | ||
230 | * @return The base value | ||
231 | * | ||
232 | * @ingroup Elm_Spinner_Group | ||
233 | */ | ||
234 | EAPI double elm_spinner_base_get(const Elm_Spinner *obj); | ||
235 | |||
236 | /** | ||
237 | * @brief Control the format string of the displayed label. | ||
238 | * | ||
239 | * If @c NULL, this sets the format to "%.0f". If not it sets the format string | ||
240 | * for the label text. The label text is provided a floating point value, so | ||
241 | * the label text can display up to 1 floating point value. Note that this is | ||
242 | * optional. | ||
243 | * | ||
244 | * Use a format string such as "%1.2f meters" for example, and it will display | ||
245 | * values like: "3.14 meters" for a value equal to 3.14159. | ||
246 | * | ||
247 | * Default is "%0.f". | ||
248 | * | ||
249 | * @param[in] obj The object. | ||
250 | * @param[in] fmt The format string for the label display. | ||
251 | * | ||
252 | * @ingroup Elm_Spinner_Group | ||
253 | */ | ||
254 | EAPI void elm_spinner_label_format_set(Elm_Spinner *obj, const char *fmt); | ||
255 | |||
256 | /** | ||
257 | * @brief Control the format string of the displayed label. | ||
258 | * | ||
259 | * If @c NULL, this sets the format to "%.0f". If not it sets the format string | ||
260 | * for the label text. The label text is provided a floating point value, so | ||
261 | * the label text can display up to 1 floating point value. Note that this is | ||
262 | * optional. | ||
263 | * | ||
264 | * Use a format string such as "%1.2f meters" for example, and it will display | ||
265 | * values like: "3.14 meters" for a value equal to 3.14159. | ||
266 | * | ||
267 | * Default is "%0.f". | ||
268 | * | ||
269 | * @param[in] obj The object. | ||
270 | * | ||
271 | * @return The format string for the label display. | ||
272 | * | ||
273 | * @ingroup Elm_Spinner_Group | ||
274 | */ | ||
275 | EAPI const char *elm_spinner_label_format_get(const Elm_Spinner *obj); | ||
276 | |||
277 | /** | ||
278 | * @brief Control special string to display in the place of the numerical | ||
279 | * value. | ||
280 | * | ||
281 | * It's useful for cases when a user should select an item that is better | ||
282 | * indicated by a label than a value. For example, weekdays or months. | ||
283 | * | ||
284 | * @note If another label was previously set to @c value, it will be replaced | ||
285 | * by the new label. | ||
286 | * | ||
287 | * @param[in] obj The object. | ||
288 | * @param[in] value The value to be replaced. | ||
289 | * @param[in] label The label to be used. | ||
290 | * | ||
291 | * @ingroup Elm_Spinner_Group | ||
292 | */ | ||
293 | EAPI void elm_spinner_special_value_add(Elm_Spinner *obj, double value, const char *label); | ||
294 | |||
295 | #endif | ||