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