58985e144a62577c68a2e7132cfa4dfa5fb55b5d
[framework/uifw/elementary.git] / src / lib / elm_transit.h
1 /**
2  *
3  * @defgroup Transit Transit
4  * @ingroup Elementary
5  *
6  * Transit is designed to apply various animated transition effects to @c
7  * Evas_Object, such like translation, rotation, etc. For using these
8  * effects, create an @ref Elm_Transit and add the desired transition effects.
9  *
10  * Once the effects are added into transit, they will be automatically
11 <<<<<<< HEAD
12  * managed (their callback will be called until the duration is ended, and
13  * they will be deleted on completion).
14 =======
15  * managed (their callback will be called for the set duration and
16  * they will be deleted upon completion).
17 >>>>>>> remotes/origin/upstream
18  *
19  * Example:
20  * @code
21  * Elm_Transit *trans = elm_transit_add();
22  * elm_transit_object_add(trans, obj);
23  * elm_transit_effect_translation_add(trans, 0, 0, 280, 280
24  * elm_transit_duration_set(transit, 1);
25  * elm_transit_auto_reverse_set(transit, EINA_TRUE);
26  * elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE);
27  * elm_transit_repeat_times_set(transit, 3);
28  * @endcode
29  *
30  * Some transition effects are used to change the properties of objects. They
31  * are:
32  * @li @ref elm_transit_effect_translation_add
33  * @li @ref elm_transit_effect_color_add
34  * @li @ref elm_transit_effect_rotation_add
35  * @li @ref elm_transit_effect_wipe_add
36  * @li @ref elm_transit_effect_zoom_add
37  * @li @ref elm_transit_effect_resizing_add
38  *
39  * Other transition effects are used to make one object disappear and another
40 <<<<<<< HEAD
41  * object appear on its old place. These effects are:
42 =======
43  * object appear on its place. These effects are:
44 >>>>>>> remotes/origin/upstream
45  *
46  * @li @ref elm_transit_effect_flip_add
47  * @li @ref elm_transit_effect_resizable_flip_add
48  * @li @ref elm_transit_effect_fade_add
49  * @li @ref elm_transit_effect_blend_add
50  *
51  * It's also possible to make a transition chain with @ref
52  * elm_transit_chain_transit_add.
53  *
54  * @warning We strongly recommend to use elm_transit just when edje can not do
55 <<<<<<< HEAD
56  * the trick. Edje has more advantage than Elm_Transit, it has more flexibility and
57  * animations can be manipulated inside the theme.
58 =======
59  * the trick. Edje is better at handling transitions than Elm_Transit.
60  * Edje has more flexibility and animations can be manipulated inside the theme.
61 >>>>>>> remotes/origin/upstream
62  *
63  * List of examples:
64  * @li @ref transit_example_01_explained
65  * @li @ref transit_example_02_explained
66  * @li @ref transit_example_03_c
67  * @li @ref transit_example_04_c
68  *
69  * @{
70  */
71
72 /**
73  * @enum Elm_Transit_Tween_Mode
74  *
75  * The type of acceleration used in the transition.
76  */
77 typedef enum
78 {
79    ELM_TRANSIT_TWEEN_MODE_LINEAR, /**< Constant speed */
80    ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL, /**< Starts slow, increase speed
81                                          over time, then decrease again
82                                          and stop slowly */
83    ELM_TRANSIT_TWEEN_MODE_DECELERATE, /**< Starts fast and decrease
84                                          speed over time */
85    ELM_TRANSIT_TWEEN_MODE_ACCELERATE /**< Starts slow and increase speed
86                                         over time */
87 } Elm_Transit_Tween_Mode;
88
89 /**
90  * @enum Elm_Transit_Effect_Flip_Axis
91  *
92 <<<<<<< HEAD
93  * The axis where flip effect should be applied.
94 =======
95  * The axis along which flip effect should be applied.
96 >>>>>>> remotes/origin/upstream
97  */
98 typedef enum
99 {
100    ELM_TRANSIT_EFFECT_FLIP_AXIS_X, /**< Flip on X axis */
101    ELM_TRANSIT_EFFECT_FLIP_AXIS_Y /**< Flip on Y axis */
102 } Elm_Transit_Effect_Flip_Axis;
103
104 /**
105  * @enum Elm_Transit_Effect_Wipe_Dir
106  *
107 <<<<<<< HEAD
108  * The direction where the wipe effect should occur.
109 =======
110  * The direction in which the wipe effect should occur.
111 >>>>>>> remotes/origin/upstream
112  */
113 typedef enum
114 {
115    ELM_TRANSIT_EFFECT_WIPE_DIR_LEFT, /**< Wipe to the left */
116    ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT, /**< Wipe to the right */
117    ELM_TRANSIT_EFFECT_WIPE_DIR_UP, /**< Wipe up */
118    ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN /**< Wipe down */
119 } Elm_Transit_Effect_Wipe_Dir;
120
121 /** @enum Elm_Transit_Effect_Wipe_Type
122  *
123  * Whether the wipe effect should show or hide the object.
124  */
125 typedef enum
126 {
127    ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE, /**< Hide the object during the
128                                          animation */
129    ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW /**< Show the object during the
130                                         animation */
131 } Elm_Transit_Effect_Wipe_Type;
132
133 /**
134  * @typedef Elm_Transit
135  *
136  * The Transit created with elm_transit_add(). This type has the information
137  * about the objects which the transition will be applied, and the
138  * transition effects that will be used. It also contains info about
139  * duration, number of repetitions, auto-reverse, etc.
140  */
141 typedef struct _Elm_Transit Elm_Transit;
142 typedef void                Elm_Transit_Effect;
143
144 /**
145  * @typedef Elm_Transit_Effect_Transition_Cb
146  *
147  * Transition callback called for this effect on each transition iteration.
148  */
149 typedef void (*Elm_Transit_Effect_Transition_Cb)(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress);
150
151 /**
152  * Elm_Transit_Effect_End_Cb
153  *
154  * Transition callback called for this effect when the transition is over.
155  */
156 typedef void (*Elm_Transit_Effect_End_Cb)(Elm_Transit_Effect *effect, Elm_Transit *transit);
157
158 /**
159  * Elm_Transit_Del_Cb
160  *
161  * A callback called when the transit is deleted.
162  */
163 typedef void (*Elm_Transit_Del_Cb)(void *data, Elm_Transit *transit);
164
165 /**
166 <<<<<<< HEAD
167  * Add new transit.
168  *
169  * @note Is not necessary to delete the transit object, it will be deleted at
170  * the end of its operation.
171  * @note The transit will start playing when the program enter in the main loop, is not
172  * necessary to give a start to the transit.
173 =======
174  * Create new transit.
175  *
176  * @note It is not necessary to delete the transit object, it will be deleted at
177  * the end of its operation.
178  * @note The transit will start playing when the program enters the main loop.
179 >>>>>>> remotes/origin/upstream
180  *
181  * @return The transit object.
182  *
183  * @ingroup Transit
184  */
185 EAPI Elm_Transit           *elm_transit_add(void);
186
187 /**
188  * Stops the animation and delete the @p transit object.
189  *
190 <<<<<<< HEAD
191  * Call this function if you wants to stop the animation before the duration
192  * time. Make sure the @p transit object is still alive with
193  * elm_transit_del_cb_set() function.
194  * All added effects will be deleted, calling its repective data_free_cb
195  * functions. The function setted by elm_transit_del_cb_set() will be called.
196 =======
197  * Call this function if you want to stop the animation before the 
198  * transit time. Make sure the @p transit object is still alive with
199  * elm_transit_del_cb_set() function.
200  * All added effects will be deleted, calling its respective data_free_cb
201  * functions. The function set by elm_transit_del_cb_set() will be called.
202 >>>>>>> remotes/origin/upstream
203  *
204  * @see elm_transit_del_cb_set()
205  *
206  * @param transit The transit object to be deleted.
207  *
208  * @ingroup Transit
209 <<<<<<< HEAD
210  * @warning Just call this function if you are sure the transit is alive.
211 =======
212 >>>>>>> remotes/origin/upstream
213  */
214 EAPI void                   elm_transit_del(Elm_Transit *transit);
215
216 /**
217  * Add a new effect to the transit.
218  *
219 <<<<<<< HEAD
220  * @note The cb function and the data are the key to the effect. If you try to
221  * add an already added effect, nothing is done.
222  * @note After the first addition of an effect in @p transit, if its
223  * effect list become empty again, the @p transit will be killed by
224  * elm_transit_del(transit) function.
225  *
226  * Exemple:
227 =======
228  * @note The cb function and the data are the key to the effect. 
229  * If you try to add an existing effect, nothing is done.
230  * @note After the first addition of an effect to @p transit, if its
231  * effect list become empty again, the @p transit will be killed by
232  * elm_transit_del(transit) function.
233  *
234  * Example:
235 >>>>>>> remotes/origin/upstream
236  * @code
237  * Elm_Transit *transit = elm_transit_add();
238  * elm_transit_effect_add(transit,
239  *                        elm_transit_effect_blend_op,
240  *                        elm_transit_effect_blend_context_new(),
241  *                        elm_transit_effect_blend_context_free);
242  * @endcode
243  *
244  * @param transit The transit object.
245  * @param transition_cb The operation function. It is called when the
246  * animation begins, it is the function that actually performs the animation.
247  * It is called with the @p data, @p transit and the time progression of the
248  * animation (a double value between 0.0 and 1.0).
249  * @param effect The context data of the effect.
250  * @param end_cb The function to free the context data, it will be called
251  * at the end of the effect, it must finalize the animation and free the
252  * @p data.
253  *
254  * @ingroup Transit
255 <<<<<<< HEAD
256  * @warning The transit free the context data at the and of the transition with
257  * the data_free_cb function, do not use the context data in another transit.
258 =======
259  * @warning The transit will free the context data at the and of the 
260  * transition with the data_free_cb function. 
261  * Do not share the context data in between different transit objects.
262 >>>>>>> remotes/origin/upstream
263  */
264 EAPI void                   elm_transit_effect_add(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect, Elm_Transit_Effect_End_Cb end_cb);
265
266 /**
267  * Delete an added effect.
268  *
269  * This function will remove the effect from the @p transit, calling the
270  * data_free_cb to free the @p data.
271  *
272  * @see elm_transit_effect_add()
273  *
274  * @note If the effect is not found, nothing is done.
275  * @note If the effect list become empty, this function will call
276 <<<<<<< HEAD
277  * elm_transit_del(transit), that is, it will kill the @p transit.
278 =======
279  * elm_transit_del(transit), i.e., it will kill the @p transit.
280 >>>>>>> remotes/origin/upstream
281  *
282  * @param transit The transit object.
283  * @param transition_cb The operation function.
284  * @param effect The context data of the effect.
285  *
286  * @ingroup Transit
287  */
288 EAPI void                   elm_transit_effect_del(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect);
289
290 /**
291  * Add new object to apply the effects.
292  *
293 <<<<<<< HEAD
294  * @note After the first addition of an object in @p transit, if its
295  * object list become empty again, the @p transit will be killed by
296  * elm_transit_del(transit) function.
297  * @note If the @p obj belongs to another transit, the @p obj will be
298  * removed from it and it will only belong to the @p transit. If the old
299  * transit stays without objects, it will die.
300  * @note When you add an object into the @p transit, its state from
301  * evas_object_pass_events_get(obj) is saved, and it is applied when the
302  * transit ends, if you change this state whith evas_object_pass_events_set()
303  * after add the object, this state will change again when @p transit stops to
304  * run.
305 =======
306  * @note After the first addition of an object to @p transit, if its
307  * object list become empty again, the @p transit will be killed by
308  * elm_transit_del(transit) function.
309  * @note If the @p obj belongs to another transit, the @p obj will be
310  * removed from it and it will only belong to the other @p transit. 
311  * If the old transit stays without objects, it will die.
312  * @note When you add an object into the @p transit, its state from
313  * evas_object_pass_events_get(obj) is saved, and it is applied when the
314  * transit ends, if you change this state with evas_object_pass_events_set()
315  * after add the object, this state will change again when @p transit stops.
316 >>>>>>> remotes/origin/upstream
317  *
318  * @param transit The transit object.
319  * @param obj Object to be animated.
320  *
321  * @ingroup Transit
322 <<<<<<< HEAD
323  * @warning It is not allowed to add a new object after transit begins to go.
324 =======
325  * @warning It is not allowed to add a new object after transit begins.
326 >>>>>>> remotes/origin/upstream
327  */
328 EAPI void                   elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj);
329
330 /**
331  * Removes an added object from the transit.
332  *
333  * @note If the @p obj is not in the @p transit, nothing is done.
334  * @note If the list become empty, this function will call
335 <<<<<<< HEAD
336  * elm_transit_del(transit), that is, it will kill the @p transit.
337 =======
338  * elm_transit_del(transit), i.e., it will kill the @p transit.
339 >>>>>>> remotes/origin/upstream
340  *
341  * @param transit The transit object.
342  * @param obj Object to be removed from @p transit.
343  *
344  * @ingroup Transit
345 <<<<<<< HEAD
346  * @warning It is not allowed to remove objects after transit begins to go.
347 =======
348  * @warning It is not allowed to remove objects after transit begins.
349 >>>>>>> remotes/origin/upstream
350  */
351 EAPI void                   elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj);
352
353 /**
354  * Get the objects of the transit.
355  *
356  * @param transit The transit object.
357  * @return a Eina_List with the objects from the transit.
358  *
359  * @ingroup Transit
360  */
361 EAPI const Eina_List       *elm_transit_objects_get(const Elm_Transit *transit);
362
363 /**
364  * Enable/disable keeping up the objects states.
365  * If it is not kept, the objects states will be reset when transition ends.
366  *
367  * @note @p transit can not be NULL.
368  * @note One state includes geometry, color, map data.
369  *
370  * @param transit The transit object.
371 <<<<<<< HEAD
372  * @param state_keep Keeping or Non Keeping.
373 =======
374  * @param state_keep retain the state or not.
375 >>>>>>> remotes/origin/upstream
376  *
377  * @ingroup Transit
378  */
379 EAPI void                   elm_transit_objects_final_state_keep_set(Elm_Transit *transit, Eina_Bool state_keep);
380
381 /**
382  * Get a value whether the objects states will be reset or not.
383  *
384  * @note @p transit can not be NULL
385  *
386  * @see elm_transit_objects_final_state_keep_set()
387  *
388  * @param transit The transit object.
389  * @return EINA_TRUE means the states of the objects will be reset.
390  * If @p transit is NULL, EINA_FALSE is returned
391  *
392  * @ingroup Transit
393  */
394 EAPI Eina_Bool              elm_transit_objects_final_state_keep_get(const Elm_Transit *transit);
395
396 /**
397  * Set the event enabled when transit is operating.
398  *
399 <<<<<<< HEAD
400  * If @p enabled is EINA_TRUE, the objects of the transit will receives
401  * events from mouse and keyboard during the animation.
402  * @note When you add an object with elm_transit_object_add(), its state from
403  * evas_object_pass_events_get(obj) is saved, and it is applied when the
404  * transit ends, if you change this state with evas_object_pass_events_set()
405 =======
406  * If @p enabled is EINA_TRUE, the objects of the transit will receive
407  * events from mouse and keyboard during the animation.
408  * @note When you add an object with elm_transit_object_add(), its state from
409  * evas_object_freeze_events_get(obj) is saved, and it is applied when the
410  * transit ends. If you change this state with evas_object_freeze_events_set()
411 >>>>>>> remotes/origin/upstream
412  * after adding the object, this state will change again when @p transit stops
413  * to run.
414  *
415  * @param transit The transit object.
416  * @param enabled Events are received when enabled is @c EINA_TRUE, and
417  * ignored otherwise.
418  *
419  * @ingroup Transit
420  */
421 EAPI void                   elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled);
422
423 /**
424  * Get the value of event enabled status.
425  *
426  * @see elm_transit_event_enabled_set()
427  *
428  * @param transit The Transit object
429  * @return EINA_TRUE, when event is enabled. If @p transit is NULL
430  * EINA_FALSE is returned
431  *
432  * @ingroup Transit
433  */
434 EAPI Eina_Bool              elm_transit_event_enabled_get(const Elm_Transit *transit);
435
436 /**
437  * Set the user-callback function when the transit is deleted.
438  *
439 <<<<<<< HEAD
440  * @note Using this function twice will overwrite the first function setted.
441 =======
442  * @note Using this function twice will overwrite the first function set.
443 >>>>>>> remotes/origin/upstream
444  * @note the @p transit object will be deleted after call @p cb function.
445  *
446  * @param transit The transit object.
447  * @param cb Callback function pointer. This function will be called before
448  * the deletion of the transit.
449 <<<<<<< HEAD
450  * @param data Callback funtion user data. It is the @p op parameter.
451 =======
452  * @param data Callback function user data. It is the @p op parameter.
453 >>>>>>> remotes/origin/upstream
454  *
455  * @ingroup Transit
456  */
457 EAPI void                   elm_transit_del_cb_set(Elm_Transit *transit, Elm_Transit_Del_Cb cb, void *data);
458
459 /**
460  * Set reverse effect automatically.
461  *
462 <<<<<<< HEAD
463  * If auto reverse is setted, after running the effects with the progress
464  * parameter from 0 to 1, it will call the effecs again with the progress
465  * from 1 to 0. The transit will last for a time iqual to (2 * duration * repeat),
466  * where the duration was setted with the function elm_transit_add and
467 =======
468  * If auto reverse is set, after running the effects with the progress
469  * parameter from 0 to 1, it will call the effects again with the progress
470  * from 1 to 0. The transit will last for a time equal to (2 * duration * repeat),
471  * where the duration was set with the function elm_transit_add and
472 >>>>>>> remotes/origin/upstream
473  * the repeat with the function elm_transit_repeat_times_set().
474  *
475  * @param transit The transit object.
476  * @param reverse EINA_TRUE means the auto_reverse is on.
477  *
478  * @ingroup Transit
479  */
480 EAPI void                   elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse);
481
482 /**
483  * Get if the auto reverse is on.
484  *
485  * @see elm_transit_auto_reverse_set()
486  *
487  * @param transit The transit object.
488  * @return EINA_TRUE means auto reverse is on. If @p transit is NULL
489  * EINA_FALSE is returned
490  *
491  * @ingroup Transit
492  */
493 EAPI Eina_Bool              elm_transit_auto_reverse_get(const Elm_Transit *transit);
494
495 /**
496  * Set the transit repeat count. Effect will be repeated by repeat count.
497  *
498  * This function sets the number of repetition the transit will run after
499 <<<<<<< HEAD
500  * the first one, that is, if @p repeat is 1, the transit will run 2 times.
501 =======
502  * the first one, i.e., if @p repeat is 1, the transit will run 2 times.
503 >>>>>>> remotes/origin/upstream
504  * If the @p repeat is a negative number, it will repeat infinite times.
505  *
506  * @note If this function is called during the transit execution, the transit
507  * will run @p repeat times, ignoring the times it already performed.
508  *
509  * @param transit The transit object
510  * @param repeat Repeat count
511  *
512  * @ingroup Transit
513  */
514 EAPI void                   elm_transit_repeat_times_set(Elm_Transit *transit, int repeat);
515
516 /**
517  * Get the transit repeat count.
518  *
519  * @see elm_transit_repeat_times_set()
520  *
521  * @param transit The Transit object.
522  * @return The repeat count. If @p transit is NULL
523  * 0 is returned
524  *
525  * @ingroup Transit
526  */
527 EAPI int                    elm_transit_repeat_times_get(const Elm_Transit *transit);
528
529 /**
530  * Set the transit animation acceleration type.
531  *
532  * This function sets the tween mode of the transit that can be:
533  * ELM_TRANSIT_TWEEN_MODE_LINEAR - The default mode.
534  * ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Starts in accelerate mode and ends decelerating.
535  * ELM_TRANSIT_TWEEN_MODE_DECELERATE - The animation will be slowed over time.
536  * ELM_TRANSIT_TWEEN_MODE_ACCELERATE - The animation will accelerate over time.
537  *
538  * @param transit The transit object.
539  * @param tween_mode The tween type.
540  *
541  * @ingroup Transit
542  */
543 EAPI void                   elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode);
544
545 /**
546  * Get the transit animation acceleration type.
547  *
548  * @note @p transit can not be NULL
549  *
550  * @param transit The transit object.
551  * @return The tween type. If @p transit is NULL
552  * ELM_TRANSIT_TWEEN_MODE_LINEAR is returned.
553  *
554  * @ingroup Transit
555  */
556 EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit *transit);
557
558 /**
559  * Set the transit animation time
560  *
561  * @note @p transit can not be NULL
562  *
563  * @param transit The transit object.
564  * @param duration The animation time.
565  *
566  * @ingroup Transit
567  */
568 EAPI void                   elm_transit_duration_set(Elm_Transit *transit, double duration);
569
570 /**
571  * Get the transit animation time
572  *
573  * @note @p transit can not be NULL
574  *
575  * @param transit The transit object.
576  *
577  * @return The transit animation time.
578  *
579  * @ingroup Transit
580  */
581 EAPI double                 elm_transit_duration_get(const Elm_Transit *transit);
582
583 /**
584  * Starts the transition.
585  * Once this API is called, the transit begins to measure the time.
586  *
587  * @note @p transit can not be NULL
588  *
589  * @param transit The transit object.
590  *
591  * @ingroup Transit
592  */
593 EAPI void                   elm_transit_go(Elm_Transit *transit);
594
595 /**
596  * Pause/Resume the transition.
597  *
598  * If you call elm_transit_go again, the transit will be started from the
599 <<<<<<< HEAD
600  * beginning, and will be unpaused.
601 =======
602  * beginning, and will be played.
603 >>>>>>> remotes/origin/upstream
604  *
605  * @note @p transit can not be NULL
606  *
607  * @param transit The transit object.
608  * @param paused Whether the transition should be paused or not.
609  *
610  * @ingroup Transit
611  */
612 EAPI void                   elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused);
613
614 /**
615  * Get the value of paused status.
616  *
617  * @see elm_transit_paused_set()
618  *
619  * @note @p transit can not be NULL
620  *
621  * @param transit The transit object.
622  * @return EINA_TRUE means transition is paused. If @p transit is NULL
623  * EINA_FALSE is returned
624  *
625  * @ingroup Transit
626  */
627 EAPI Eina_Bool              elm_transit_paused_get(const Elm_Transit *transit);
628
629 /**
630  * Get the time progression of the animation (a double value between 0.0 and 1.0).
631  *
632  * The value returned is a fraction (current time / total time). It
633  * represents the progression position relative to the total.
634  *
635  * @note @p transit can not be NULL
636  *
637  * @param transit The transit object.
638  *
639  * @return The time progression value. If @p transit is NULL
640  * 0 is returned
641  *
642  * @ingroup Transit
643  */
644 EAPI double                 elm_transit_progress_value_get(const Elm_Transit *transit);
645
646 /**
647  * Makes the chain relationship between two transits.
648  *
649  * @note @p transit can not be NULL. Transit would have multiple chain transits.
650  * @note @p chain_transit can not be NULL. Chain transits could be chained to the only one transit.
651  *
652  * @param transit The transit object.
653  * @param chain_transit The chain transit object. This transit will be operated
654  *        after transit is done.
655  *
656  * This function adds @p chain_transit transition to a chain after the @p
657  * transit, and will be started as soon as @p transit ends. See @ref
658  * transit_example_02_explained for a full example.
659  *
660  * @ingroup Transit
661  */
662 EAPI void                   elm_transit_chain_transit_add(Elm_Transit *transit, Elm_Transit *chain_transit);
663
664 /**
665  * Cut off the chain relationship between two transits.
666  *
667  * @note @p transit can not be NULL. Transit would have the chain relationship with @p chain transit.
668  * @note @p chain_transit can not be NULL. Chain transits should be chained to the @p transit.
669  *
670  * @param transit The transit object.
671  * @param chain_transit The chain transit object.
672  *
673  * This function remove the @p chain_transit transition from the @p transit.
674  *
675  * @ingroup Transit
676  */
677 EAPI void                   elm_transit_chain_transit_del(Elm_Transit *transit, Elm_Transit *chain_transit);
678
679 /**
680  * Get the current chain transit list.
681  *
682  * @note @p transit can not be NULL.
683  *
684  * @param transit The transit object.
685  * @return chain transit list.
686  *
687  * @ingroup Transit
688  */
689 EAPI Eina_List             *elm_transit_chain_transits_get(const Elm_Transit *transit);
690
691 /**
692  * Add the Resizing Effect to Elm_Transit.
693  *
694  * @note This API is one of the facades. It creates resizing effect context
695  * and add it's required APIs to elm_transit_effect_add.
696  *
697  * @see elm_transit_effect_add()
698  *
699  * @param transit Transit object.
700  * @param from_w Object width size when effect begins.
701  * @param from_h Object height size when effect begins.
702  * @param to_w Object width size when effect ends.
703  * @param to_h Object height size when effect ends.
704  * @return Resizing effect context data.
705  *
706  * @ingroup Transit
707  */
708 EAPI Elm_Transit_Effect    *elm_transit_effect_resizing_add(Elm_Transit *transit, Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h);
709
710 /**
711  * Add the Translation Effect to Elm_Transit.
712  *
713  * @note This API is one of the facades. It creates translation effect context
714  * and add it's required APIs to elm_transit_effect_add.
715  *
716  * @see elm_transit_effect_add()
717  *
718  * @param transit Transit object.
719  * @param from_dx X Position variation when effect begins.
720  * @param from_dy Y Position variation when effect begins.
721  * @param to_dx X Position variation when effect ends.
722  * @param to_dy Y Position variation when effect ends.
723  * @return Translation effect context data.
724  *
725  * @ingroup Transit
726  * @warning It is highly recommended just create a transit with this effect when
727  * the window that the objects of the transit belongs has already been created.
728  * This is because this effect needs the geometry information about the objects,
729  * and if the window was not created yet, it can get a wrong information.
730  */
731 EAPI Elm_Transit_Effect    *elm_transit_effect_translation_add(Elm_Transit *transit, Evas_Coord from_dx, Evas_Coord from_dy, Evas_Coord to_dx, Evas_Coord to_dy);
732
733 /**
734  * Add the Zoom Effect to Elm_Transit.
735  *
736  * @note This API is one of the facades. It creates zoom effect context
737  * and add it's required APIs to elm_transit_effect_add.
738  *
739  * @see elm_transit_effect_add()
740  *
741  * @param transit Transit object.
742  * @param from_rate Scale rate when effect begins (1 is current rate).
743  * @param to_rate Scale rate when effect ends.
744  * @return Zoom effect context data.
745  *
746  * @ingroup Transit
747  * @warning It is highly recommended just create a transit with this effect when
748  * the window that the objects of the transit belongs has already been created.
749  * This is because this effect needs the geometry information about the objects,
750  * and if the window was not created yet, it can get a wrong information.
751  */
752 EAPI Elm_Transit_Effect    *elm_transit_effect_zoom_add(Elm_Transit *transit, float from_rate, float to_rate);
753
754 /**
755  * Add the Flip Effect to Elm_Transit.
756  *
757  * @note This API is one of the facades. It creates flip effect context
758  * and add it's required APIs to elm_transit_effect_add.
759  * @note This effect is applied to each pair of objects in the order they are listed
760  * in the transit list of objects. The first object in the pair will be the
761  * "front" object and the second will be the "back" object.
762  *
763  * @see elm_transit_effect_add()
764  *
765  * @param transit Transit object.
766  * @param axis Flipping Axis(X or Y).
767  * @param cw Flipping Direction. EINA_TRUE is clock-wise.
768  * @return Flip effect context data.
769  *
770  * @ingroup Transit
771  * @warning It is highly recommended just create a transit with this effect when
772  * the window that the objects of the transit belongs has already been created.
773  * This is because this effect needs the geometry information about the objects,
774  * and if the window was not created yet, it can get a wrong information.
775  */
776 EAPI Elm_Transit_Effect    *elm_transit_effect_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
777
778 /**
779 <<<<<<< HEAD
780  * Add the Resizable Flip Effect to Elm_Transit.
781 =======
782  * Add the Resizeable Flip Effect to Elm_Transit.
783 >>>>>>> remotes/origin/upstream
784  *
785  * @note This API is one of the facades. It creates resizable flip effect context
786  * and add it's required APIs to elm_transit_effect_add.
787  * @note This effect is applied to each pair of objects in the order they are listed
788  * in the transit list of objects. The first object in the pair will be the
789  * "front" object and the second will be the "back" object.
790  *
791  * @see elm_transit_effect_add()
792  *
793  * @param transit Transit object.
794  * @param axis Flipping Axis(X or Y).
795  * @param cw Flipping Direction. EINA_TRUE is clock-wise.
796 <<<<<<< HEAD
797  * @return Resizable flip effect context data.
798 =======
799  * @return Resizeable flip effect context data.
800 >>>>>>> remotes/origin/upstream
801  *
802  * @ingroup Transit
803  * @warning It is highly recommended just create a transit with this effect when
804  * the window that the objects of the transit belongs has already been created.
805  * This is because this effect needs the geometry information about the objects,
806  * and if the window was not created yet, it can get a wrong information.
807  */
808 EAPI Elm_Transit_Effect    *elm_transit_effect_resizable_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
809
810 /**
811  * Add the Wipe Effect to Elm_Transit.
812  *
813  * @note This API is one of the facades. It creates wipe effect context
814  * and add it's required APIs to elm_transit_effect_add.
815  *
816  * @see elm_transit_effect_add()
817  *
818  * @param transit Transit object.
819  * @param type Wipe type. Hide or show.
820  * @param dir Wipe Direction.
821  * @return Wipe effect context data.
822  *
823  * @ingroup Transit
824  * @warning It is highly recommended just create a transit with this effect when
825  * the window that the objects of the transit belongs has already been created.
826  * This is because this effect needs the geometry information about the objects,
827  * and if the window was not created yet, it can get a wrong information.
828  */
829 EAPI Elm_Transit_Effect    *elm_transit_effect_wipe_add(Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir);
830
831 /**
832  * Add the Color Effect to Elm_Transit.
833  *
834  * @note This API is one of the facades. It creates color effect context
835  * and add it's required APIs to elm_transit_effect_add.
836  *
837  * @see elm_transit_effect_add()
838  *
839  * @param transit        Transit object.
840  * @param  from_r        RGB R when effect begins.
841  * @param  from_g        RGB G when effect begins.
842  * @param  from_b        RGB B when effect begins.
843  * @param  from_a        RGB A when effect begins.
844  * @param  to_r          RGB R when effect ends.
845  * @param  to_g          RGB G when effect ends.
846  * @param  to_b          RGB B when effect ends.
847  * @param  to_a          RGB A when effect ends.
848  * @return               Color effect context data.
849  *
850  * @ingroup Transit
851  */
852 EAPI Elm_Transit_Effect    *elm_transit_effect_color_add(Elm_Transit *transit, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a);
853
854 /**
855  * Add the Fade Effect to Elm_Transit.
856  *
857  * @note This API is one of the facades. It creates fade effect context
858  * and add it's required APIs to elm_transit_effect_add.
859  * @note This effect is applied to each pair of objects in the order they are listed
860  * in the transit list of objects. The first object in the pair will be the
861  * "before" object and the second will be the "after" object.
862  *
863  * @see elm_transit_effect_add()
864  *
865  * @param transit Transit object.
866  * @return Fade effect context data.
867  *
868  * @ingroup Transit
869  * @warning It is highly recommended just create a transit with this effect when
870  * the window that the objects of the transit belongs has already been created.
871  * This is because this effect needs the color information about the objects,
872  * and if the window was not created yet, it can get a wrong information.
873  */
874 EAPI Elm_Transit_Effect    *elm_transit_effect_fade_add(Elm_Transit *transit);
875
876 /**
877  * Add the Blend Effect to Elm_Transit.
878  *
879  * @note This API is one of the facades. It creates blend effect context
880  * and add it's required APIs to elm_transit_effect_add.
881  * @note This effect is applied to each pair of objects in the order they are listed
882  * in the transit list of objects. The first object in the pair will be the
883  * "before" object and the second will be the "after" object.
884  *
885  * @see elm_transit_effect_add()
886  *
887  * @param transit Transit object.
888  * @return Blend effect context data.
889  *
890  * @ingroup Transit
891  * @warning It is highly recommended just create a transit with this effect when
892  * the window that the objects of the transit belongs has already been created.
893  * This is because this effect needs the color information about the objects,
894  * and if the window was not created yet, it can get a wrong information.
895  */
896 EAPI Elm_Transit_Effect    *elm_transit_effect_blend_add(Elm_Transit *transit);
897
898 /**
899  * Add the Rotation Effect to Elm_Transit.
900  *
901  * @note This API is one of the facades. It creates rotation effect context
902  * and add it's required APIs to elm_transit_effect_add.
903  *
904  * @see elm_transit_effect_add()
905  *
906  * @param transit Transit object.
907  * @param from_degree Degree when effect begins.
908  * @param to_degree Degree when effect is ends.
909  * @return Rotation effect context data.
910  *
911  * @ingroup Transit
912  * @warning It is highly recommended just create a transit with this effect when
913  * the window that the objects of the transit belongs has already been created.
914  * This is because this effect needs the geometry information about the objects,
915  * and if the window was not created yet, it can get a wrong information.
916  */
917 EAPI Elm_Transit_Effect    *elm_transit_effect_rotation_add(Elm_Transit *transit, float from_degree, float to_degree);
918
919 /**
920  * Add the ImageAnimation Effect to Elm_Transit.
921  *
922  * @note This API is one of the facades. It creates image animation effect context
923  * and add it's required APIs to elm_transit_effect_add.
924  * The @p images parameter is a list images paths. This list and
925  * its contents will be deleted at the end of the effect by
926  * elm_transit_effect_image_animation_context_free() function.
927  *
928  * Example:
929  * @code
930  * char buf[PATH_MAX];
931  * Eina_List *images = NULL;
932  * Elm_Transit *transi = elm_transit_add();
933  *
934  * snprintf(buf, sizeof(buf), "%s/images/icon_11.png", PACKAGE_DATA_DIR);
935  * images = eina_list_append(images, eina_stringshare_add(buf));
936  *
937  * snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
938  * images = eina_list_append(images, eina_stringshare_add(buf));
939  * elm_transit_effect_image_animation_add(transi, images);
940  *
941  * @endcode
942  *
943  * @see elm_transit_effect_add()
944  *
945  * @param transit Transit object.
946  * @param images Eina_List of images file paths. This list and
947  * its contents will be deleted at the end of the effect by
948  * elm_transit_effect_image_animation_context_free() function.
949  * @return Image Animation effect context data.
950  *
951  * @ingroup Transit
952  */
953 EAPI Elm_Transit_Effect    *elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images);
954 /**
955  * @}
956  */