summaryrefslogtreecommitdiff
path: root/src/lib/elm_slider_eo.h
blob: 35872d65a6acffc90538fd5d69f79250691709e0 (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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
#define ELM_OBJ_SLIDER_CLASS elm_obj_slider_class_get()

const Eo_Class *elm_obj_slider_class_get(void) EINA_CONST;

extern EAPI Eo_Op ELM_OBJ_SLIDER_BASE_ID;

typedef char *(*slider_func_type)(double);
typedef void (*slider_freefunc_type)(char *);

enum
{
   ELM_OBJ_SLIDER_SUB_ID_SPAN_SIZE_SET,
   ELM_OBJ_SLIDER_SUB_ID_SPAN_SIZE_GET,
   ELM_OBJ_SLIDER_SUB_ID_UNIT_FORMAT_SET,
   ELM_OBJ_SLIDER_SUB_ID_UNIT_FORMAT_GET,
   ELM_OBJ_SLIDER_SUB_ID_INDICATOR_FORMAT_SET,
   ELM_OBJ_SLIDER_SUB_ID_INDICATOR_FORMAT_GET,
   ELM_OBJ_SLIDER_SUB_ID_HORIZONTAL_SET,
   ELM_OBJ_SLIDER_SUB_ID_HORIZONTAL_GET,
   ELM_OBJ_SLIDER_SUB_ID_MIN_MAX_SET,
   ELM_OBJ_SLIDER_SUB_ID_MIN_MAX_GET,
   ELM_OBJ_SLIDER_SUB_ID_VALUE_SET,
   ELM_OBJ_SLIDER_SUB_ID_VALUE_GET,
   ELM_OBJ_SLIDER_SUB_ID_INVERTED_SET,
   ELM_OBJ_SLIDER_SUB_ID_INVERTED_GET,
   ELM_OBJ_SLIDER_SUB_ID_INDICATOR_FORMAT_FUNCTION_SET,
   ELM_OBJ_SLIDER_SUB_ID_UNITS_FORMAT_FUNCTION_SET,
   ELM_OBJ_SLIDER_SUB_ID_INDICATOR_SHOW_SET,
   ELM_OBJ_SLIDER_SUB_ID_INDICATOR_SHOW_GET,
   ELM_OBJ_SLIDER_SUB_ID_LAST
};

#define ELM_OBJ_SLIDER_ID(sub_id) (ELM_OBJ_SLIDER_BASE_ID + sub_id)


/**
 * @def elm_obj_slider_span_size_set
 * @since 1.8
 *
 * Set the (exact) length of the bar region of a given slider widget.
 *
 * @param[in] size
 *
 * @see elm_slider_span_size_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_span_size_set(size) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_SPAN_SIZE_SET), EO_TYPECHECK(Evas_Coord, size)

/**
 * @def elm_obj_slider_span_size_get
 * @since 1.8
 *
 * Get the length set for the bar region of a given slider widget
 *
 * @param[out] ret
 *
 * @see elm_slider_span_size_get
 *
 * @ingroup Slider
 */
#define elm_obj_slider_span_size_get(ret) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_SPAN_SIZE_GET), EO_TYPECHECK(Evas_Coord *, ret)

/**
 * @def elm_obj_slider_unit_format_set
 * @since 1.8
 *
 * Set the format string for the unit label.
 *
 * @param[in] units
 *
 * @see elm_slider_unit_format_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_unit_format_set(units) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_UNIT_FORMAT_SET), EO_TYPECHECK(const char *, units)

/**
 * @def elm_obj_slider_unit_format_get
 * @since 1.8
 *
 * Get the unit label format of the slider.
 *
 * @param[out] ret
 *
 * @see elm_slider_unit_format_get
 *
 * @ingroup Slider
 */
#define elm_obj_slider_unit_format_get(ret) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_UNIT_FORMAT_GET), EO_TYPECHECK(const char **, ret)

/**
 * @def elm_obj_slider_indicator_format_set
 * @since 1.8
 *
 * Set the format string for the indicator label.
 *
 * @param[in] indicator
 *
 * @see elm_slider_indicator_format_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_indicator_format_set(indicator) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_INDICATOR_FORMAT_SET), EO_TYPECHECK(const char *, indicator)

/**
 * @def elm_obj_slider_indicator_format_get
 * @since 1.8
 *
 * Get the indicator label format of the slider.
 *
 * @param[out] ret
 *
 * @see elm_slider_indicator_format_get
 *
 * @ingroup Slider
 */
#define elm_obj_slider_indicator_format_get(ret) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_INDICATOR_FORMAT_GET), EO_TYPECHECK(const char **, ret)

/**
 * @def elm_obj_slider_horizontal_set
 * @since 1.8
 *
 * Set the orientation of a given slider widget.
 *
 * @param[in] horizontal
 *
 * @see elm_slider_horizontal_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_horizontal_set(horizontal) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal)

/**
 * @def elm_obj_slider_horizontal_get
 * @since 1.8
 *
 * Retrieve the orientation of a given slider widget
 *
 * @param[out] ret
 *
 * @see elm_slider_horizontal_get
 *
 * @ingroup Slider
 */
#define elm_obj_slider_horizontal_get(ret) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret)

/**
 * @def elm_obj_slider_min_max_set
 * @since 1.8
 *
 * Set the minimum and maximum values for the slider.
 *
 * @param[in] min
 * @param[in] max
 *
 * @see elm_slider_min_max_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_min_max_set(min, max) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_MIN_MAX_SET), EO_TYPECHECK(double, min), EO_TYPECHECK(double, max)

/**
 * @def elm_obj_slider_min_max_get
 * @since 1.8
 *
 * Get the minimum and maximum values of the slider.
 *
 * @param[out] min
 * @param[out] max
 *
 * @see elm_slider_min_max_get
 *
 * @ingroup Slider
 */
#define elm_obj_slider_min_max_get(min, max) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_MIN_MAX_GET), EO_TYPECHECK(double *, min), EO_TYPECHECK(double *, max)

/**
 * @def elm_obj_slider_value_set
 * @since 1.8
 *
 * Set the value the slider displays.
 *
 * @param[in] val
 *
 * @see elm_slider_value_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_value_set(val) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_VALUE_SET), EO_TYPECHECK(double, val)

/**
 * @def elm_obj_slider_value_get
 * @since 1.8
 *
 * Get the value displayed by the slider.
 *
 * @param[out] ret
 *
 * @see elm_slider_value_get
 *
 * @ingroup Slider
 */
#define elm_obj_slider_value_get(ret) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_VALUE_GET), EO_TYPECHECK(double *, ret)

/**
 * @def elm_obj_slider_inverted_set
 * @since 1.8
 *
 * Invert a given slider widget's displaying values order
 *
 * @param[in] inverted
 *
 * @see elm_slider_inverted_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_inverted_set(inverted) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_INVERTED_SET), EO_TYPECHECK(Eina_Bool, inverted)

/**
 * @def elm_obj_slider_inverted_get
 * @since 1.8
 *
 * Get whether a given slider widget's displaying values are
 * inverted or not.
 *
 * @param[out] ret
 *
 * @see elm_slider_inverted_get
 *
 * @ingroup Slider
 */
#define elm_obj_slider_inverted_get(ret) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_INVERTED_GET), EO_TYPECHECK(Eina_Bool *, ret)

/**
 * @def elm_obj_slider_indicator_format_function_set
 * @since 1.8
 *
 * Set the format function pointer for the indicator label
 *
 * @param[in] func
 * @param[in] free_func
 *
 * @see elm_slider_indicator_format_function_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_indicator_format_function_set(func, free_func) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_INDICATOR_FORMAT_FUNCTION_SET), EO_TYPECHECK(slider_func_type, func), EO_TYPECHECK(slider_freefunc_type, free_func)

/**
 * @def elm_obj_slider_units_format_function_set
 * @since 1.8
 *
 * Set the format function pointer for the units label
 *
 * @param[in] func
 * @param[in] free_func
 *
 * @see elm_slider_units_format_function_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_units_format_function_set(func, free_func) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_UNITS_FORMAT_FUNCTION_SET), EO_TYPECHECK(slider_func_type, func), EO_TYPECHECK(slider_freefunc_type, free_func)

/**
 * @def elm_obj_slider_indicator_show_set
 * @since 1.8
 *
 * Set whether to enlarge slider indicator (augmented knob) or not.
 *
 * @param[in] show
 *
 * @see elm_slider_indicator_show_set
 *
 * @ingroup Slider
 */
#define elm_obj_slider_indicator_show_set(show) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_INDICATOR_SHOW_SET), EO_TYPECHECK(Eina_Bool, show)

/**
 * @def elm_obj_slider_indicator_show_get
 * @since 1.8
 *
 * Get whether a given slider widget's enlarging indicator or not.
 *
 * @param[out] ret
 *
 * @see elm_slider_indicator_show_get
 *
 * @ingroup Slider
 */
#define elm_obj_slider_indicator_show_get(ret) ELM_OBJ_SLIDER_ID(ELM_OBJ_SLIDER_SUB_ID_INDICATOR_SHOW_GET), EO_TYPECHECK(Eina_Bool *, ret)