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