diff options
Diffstat (limited to 'src/lib/elementary/elm_slideshow_eo.h')
-rw-r--r-- | src/lib/elementary/elm_slideshow_eo.h | 408 |
1 files changed, 408 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_slideshow_eo.h b/src/lib/elementary/elm_slideshow_eo.h new file mode 100644 index 0000000..00dd7ae --- /dev/null +++ b/src/lib/elementary/elm_slideshow_eo.h | |||
@@ -0,0 +1,408 @@ | |||
1 | #ifndef _ELM_SLIDESHOW_EO_H_ | ||
2 | #define _ELM_SLIDESHOW_EO_H_ | ||
3 | |||
4 | #ifndef _ELM_SLIDESHOW_EO_CLASS_TYPE | ||
5 | #define _ELM_SLIDESHOW_EO_CLASS_TYPE | ||
6 | |||
7 | typedef Eo Elm_Slideshow; | ||
8 | |||
9 | #endif | ||
10 | |||
11 | #ifndef _ELM_SLIDESHOW_EO_TYPES | ||
12 | #define _ELM_SLIDESHOW_EO_TYPES | ||
13 | |||
14 | |||
15 | #endif | ||
16 | /** Elementary slideshow class | ||
17 | * | ||
18 | * @ingroup Elm_Slideshow | ||
19 | */ | ||
20 | #define ELM_SLIDESHOW_CLASS elm_slideshow_class_get() | ||
21 | |||
22 | EWAPI const Efl_Class *elm_slideshow_class_get(void); | ||
23 | |||
24 | /** | ||
25 | * @brief Set the number of items to cache, on a given slideshow widget, after | ||
26 | * the current item. | ||
27 | * | ||
28 | * The default value for this property is 2. See @ref Slideshow_Caching | ||
29 | * "slideshow caching" for more details. | ||
30 | * | ||
31 | * @param[in] obj The object. | ||
32 | * @param[in] count Number of items to cache after the current one. | ||
33 | * | ||
34 | * @ingroup Elm_Slideshow | ||
35 | */ | ||
36 | EOAPI void elm_obj_slideshow_cache_after_set(Eo *obj, int count); | ||
37 | |||
38 | /** | ||
39 | * @brief Get the number of items to cache, on a given slideshow widget, after | ||
40 | * the current item. | ||
41 | * | ||
42 | * @param[in] obj The object. | ||
43 | * | ||
44 | * @return Number of items to cache after the current one. | ||
45 | * | ||
46 | * @ingroup Elm_Slideshow | ||
47 | */ | ||
48 | EOAPI int elm_obj_slideshow_cache_after_get(const Eo *obj); | ||
49 | |||
50 | /** | ||
51 | * @brief Set the number of items to cache, on a given slideshow widget, before | ||
52 | * the current item. | ||
53 | * | ||
54 | * The default value for this property is 2. See @ref Slideshow_Caching | ||
55 | * "slideshow caching" for more details. | ||
56 | * | ||
57 | * @param[in] obj The object. | ||
58 | * @param[in] count Number of items to cache before the current one. | ||
59 | * | ||
60 | * @ingroup Elm_Slideshow | ||
61 | */ | ||
62 | EOAPI void elm_obj_slideshow_cache_before_set(Eo *obj, int count); | ||
63 | |||
64 | /** | ||
65 | * @brief Get the number of items to cache, on a given slideshow widget, before | ||
66 | * the current item. | ||
67 | * | ||
68 | * @param[in] obj The object. | ||
69 | * | ||
70 | * @return Number of items to cache before the current one. | ||
71 | * | ||
72 | * @ingroup Elm_Slideshow | ||
73 | */ | ||
74 | EOAPI int elm_obj_slideshow_cache_before_get(const Eo *obj); | ||
75 | |||
76 | /** | ||
77 | * @brief Set the current slide layout in use for a given slideshow widget | ||
78 | * | ||
79 | * If @c layout is implemented in @c obj's theme (i.e., is contained in the | ||
80 | * list returned by elm_slideshow_layouts_get()), this new images layout will | ||
81 | * be used on the widget. | ||
82 | * | ||
83 | * See @ref elm_obj_slideshow_layouts_get for more details. | ||
84 | * | ||
85 | * @param[in] obj The object. | ||
86 | * @param[in] layout The new layout's name string. | ||
87 | * | ||
88 | * @ingroup Elm_Slideshow | ||
89 | */ | ||
90 | EOAPI void elm_obj_slideshow_layout_set(Eo *obj, const char *layout); | ||
91 | |||
92 | /** | ||
93 | * @brief Get the current slide layout in use for a given slideshow widget. | ||
94 | * | ||
95 | * @param[in] obj The object. | ||
96 | * | ||
97 | * @return The new layout's name string. | ||
98 | * | ||
99 | * @ingroup Elm_Slideshow | ||
100 | */ | ||
101 | EOAPI const char *elm_obj_slideshow_layout_get(const Eo *obj); | ||
102 | |||
103 | /** | ||
104 | * @brief Set the current slide transition/effect in use for a given slideshow | ||
105 | * widget. | ||
106 | * | ||
107 | * If @c transition is implemented in @c obj's theme (i.e., is contained in the | ||
108 | * list returned by @ref elm_obj_slideshow_transitions_get), this new sliding | ||
109 | * effect will be used on the widget. | ||
110 | * | ||
111 | * @param[in] obj The object. | ||
112 | * @param[in] transition The new transition's name string. | ||
113 | * | ||
114 | * @ingroup Elm_Slideshow | ||
115 | */ | ||
116 | EOAPI void elm_obj_slideshow_transition_set(Eo *obj, const char *transition); | ||
117 | |||
118 | /** | ||
119 | * @brief Get the current slide transition/effect in use for a given slideshow | ||
120 | * widget. | ||
121 | * | ||
122 | * @param[in] obj The object. | ||
123 | * | ||
124 | * @return The new transition's name string. | ||
125 | * | ||
126 | * @ingroup Elm_Slideshow | ||
127 | */ | ||
128 | EOAPI const char *elm_obj_slideshow_transition_get(const Eo *obj); | ||
129 | |||
130 | /** | ||
131 | * @brief Set if the slideshow items should be displayed cyclically or not, so | ||
132 | * when the end is reached it will restart from the first item. | ||
133 | * | ||
134 | * @note This will affect the "automatic" slidshow behaviour and the | ||
135 | * @ref elm_obj_slideshow_next and @ref elm_obj_slideshow_previous functions as | ||
136 | * well. | ||
137 | * | ||
138 | * @param[in] obj The object. | ||
139 | * @param[in] loop Use @c true to make it cycle through items or @c false for | ||
140 | * it to stop at the end of @c obj's internal list of items. | ||
141 | * | ||
142 | * @ingroup Elm_Slideshow | ||
143 | */ | ||
144 | EOAPI void elm_obj_slideshow_items_loop_set(Eo *obj, Eina_Bool loop); | ||
145 | |||
146 | /** | ||
147 | * @brief Get if, after a slideshow is started, for a given slideshow widget, | ||
148 | * its items are to be displayed cyclically or not. | ||
149 | * | ||
150 | * @param[in] obj The object. | ||
151 | * | ||
152 | * @return Use @c true to make it cycle through items or @c false for it to | ||
153 | * stop at the end of @c obj's internal list of items. | ||
154 | * | ||
155 | * @ingroup Elm_Slideshow | ||
156 | */ | ||
157 | EOAPI Eina_Bool elm_obj_slideshow_items_loop_get(const Eo *obj); | ||
158 | |||
159 | /** | ||
160 | * @brief Set the interval between each image transition on a given slideshow | ||
161 | * widget and start the slideshow itself. | ||
162 | * | ||
163 | * After this call, the slideshow widget will start cycling its view, | ||
164 | * sequentially and automatically, with the images of the items it has. The | ||
165 | * time between each new image displayed is going to be @c timeout, in seconds. | ||
166 | * If a different timeout was set previously and an slideshow was in progress, | ||
167 | * it will continue with the new time between transitions, after this call. | ||
168 | * | ||
169 | * @note A value less than or equal to 0 on @c timeout will disable the | ||
170 | * widget's internal timer, thus halting any slideshow which could be happening | ||
171 | * on @c obj. | ||
172 | * | ||
173 | * @param[in] obj The object. | ||
174 | * @param[in] timeout The new displaying timeout for images. | ||
175 | * | ||
176 | * @ingroup Elm_Slideshow | ||
177 | */ | ||
178 | EOAPI void elm_obj_slideshow_timeout_set(Eo *obj, double timeout); | ||
179 | |||
180 | /** | ||
181 | * @brief Get the interval set for image transitions on a given slideshow | ||
182 | * widget. | ||
183 | * | ||
184 | * @param[in] obj The object. | ||
185 | * | ||
186 | * @return The new displaying timeout for images. | ||
187 | * | ||
188 | * @ingroup Elm_Slideshow | ||
189 | */ | ||
190 | EOAPI double elm_obj_slideshow_timeout_get(const Eo *obj); | ||
191 | |||
192 | /** | ||
193 | * @brief Get the internal list of items in a given slideshow widget. | ||
194 | * | ||
195 | * This list is not to be modified in any way and must not be freed. | ||
196 | * | ||
197 | * @warning This list is only valid until @c obj object's internal items list | ||
198 | * is changed. It should be fetched again with another call to this function | ||
199 | * when changes happen. | ||
200 | * | ||
201 | * @param[in] obj The object. | ||
202 | * | ||
203 | * @return The list of items (#Elm.Widget.Item as data) or @c null on errors. | ||
204 | * | ||
205 | * @ingroup Elm_Slideshow | ||
206 | */ | ||
207 | EOAPI const Eina_List *elm_obj_slideshow_items_get(const Eo *obj); | ||
208 | |||
209 | /** | ||
210 | * @brief Returns the list of sliding transition/effect names available, for a | ||
211 | * given slideshow widget. | ||
212 | * | ||
213 | * The transitions, which come from @c obj's theme, must be an EDC data item | ||
214 | * named $"transitions" on the theme file, with (prefix) names of EDC programs | ||
215 | * actually implementing them. | ||
216 | * | ||
217 | * The available transitions for slideshows on the default theme are "fade" | ||
218 | * (the current item fades out, while the new one fades in to the slideshow's | ||
219 | * viewport), "black_fade" (the current item fades to black, and just then, the | ||
220 | * new item will fade in), "horizontal" (the current item slides horizontally, | ||
221 | * until it gets out of the slideshow's viewport, while the new item comes from | ||
222 | * the left to take its place), "vertical" (the current item slides vertically, | ||
223 | * until it gets out of the slideshow's viewport, while the new item comes from | ||
224 | * the bottom to take its place), "square" (the new item starts to appear from | ||
225 | * the middle of the current one, but with a tiny size, growing until its | ||
226 | * target (full) size and covering the old one. | ||
227 | * | ||
228 | * @warning The stringshared strings get no new references exclusive to the | ||
229 | * user grabbing the list, here, so if you'd like to use them out of this | ||
230 | * call's context, you'd better @ref eina_stringshare_ref them. Also the list | ||
231 | * is an internal list and so is only valid for as long as the slideshow object | ||
232 | * is valid and has not internally changed its list for some reason, so make a | ||
233 | * copy if you need it around. | ||
234 | * | ||
235 | * @param[in] obj The object. | ||
236 | * | ||
237 | * @return The list of transitions (list of stringshared strings as data). | ||
238 | * | ||
239 | * @ingroup Elm_Slideshow | ||
240 | */ | ||
241 | EOAPI const Eina_List *elm_obj_slideshow_transitions_get(const Eo *obj); | ||
242 | |||
243 | /** | ||
244 | * @brief Get the number of items stored in a given slideshow widget. | ||
245 | * | ||
246 | * @param[in] obj The object. | ||
247 | * | ||
248 | * @return The number of items on @c obj, at the moment of this call. | ||
249 | * | ||
250 | * @ingroup Elm_Slideshow | ||
251 | */ | ||
252 | EOAPI unsigned int elm_obj_slideshow_count_get(const Eo *obj); | ||
253 | |||
254 | /** | ||
255 | * @brief Returns the currently displayed item, in a given slideshow widget. | ||
256 | * | ||
257 | * @param[in] obj The object. | ||
258 | * | ||
259 | * @return A handle to the item being displayed in @c obj or @c null, if none | ||
260 | * is (and on errors) | ||
261 | * | ||
262 | * @ingroup Elm_Slideshow | ||
263 | */ | ||
264 | EOAPI Elm_Widget_Item *elm_obj_slideshow_item_current_get(const Eo *obj); | ||
265 | |||
266 | /** | ||
267 | * @brief Returns the list of layout names available, for a given slideshow | ||
268 | * widget. | ||
269 | * | ||
270 | * Slideshow layouts will change how the widget is to dispose each image item | ||
271 | * in its viewport, with regard to cropping, scaling, etc. | ||
272 | * | ||
273 | * The layouts, which come from @c obj's theme, must be an EDC data item name | ||
274 | * $"layouts" on the theme file, with (prefix) names of EDC programs actually | ||
275 | * implementing them. | ||
276 | * | ||
277 | * The available layouts for slideshows on the default theme are "fullscreen" | ||
278 | * (item images with original aspect, scaled to touch top and down slideshow | ||
279 | * borders or, if the image's height is not enough, left and right slideshow | ||
280 | * borders) and "not_fullscreen" (the same behavior as the "fullscreen" one, | ||
281 | * but always leaving 10% of the slideshow's dimensions of distance between the | ||
282 | * item image's borders and the slideshow borders, for each axis)- | ||
283 | * | ||
284 | * @warning The stringshared strings get no new references exclusive to the | ||
285 | * user grabbing the list, here, so if you'd like to use them out of this | ||
286 | * call's context, you'd better @ref eina_stringshare_ref them. | ||
287 | * | ||
288 | * @param[in] obj The object. | ||
289 | * | ||
290 | * @return The list of layouts (list of stringshared strings as data) | ||
291 | * | ||
292 | * @ingroup Elm_Slideshow | ||
293 | */ | ||
294 | EOAPI const Eina_List *elm_obj_slideshow_layouts_get(const Eo *obj); | ||
295 | |||
296 | /** | ||
297 | * @brief Slide to the previous item, in a given slideshow widget | ||
298 | * | ||
299 | * The sliding animation @c obj is set to use will be the transition effect | ||
300 | * used, after this call is issued. | ||
301 | * | ||
302 | * @note If the beginning of the slideshow's internal list of items is reached, | ||
303 | * it'll wrap around to the list's end, again. | ||
304 | * @param[in] obj The object. | ||
305 | * | ||
306 | * @ingroup Elm_Slideshow | ||
307 | */ | ||
308 | EOAPI void elm_obj_slideshow_previous(Eo *obj); | ||
309 | |||
310 | /** | ||
311 | * @brief Get the the item, in a given slideshow widget, placed at position | ||
312 | * @c nth, in its internal items list. | ||
313 | * | ||
314 | * @param[in] obj The object. | ||
315 | * @param[in] nth The number of the item to grab a handle to (0 being the | ||
316 | * first). | ||
317 | * | ||
318 | * @return The item stored in @c obj at position @c nth or @c null if there's | ||
319 | * no item with that index (and on errors). | ||
320 | * | ||
321 | * @ingroup Elm_Slideshow | ||
322 | */ | ||
323 | EOAPI Elm_Widget_Item *elm_obj_slideshow_item_nth_get(const Eo *obj, unsigned int nth); | ||
324 | |||
325 | /** | ||
326 | * @brief Slide to the next item, in a given slideshow widget. | ||
327 | * | ||
328 | * The sliding animation @c obj is set to use will be the transition effect | ||
329 | * used, after this call is issued. | ||
330 | * | ||
331 | * @note If the end of the slideshow's internal list of items is reached, it'll | ||
332 | * wrap around to the list's beginning, again. | ||
333 | * @param[in] obj The object. | ||
334 | * | ||
335 | * @ingroup Elm_Slideshow | ||
336 | */ | ||
337 | EOAPI void elm_obj_slideshow_next(Eo *obj); | ||
338 | |||
339 | /** | ||
340 | * @brief Remove all items from a given slideshow widget. | ||
341 | * | ||
342 | * This removes (and deletes) all items in @c obj, leaving it empty. | ||
343 | * @param[in] obj The object. | ||
344 | * | ||
345 | * @ingroup Elm_Slideshow | ||
346 | */ | ||
347 | EOAPI void elm_obj_slideshow_clear(Eo *obj); | ||
348 | |||
349 | /** | ||
350 | * @brief Add (append) a new item in a given slideshow widget. | ||
351 | * | ||
352 | * Add a new item to @c obj's internal list of items, appending it. The item's | ||
353 | * class must contain the function really fetching the image object to show for | ||
354 | * this item, which could be an Evas image object or an Elementary photo, for | ||
355 | * example. The @c data parameter is going to be passed to both class functions | ||
356 | * of the item. | ||
357 | * | ||
358 | * @param[in] obj The object. | ||
359 | * @param[in] itc The item class for the item. | ||
360 | * @param[in] data The item's data. | ||
361 | * | ||
362 | * @return A handle to the item added or @c null on errors. | ||
363 | * | ||
364 | * @ingroup Elm_Slideshow | ||
365 | */ | ||
366 | EOAPI Elm_Widget_Item *elm_obj_slideshow_item_add(Eo *obj, const Elm_Slideshow_Item_Class *itc, const void *data); | ||
367 | |||
368 | /** | ||
369 | * @brief Insert a new item into the given slideshow widget, using the @c func | ||
370 | * function to sort items (by item handles). | ||
371 | * | ||
372 | * Add a new item to @c obj's internal list of items, in a position determined | ||
373 | * by the @c func comparing function. The item's class must contain the | ||
374 | * function really fetching the image object to show for this item, which could | ||
375 | * be an Evas image object or an Elementary photo, for example. The @c data | ||
376 | * parameter is going to be passed to both class functions of the item. | ||
377 | * | ||
378 | * @param[in] obj The object. | ||
379 | * @param[in] itc The item class for the item. | ||
380 | * @param[in] data The item's data. | ||
381 | * @param[in] func The comparing function to be used to sort the slideshow | ||
382 | * items by #Elm_Slideshow_Item_Class item handles. | ||
383 | * | ||
384 | * @return Returns The slideshow item handle, on success, or @c null on errors. | ||
385 | * | ||
386 | * @ingroup Elm_Slideshow | ||
387 | */ | ||
388 | EOAPI Elm_Widget_Item *elm_obj_slideshow_item_sorted_insert(Eo *obj, const Elm_Slideshow_Item_Class *itc, const void *data, Eina_Compare_Cb func); | ||
389 | |||
390 | EWAPI extern const Efl_Event_Description _ELM_SLIDESHOW_EVENT_CHANGED; | ||
391 | |||
392 | /** Called when slideshow widget changed | ||
393 | * @return Efl_Object * | ||
394 | * | ||
395 | * @ingroup Elm_Slideshow | ||
396 | */ | ||
397 | #define ELM_SLIDESHOW_EVENT_CHANGED (&(_ELM_SLIDESHOW_EVENT_CHANGED)) | ||
398 | |||
399 | EWAPI extern const Efl_Event_Description _ELM_SLIDESHOW_EVENT_TRANSITION_END; | ||
400 | |||
401 | /** Called on transition end | ||
402 | * @return Efl_Object * | ||
403 | * | ||
404 | * @ingroup Elm_Slideshow | ||
405 | */ | ||
406 | #define ELM_SLIDESHOW_EVENT_TRANSITION_END (&(_ELM_SLIDESHOW_EVENT_TRANSITION_END)) | ||
407 | |||
408 | #endif | ||