2 * @defgroup Transit Transit
3 * @ingroup elm_infra_group
4 * @brief This group provides functions to handle the effects of transition
5 * of Elementary widgets.
7 * Transit is designed to apply various animated transition effects to @c
8 * Evas_Object, such as translation, rotation, etc. For using these
9 * effects, create @ref Elm_Transit and add the desired transition effects.
11 * Once the effects are added into transit, they are automatically
12 * managed (their callback is called for the set duration and
13 * they are deleted upon completion).
17 * Elm_Transit *trans = elm_transit_add();
18 * elm_transit_object_add(trans, obj);
19 * elm_transit_effect_translation_add(trans, 0, 0, 280, 280
20 * elm_transit_duration_set(transit, 1);
21 * elm_transit_auto_reverse_set(transit, EINA_TRUE);
22 * elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE);
23 * elm_transit_repeat_times_set(transit, 3);
26 * Some transition effects are used to change the properties of objects. They
28 * @li @ref elm_transit_effect_translation_add
29 * @li @ref elm_transit_effect_color_add
30 * @li @ref elm_transit_effect_rotation_add
31 * @li @ref elm_transit_effect_wipe_add
32 * @li @ref elm_transit_effect_zoom_add
33 * @li @ref elm_transit_effect_resizing_add
35 * Other transition effects are used to make one object disappear and another
36 * object appear on its place. These effects are:
38 * @li @ref elm_transit_effect_flip_add
39 * @li @ref elm_transit_effect_resizable_flip_add
40 * @li @ref elm_transit_effect_fade_add
41 * @li @ref elm_transit_effect_blend_add
43 * It's also possible to make a transition chain with @ref
44 * elm_transit_chain_transit_add.
46 * @remarks We strongly recommend to use elm_transit just when edje cannot do
47 * the trick. Edje is better at handling transitions than Elm_Transit.
48 * Edje has more flexibility and animations can be manipulated inside the theme.
54 * @enum Elm_Transit_Tween_Mode
56 * @brief Enumeration of acceleration used in the transition.
58 * @if MOBILE @since_tizen 2.3
59 * @elseif WEARABLE @since_tizen 2.3.1
64 ELM_TRANSIT_TWEEN_MODE_LINEAR, /**< Constant speed */
65 ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL, /**< Starts slow, increases speed
66 over time, then decreases again
67 and stops slowly, v1 being a power factor */
68 ELM_TRANSIT_TWEEN_MODE_DECELERATE, /**< Starts fast and decreases
69 speed over time, v1 being a power factor */
70 ELM_TRANSIT_TWEEN_MODE_ACCELERATE, /**< Starts slow and increases speed
71 over time, v1 being a power factor */
72 ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP, /**< Starts at gradient v1,
73 interpolated via power of the v2 curve */
74 ELM_TRANSIT_TWEEN_MODE_BOUNCE, /**< Starts at @c 0.0 then a "drop" like a ball
75 bouncing to the ground at @c 1.0, and
76 bounce v2 times, with decay factor of v1 */
77 ELM_TRANSIT_TWEEN_MODE_SPRING, /**< Starts at @c 0.0 then a "wobble" like a spring
78 at rest position @c 1.0, and wobble v2 times,
79 with decay factor of v1 */
80 ELM_TRANSIT_TWEEN_MODE_BEZIER_CURVE /**< @since_tizen 2.3.1
81 Follow the cubic-bezier curve
82 calculated with the control points
84 } Elm_Transit_Tween_Mode;
87 * @enum Elm_Transit_Effect_Flip_Axis
89 * @brief Enumeration of the axis along which flip effect should be applied.
91 * @if MOBILE @since_tizen 2.3
92 * @elseif WEARABLE @since_tizen 2.3.1
97 ELM_TRANSIT_EFFECT_FLIP_AXIS_X, /**< Flip on X axis */
98 ELM_TRANSIT_EFFECT_FLIP_AXIS_Y /**< Flip on Y axis */
99 } Elm_Transit_Effect_Flip_Axis;
102 * @enum Elm_Transit_Effect_Wipe_Dir
104 * @brief Enumeration of the direction in which the wipe effect should occur.
106 * @if MOBILE @since_tizen 2.3
107 * @elseif WEARABLE @since_tizen 2.3.1
112 ELM_TRANSIT_EFFECT_WIPE_DIR_LEFT, /**< Wipe to the left */
113 ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT, /**< Wipe to the right */
114 ELM_TRANSIT_EFFECT_WIPE_DIR_UP, /**< Wipe up */
115 ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN /**< Wipe down */
116 } Elm_Transit_Effect_Wipe_Dir;
118 /** @enum Elm_Transit_Effect_Wipe_Type
120 * @brief Enumeration that indicates whether the wipe effect should show or hide the object.
122 * @if MOBILE @since_tizen 2.3
123 * @elseif WEARABLE @since_tizen 2.3.1
128 ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE, /**< Hide the object during the
130 ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW /**< Show the object during the
132 } Elm_Transit_Effect_Wipe_Type;
135 * @typedef Elm_Transit
137 * @brief The Transit structure type created with elm_transit_add(). This type has the information
138 * about the objects to which the transition is applied, and the
139 * transition effects that are used. It also contains info about
140 * duration, number of repetitions, auto-reverse, etc.
142 * @if MOBILE @since_tizen 2.3
143 * @elseif WEARABLE @since_tizen 2.3.1
146 typedef struct _Elm_Transit Elm_Transit;
147 typedef void Elm_Transit_Effect;
150 * @typedef Elm_Transit_Effect_Transition_Cb
152 * @brief Called for this effect on each transition iteration.
154 * @if MOBILE @since_tizen 2.3
155 * @elseif WEARABLE @since_tizen 2.3.1
158 typedef void (*Elm_Transit_Effect_Transition_Cb)(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress);
161 * Elm_Transit_Effect_End_Cb
163 * @brief Called for this effect when the transition is over.
165 * @if MOBILE @since_tizen 2.3
166 * @elseif WEARABLE @since_tizen 2.3.1
169 typedef void (*Elm_Transit_Effect_End_Cb)(Elm_Transit_Effect *effect, Elm_Transit *transit);
174 * @brief Called when the transit is deleted.
176 * @if MOBILE @since_tizen 2.3
177 * @elseif WEARABLE @since_tizen 2.3.1
180 typedef void (*Elm_Transit_Del_Cb)(void *data, Elm_Transit *transit);
183 * @brief Creates a new transit.
185 * @if MOBILE @since_tizen 2.3
186 * @elseif WEARABLE @since_tizen 2.3.1
189 * @remarks It is not necessary to delete the transit object, it is deleted at
190 * the end of its operation.
191 * @remarks The transit starts playing when the program enters the main loop.
193 * @return The transit object
195 EAPI Elm_Transit *elm_transit_add(void);
198 * @brief Stops the animation and deletes the @a transit object.
200 * @if MOBILE @since_tizen 2.3
201 * @elseif WEARABLE @since_tizen 2.3.1
204 * @remarks Call this function if you want to stop the animation before the
205 * transit time. Make sure the @a transit object is still alive using the
206 * elm_transit_del_cb_set() function.
207 * All added effects are deleted, calling its respective data_free_cb
208 * functions. The function set by elm_transit_del_cb_set() is called.
210 * @param[in] transit The transit object to be deleted
212 * @see elm_transit_del_cb_set()
214 EAPI void elm_transit_del(Elm_Transit *transit);
217 * @brief Adds a new effect to the transit.
219 * @if MOBILE @since_tizen 2.3
220 * @elseif WEARABLE @since_tizen 2.3.1
223 * @remarks The @a cb function and @a data are the key to the effect.
224 * If you try to add an existing effect, nothing is done.
225 * @remarks After the first addition of an effect to @a transit, if its
226 * effect list become empty again, the @a transit is killed by the
227 * elm_transit_del(transit) function.
231 * Elm_Transit *transit = elm_transit_add();
232 * elm_transit_effect_add(transit,
233 * elm_transit_effect_blend_op,
234 * elm_transit_effect_blend_context_new(),
235 * elm_transit_effect_blend_context_free);
238 * @remarks The transit frees the context data at the end of the
239 * transition with the @a data_free_cb function.
240 * @remarks Do not share the context data in between different transit objects.
242 * @param[in] transit The transit object
243 * @param[in] transition_cb The operation function \n
244 * It is called when the
245 * animation begins, it is the function that actually performs the animation \n
246 * It is called with the @a data, @a transit and the time progression of the
247 * animation (a double value between @c 0.0 and @c 1.0).
248 * @param[in] effect The context data of the effect
249 * @param[in] end_cb The function to free the context data, it is called
250 * at the end of the effect, it must finalize the animation and free the
253 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);
256 * @brief Deletes an added effect.
258 * @details This function removes the effect from the @a transit, calling the
259 * @a data_free_cb to free the @a data.
261 * @if MOBILE @since_tizen 2.3
262 * @elseif WEARABLE @since_tizen 2.3.1
265 * @remarks If the effect is not found, nothing is done.
266 * @remarks If the effect list becomes empty, this function calls
267 * elm_transit_del(transit), i.e., it kills the @a transit.
269 * @param[in] transit The transit object
270 * @param[in] transition_cb The operation function
271 * @param[in] effect The context data of the effect
273 * @see elm_transit_effect_add()
275 EAPI void elm_transit_effect_del(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect);
278 * @brief Adds a new object to apply the effects.
280 * @if MOBILE @since_tizen 2.3
281 * @elseif WEARABLE @since_tizen 2.3.1
284 * @remarks After the first addition of an object to @a transit, if its
285 * object list becomes empty again, the @a transit is killed by the
286 * elm_transit_del(transit) function.
287 * @remarks If the @a obj belongs to another transit, the @a obj is
288 * removed from it and it only belongs to the other @a transit.
289 * If the old transit stays without objects, it dies.
290 * @remarks When you add an object into @a transit, its state from
291 * evas_object_pass_events_get(obj) is saved, and it is applied when the
292 * transit ends, if you change this state using evas_object_pass_events_set()
293 * after adding the object, this state changes again when @a transit stops.
294 * @remarks It is not allowed to add a new object after transit begins.
296 * @param[in] transit The transit object
297 * @param[in] obj The object to be animated
299 EAPI void elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj);
302 * @brief Removes an added object from the transit.
304 * @if MOBILE @since_tizen 2.3
305 * @elseif WEARABLE @since_tizen 2.3.1
308 * @remarks If the @a obj is not in the @a transit, nothing is done.
309 * @remarks If the list becomes empty, this function calls
310 * elm_transit_del(transit), i.e., it kills the @a transit.
311 * @remarks It is not allowed to remove objects after transit begins.
313 * @param[in] transit The transit object
314 * @param[in] obj The object to be removed from @a transit
316 EAPI void elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj);
319 * @brief Gets the objects of the transit.
321 * @if MOBILE @since_tizen 2.3
322 * @elseif WEARABLE @since_tizen 2.3.1
325 * @param[in] transit The transit object
326 * @return a The Eina_List with the objects from the transit
328 EAPI const Eina_List *elm_transit_objects_get(const Elm_Transit *transit);
331 * @brief Enables or disables keeping up the object's states.
332 * If it is not kept, the object's states are reset when transition ends.
334 * @if MOBILE @since_tizen 2.3
335 * @elseif WEARABLE @since_tizen 2.3.1
338 * @remarks @a transit cannot be @c NULL.
339 * @remarks One state includes geometry, color, and map data.
341 * @param[in] transit The transit object
342 * @param[in] state_keep The boolean value that indicates whether to retain the state
344 EAPI void elm_transit_objects_final_state_keep_set(Elm_Transit *transit, Eina_Bool state_keep);
347 * @brief Gets a value that indicates whether the object's states are reset.
349 * @if MOBILE @since_tizen 2.3
350 * @elseif WEARABLE @since_tizen 2.3.1
353 * @remarks @a transit cannot be @c NULL
355 * @param[in] transit The transit object
356 * @return @c EINA_TRUE indicates that the states of the objects are reset \n
357 * If @a transit is @c NULL, @c EINA_FALSE is returned
359 * @see elm_transit_objects_final_state_keep_set()
361 EAPI Eina_Bool elm_transit_objects_final_state_keep_get(const Elm_Transit *transit);
364 * @brief Sets the events that are enabled when transit is operating.
366 * @if MOBILE @since_tizen 2.3
367 * @elseif WEARABLE @since_tizen 2.3.1
370 * @remarks If @a enabled is @c EINA_TRUE, the objects of the transit receive
371 * events from a mouse and keyboard during the animation.
372 * @remarks When you add an object with elm_transit_object_add(), its state from
373 * evas_object_freeze_events_get(obj) is saved, and it is applied when the
374 * transit ends. If you change this state using evas_object_freeze_events_set()
375 * after adding the object, this state changes again when @a transit stops
378 * @param[in] transit The transit object
379 * @param[in] enabled Events are received when enabled is @c EINA_TRUE,
380 * otherwise it is ignored
382 EAPI void elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled);
385 * @brief Gets the value of the event enabled status.
387 * @if MOBILE @since_tizen 2.3
388 * @elseif WEARABLE @since_tizen 2.3.1
391 * @param[in] transit The transit object
392 * @return @c EINA_TRUE if the event is enabled,
393 * otherwise @c EINA_FALSE is returned if @a transit is @c NULL
395 * @see elm_transit_event_enabled_set()
397 EAPI Eina_Bool elm_transit_event_enabled_get(const Elm_Transit *transit);
400 * @brief Sets the user-callback function when the transit is deleted.
402 * @if MOBILE @since_tizen 2.3
403 * @elseif WEARABLE @since_tizen 2.3.1
406 * @remarks Using this function twice overwrites the first function set.
407 * @remarks The @a transit object is deleted after calling the @a cb function.
409 * @param[in] transit The transit object
410 * @param[in] cb The callback function pointer \n
411 * This function is called before the deletion of the transit.
412 * @param[in] data The callback function for user data \n
413 * It is the @a op parameter.
415 EAPI void elm_transit_del_cb_set(Elm_Transit *transit, Elm_Transit_Del_Cb cb, void *data);
418 * @brief Sets the reverse effect automatically.
420 * @if MOBILE @since_tizen 2.3
421 * @elseif WEARABLE @since_tizen 2.3.1
424 * @remarks If auto reverse is set, after running the effects with the progress
425 * parameter from @c 0 to @c 1, it calls the effects again with the progress
426 * from @c 1 to @c 0. The transit lasts for a time equal to (2 * duration * repeat),
427 * where the duration is set using the function elm_transit_add and
428 * the repeat using the function elm_transit_repeat_times_set().
430 * @param[in] transit The transit object
431 * @param[in] reverse If @c EINA_TRUE the auto_reverse is on, otherwise @c EINA_FALSE
433 EAPI void elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse);
436 * @brief Gets whether the auto reverse is on.
438 * @if MOBILE @since_tizen 2.3
439 * @elseif WEARABLE @since_tizen 2.3.1
442 * @param[in] transit The transit object
443 * @return @c EINA_TRUE if the auto reverse is on,
444 * otherwise @c EINA_FALSE is returned if @a transit is @c NULL
446 * @see elm_transit_auto_reverse_set()
448 EAPI Eina_Bool elm_transit_auto_reverse_get(const Elm_Transit *transit);
451 * @brief Sets the transit repeat count. The effect is repeated as per the repeat count.
453 * @details This function sets the number of repetitions that the transit runs after
454 * the first one, i.e., if @a repeat is @c 1, the transit runs @c 2 times.
455 * If @a repeat is a negative number, it repeats infinite times.
457 * @if MOBILE @since_tizen 2.3
458 * @elseif WEARABLE @since_tizen 2.3.1
461 * @remarks If this function is called during the transit execution, the transit
462 * runs @a repeat times, ignoring the times it already performed.
464 * @param[in] transit The transit object
465 * @param[in] repeat The repeat count
467 EAPI void elm_transit_repeat_times_set(Elm_Transit *transit, int repeat);
470 * @brief Gets the transit repeat count.
472 * @if MOBILE @since_tizen 2.3
473 * @elseif WEARABLE @since_tizen 2.3.1
476 * @param[in] transit The transit object
477 * @return The repeat count \n
478 * If @a transit is @c NULL, @c 0 is returned
480 * @see elm_transit_repeat_times_set()
482 EAPI int elm_transit_repeat_times_get(const Elm_Transit *transit);
485 * @brief Sets the transit animation acceleration type.
487 * @details This function sets the tween mode of the transit which can be:
488 * ELM_TRANSIT_TWEEN_MODE_LINEAR - The default mode.
489 * ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Starts in the accelerate mode and ends
490 * decelerating with factor.
491 * ELM_TRANSIT_TWEEN_MODE_DECELERATE - The animation is slowed over time
493 * ELM_TRANSIT_TWEEN_MODE_ACCELERATE - The animation accelerates over time
495 * ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP - Starts at gradient v1, interpolated
496 * via power of the v2 curve.
497 * ELM_TRANSIT_TWEEN_MODE_BOUNCE - Starts at @c 0.0 then a "drop" like a ball bouncing
498 * to the ground at @c 1.0, and bounce v2 times, with decay factor of v1.
499 * ELM_TRANSIT_TWEEN_MODE_SPRING - Starts at @c 0.0 then a "wobble" like a spring in rest
500 * position @c 1.0, and wobble v2 times, with decay factor of v1.
502 * @if MOBILE @since_tizen 2.3
503 * @elseif WEARABLE @since_tizen 2.3.1
506 * @param[in] transit The transit object
507 * @param[in] tween_mode The tween type
509 EAPI void elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode);
512 * @brief Gets the transit animation acceleration type.
514 * @if MOBILE @since_tizen 2.3
515 * @elseif WEARABLE @since_tizen 2.3.1
518 * @remarks @a transit cannot be @c NULL.
520 * @param[in] transit The transit object
521 * @return The tween type \n
522 * If @a transit is @c NULL, @c ELM_TRANSIT_TWEEN_MODE_LINEAR is returned.
524 EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit *transit);
527 * @brief Sets the transit animation acceleration factor.
529 * @details This function sets the tween mode factor of the transit which can be:
530 * If you use the below tween modes, you have to set the factor using this API.
531 * ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Starts slow, speeds up then slows down
532 * at the end, v1 being a power factor, @c 0.0 being linear, @c 1.0 being
533 * ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Default, @c 2.0 being a much more pronounced
534 * sinusoidal(squared), @c 3.0 being cubed, etc.
535 * ELM_TRANSIT_TWEEN_MODE_DECELERATE - Starts fast then slows down, v1 being a
536 * power factor, @c 0.0 being linear, @c 1.0 being ELM_TRANSIT_TWEEN_MODE_DECELERATE
537 * default, @c 2.0 being a much more pronounced decelerate (squared), @c 3.0 being
539 * ELM_TRANSIT_TWEEN_MODE_ACCELERATE - Starts slow then speeds up, v1 being a
540 * power factor, @c 0.0 being linear, @c 1.0 being ELM_TRANSIT_TWEEN_MODE_ACCELERATE
541 * default, @c 2.0 being a much more pronounced accelerate (squared), @c 3.0 being
543 * ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP - Starts at gradient * v1, interpolated
544 * via power of the v2 curve.
545 * ELM_TRANSIT_TWEEN_MODE_BOUNCE - Starts at @c 0.0 then a "drop" like a ball bouncing
546 * to the ground at @c 1.0, and bounce v2 times, with decay factor of v1.
547 * ELM_TRANSIT_TWEEN_MODE_SPRING - Starts at @c 0.0 then a "wobble" like a spring in rest
548 * position @c 1.0, and wobble v2 times, with decay factor of v1.
550 * @if MOBILE @since_tizen 2.3
551 * @elseif WEARABLE @since_tizen 2.3.1
554 * @param[in] transit The transit object
555 * @param[in] v1 A parameter used by the mapping (default is @c 1.0)
556 * @param[in] v2 A parameter used by the mapping (default is @c 0.0)
558 * @see elm_transit_tween_mode_factor_get()
560 EAPI void elm_transit_tween_mode_factor_set(Elm_Transit *transit, double v1, double v2);
563 * @brief Gets the transit animation acceleration factor.
565 * @if MOBILE @since_tizen 2.3
566 * @elseif WEARABLE @since_tizen 2.3.1
569 * @remarks @a transit cannot be @c NULL.
571 * @param[in] transit The transit object
572 * @param[out] v1 The pointer to a double in which to store the factor value
573 * @param[out] v2 The pointer to a double in which to store the factor value2
575 * @see elm_transit_tween_mode_factor_set()
577 EAPI void elm_transit_tween_mode_factor_get(const Elm_Transit *transit, double *v1, double *v2);
580 * @brief Sets the transit animation time.
582 * @if MOBILE @since_tizen 2.3
583 * @elseif WEARABLE @since_tizen 2.3.1
586 * @remarks @a transit cannot be @c NULL.
588 * @param[in] transit The transit object
589 * @param[in] duration The animation time
591 EAPI void elm_transit_duration_set(Elm_Transit *transit, double duration);
594 * Set the transit animation acceleration factor.
596 * This function sets the tween mode factor of the transit that can be:
597 * If you use the below tween modes, you have to set the factor using this API.
598 * ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Start slow, speed up then slow down
599 * at end, v[0] being a power factor, 0.0 being linear, 1.0 being
600 * ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL default, 2.0 being much more pronounced
601 * sinusoidal(squared), 3.0 being cubed, etc.
602 * ELM_TRANSIT_TWEEN_MODE_DECELERATE - Start fast then slow down, v[0] being a
603 * power factor, 0.0 being linear, 1.0 being ELM_TRANSIT_TWEEN_MODE_DECELERATE
604 * default, 2.0 being much more pronounced decelerate (squared), 3.0 being
606 * ELM_TRANSIT_TWEEN_MODE_ACCELERATE - Start slow then speed up, v[0] being a
607 * power factor, 0.0 being linear, 1.0 being ELM_TRANSIT_TWEEN_MODE_ACCELERATE
608 * default, 2.0 being much more pronounced accelerate (squared), 3.0 being
610 * ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP - Start at gradient v[0], interpolated
611 * via power of v[1] curve
612 * ELM_TRANSIT_TWEEN_MODE_BOUNCE - Start at 0.0 then "drop" like a ball bouncing
613 * to the ground at 1.0, and bounce v[1] times, with decay factor of v[0]
614 * ELM_TRANSIT_TWEEN_MODE_SPRING - Start at 0.0 then "wobble" like a spring rest
615 * position 1.0, and wobble v[1] times, with decay factor of v[0]
616 * ELM_TRANSIT_TWEEN_MODE_BEZIER_CURVE - Use an interpolated cubic-bezier curve
617 * ajusted with parameters from v[0] to v[3]
619 * @param transit The transit object.
620 * @param v_size The size of the array pointing to v
621 * @param v The address of an array with the double parameters to be used by the mapping.
623 * @see elm_transit_tween_mode_factor_set()
627 EAPI void elm_transit_tween_mode_factor_n_set(Elm_Transit *transit, unsigned int v_size, double *v);
630 * @brief Gets the transit animation time.
632 * @if MOBILE @since_tizen 2.3
633 * @elseif WEARABLE @since_tizen 2.3.1
636 * @remarks @a transit cannot be @c NULL.
638 * @param[in] transit The transit object
640 * @return The transit animation time
642 EAPI double elm_transit_duration_get(const Elm_Transit *transit);
645 * @brief Starts the transition.
647 * @if MOBILE @since_tizen 2.3
648 * @elseif WEARABLE @since_tizen 2.3.1
651 * @remarks Once this API is called, the transit begins to measure the time.
653 * @remarks @a transit cannot be @c NULL.
655 * @param[in] transit The transit object
657 EAPI void elm_transit_go(Elm_Transit *transit);
660 * @brief Pauses and resumes the transition.
662 * @if MOBILE @since_tizen 2.3
663 * @elseif WEARABLE @since_tizen 2.3.1
666 * @remarks If you call elm_transit_go() again, the transit is started from the
667 * beginning, and is played.
669 * @remarks @a transit cannot be @c NULL
671 * @param[in] transit The transit object
672 * @param[in] paused The boolean value that indicates whether the transition should be paused
674 EAPI void elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused);
677 * @brief Gets the value of the paused status.
679 * @if MOBILE @since_tizen 2.3
680 * @elseif WEARABLE @since_tizen 2.3.1
683 * @remarks @a transit cannot be @c NULL.
685 * @param[in] transit The transit object
686 * @return @c EINA_TRUE if the transition is paused,
687 * otherwise @c EINA_FALSE is returned if @a transit is @c NULL
689 * @see elm_transit_paused_set()
691 EAPI Eina_Bool elm_transit_paused_get(const Elm_Transit *transit);
694 * @brief Gets the time progression of the animation (a double value between @c 0.0 and @c 1.0).
696 * @if MOBILE @since_tizen 2.3
697 * @elseif WEARABLE @since_tizen 2.3.1
700 * @remarks The value returned is a fraction (current time / total time). It
701 * represents the progression position relative to the total.
703 * @remarks @a transit cannot be @c NULL
705 * @param[in] transit The transit object
707 * @return The time progression value \n
708 * If @a transit is @c NULL, @c 0 is returned
710 EAPI double elm_transit_progress_value_get(const Elm_Transit *transit);
713 * @brief Makes the chain relationship between two transits.
715 * @if MOBILE @since_tizen 2.3
716 * @elseif WEARABLE @since_tizen 2.3.1
719 * @remarks This function adds the @a chain_transit transition to a chain after the @a
720 * transit, and is started as soon as @a transit ends.
722 * @remarks @a transit cannot be @c NULL. Transit would have multiple chain transits.
723 * @remarks @p chain_transit cannot be @c NULL. Chain transits could be chained to only one transit.
725 * @param[in] transit The transit object
726 * @param[in] chain_transit The chain transit object \n
727 * This transit is operated after transit is done.
729 EAPI void elm_transit_chain_transit_add(Elm_Transit *transit, Elm_Transit *chain_transit);
732 * @brief Cuts off the chain relationship between two transits.
734 * @if MOBILE @since_tizen 2.3
735 * @elseif WEARABLE @since_tizen 2.3.1
738 * @remarks This function removes the @a chain_transit transition from the @a transit.
740 * @remarks @a transit cannot be @c NULL. Transit would have a chain relationship with @a chain transit.
741 * @remarks @a chain_transit cannot be @c NULL. Chain transits should be chained to the @a transit.
743 * @param[in] transit The transit object
744 * @param[in] chain_transit The chain transit object
746 EAPI void elm_transit_chain_transit_del(Elm_Transit *transit, Elm_Transit *chain_transit);
749 * @brief Gets the current chain transit list.
751 * @if MOBILE @since_tizen 2.3
752 * @elseif WEARABLE @since_tizen 2.3.1
755 * @remarks @a transit cannot be @c NULL.
757 * @param[in] transit The transit object
758 * @return The chain transit list
760 EAPI Eina_List *elm_transit_chain_transits_get(const Elm_Transit *transit);
763 * @brief Sets the smooth effect for a transit.
765 * @details This sets smoothing for transit map rendering. If the object added in a
766 * transit is of a type that has its own smoothing settings, then both the smooth
767 * settings for this object and the map must be turned off. By default, smooth
772 * @if MOBILE @since_tizen 2.3
773 * @elseif WEARABLE @since_tizen 2.3.1
776 * @param[in] transit The transit object
777 * @param[in] smooth enabled The boolean value that enables or disables smooth map rendering
779 * @see evas_map_smooth_set()
781 EAPI void elm_transit_smooth_set(Elm_Transit *transit, Eina_Bool smooth);
784 * @brief Gets smooth scaling for transit map rendering.
786 * @details This gets smooth scaling for transit map rendering.
790 * @if MOBILE @since_tizen 2.3
791 * @elseif WEARABLE @since_tizen 2.3.1
794 * @param[in] transit The transit object
795 * @return @c EINA_TRUE if smooth scaling is enabled, otherwise @c EINA_FALSE
797 * @see elm_transit_smooth_set()
800 Eina_Bool elm_transit_smooth_get(const Elm_Transit *transit);
803 * @brief Adds the resizing effect to Elm_Transit.
805 * @if MOBILE @since_tizen 2.3
806 * @elseif WEARABLE @since_tizen 2.3.1
809 * @remarks This API is one of the facades. It creates resizing effect context
810 * and adds its required APIs to elm_transit_effect_add().
812 * @param[in] transit The transit object
813 * @param[in] from_w The object width size when the effect begins
814 * @param[in] from_h The object height size when the effect begins
815 * @param[in] to_w The object width size when the effect ends
816 * @param[in] to_h The object height size when the effect ends
817 * @return The resizing effect context data
819 * @see elm_transit_effect_add()
821 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);
824 * @brief Adds the translation effect to Elm_Transit.
826 * @if MOBILE @since_tizen 2.3
827 * @elseif WEARABLE @since_tizen 2.3.1
830 * @remarks This API is one of the facades. It creates translation effect context
831 * and adds its required APIs to elm_transit_effect_add().
833 * @remarks It is highly recommended to just create a transit with this effect when
834 * the window to which the objects of the transit belong has already been created.
835 * This is because this effect needs the geometry information about the objects,
836 * and if the window is not created yet, it can get wrong information.
838 * @param[in] transit The transit object
839 * @param[in] from_dx The x position variation when the effect begins
840 * @param[in] from_dy The y position variation when the effect begins
841 * @param[in] to_dx The x position variation when the effect ends
842 * @param[in] to_dy The y position variation when the effect ends
843 * @return The translation effect context data
845 * @see elm_transit_effect_add()
847 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);
850 * @brief Adds the zoom effect to Elm_Transit.
852 * @if MOBILE @since_tizen 2.3
853 * @elseif WEARABLE @since_tizen 2.3.1
856 * @remarks This API is one of the facades. It creates zoom effect context
857 * and adds its required APIs to elm_transit_effect_add().
859 * @remarks It is highly recommended to just create a transit with this effect when
860 * the window to which the objects of the transit belong has already been created.
861 * This is because this effect needs the geometry information about the objects,
862 * and if the window is not created yet, it can get wrong information.
864 * @param[in] transit The transit object
865 * @param[in] from_rate The scale rate when the effect begins (@c 1 is the current rate)
866 * @param[in] to_rate The scale rate when the effect ends
867 * @return The zoom effect context data
869 * @see elm_transit_effect_add()
871 EAPI Elm_Transit_Effect *elm_transit_effect_zoom_add(Elm_Transit *transit, float from_rate, float to_rate);
874 * @brief Adds the flip effect to Elm_Transit.
876 * @if MOBILE @since_tizen 2.3
877 * @elseif WEARABLE @since_tizen 2.3.1
880 * @remarks This API is one of the facades. It creates flip effect context
881 * and adds its required APIs to elm_transit_effect_add().
882 * @remarks This effect is applied to each pair of objects in the order they are listed
883 * in the transit list of objects. The first object in the pair is the
884 * "front" object and the second is the "back" object.
886 * @remarks It is highly recommended to just create a transit with this effect when
887 * the window to which the objects of the transit belong has already been created.
888 * This is because this effect needs the geometry information about the objects,
889 * and if the window is not created yet, it can get wrong information.
891 * @param[in] transit The transit object
892 * @param[in] axis The flipping axis(x or y)
893 * @param[in] cw The flipping direction \n
894 * @c EINA_TRUE is clock-wise.
895 * @return The flip effect context data
897 * @see elm_transit_effect_add()
899 EAPI Elm_Transit_Effect *elm_transit_effect_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
902 * @brief Adds the resizeable flip effect to Elm_Transit.
904 * @if MOBILE @since_tizen 2.3
905 * @elseif WEARABLE @since_tizen 2.3.1
908 * @remarks This API is one of the facades. It creates resizable flip effect context
909 * and adds its required APIs to elm_transit_effect_add().
910 * @remarks This effect is applied to each pair of objects in the order they are listed
911 * in the transit list of objects. The first object in the pair is the
912 * "front" object and the second is the "back" object.
914 * @remarks It is highly recommended to just create a transit with this effect when
915 * the window to which the objects of the transit belong has already been created.
916 * This is because this effect needs the geometry information about the objects,
917 * and if the window is not created yet, it can get wrong information.
919 * @param[in] transit The transit object
920 * @param[in] axis The flipping axis(x or y)
921 * @param[in] cw The flipping direction \n
922 * @c EINA_TRUE is clock-wise.
923 * @return The resizeable flip effect context data
925 * @see elm_transit_effect_add()
927 EAPI Elm_Transit_Effect *elm_transit_effect_resizable_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
930 * @brief Adds the wipe effect to Elm_Transit.
932 * @if MOBILE @since_tizen 2.3
933 * @elseif WEARABLE @since_tizen 2.3.1
936 * @remarks This API is one of the facades. It creates wipe effect context
937 * and adds its required APIs to elm_transit_effect_add().
939 * @remarks It is highly recommended to just create a transit with this effect when
940 * the window to which the objects of the transit belong has already been created.
941 * This is because this effect needs the geometry information about the objects,
942 * and if the window is not created yet, it can get wrong information.
944 * @param[in] transit The transit object
945 * @param[in] type The wipe type which is either hide or show
946 * @param[in] dir The wipe direction
947 * @return The wipe effect context data
949 * @see elm_transit_effect_add()
951 EAPI Elm_Transit_Effect *elm_transit_effect_wipe_add(Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir);
954 * @brief Adds the color effect to Elm_Transit.
956 * @if MOBILE @since_tizen 2.3
957 * @elseif WEARABLE @since_tizen 2.3.1
960 * @remarks This API is one of the facades. It creates color effect context
961 * and adds its required APIs to elm_transit_effect_add().
964 * @param[in] transit The transit object
965 * @param[in] from_r The RGB from R when the effect begins
966 * @param[in] from_g The RGB from G when the effect begins
967 * @param[in] from_b The RGB from B when the effect begins
968 * @param[in] from_a The RGB from A when the effect begins
969 * @param[in] to_r The RGB to R when the effect ends
970 * @param[in] to_g The RGB to G when the effect ends
971 * @param[in] to_b The RGB to B when the effect ends
972 * @param[in] to_a The RGB to A when the effect ends
973 * @return The color effect context data
975 * @see elm_transit_effect_add()
977 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);
980 * @brief Adds the fade effect to Elm_Transit.
982 * @if MOBILE @since_tizen 2.3
983 * @elseif WEARABLE @since_tizen 2.3.1
986 * @remarks This API is one of the facades. It creates fade effect context
987 * and adds its required APIs to elm_transit_effect_add().
988 * @remarks This effect is applied to each pair of objects in the order they are listed
989 * in the transit list of objects. The first object in the pair is the
990 * "before" object and the second is the "after" object.
992 * @remarks It is highly recommended to just create a transit with this effect when
993 * the window to which the objects of the transit belong has already been created.
994 * This is because this effect needs the color information about the objects,
995 * and if the window is not created yet, it can get wrong information.
997 * @param[in] transit The transit object
998 * @return The fade effect context data
1000 * @see elm_transit_effect_add()
1002 EAPI Elm_Transit_Effect *elm_transit_effect_fade_add(Elm_Transit *transit);
1005 * @brief Adds the blend effect to Elm_Transit.
1007 * @if MOBILE @since_tizen 2.3
1008 * @elseif WEARABLE @since_tizen 2.3.1
1011 * @remarks This API is one of the facades. It creates blend effect context
1012 * and adds its required APIs to elm_transit_effect_add().
1013 * @remarks This effect is applied to each pair of objects in the order they are listed
1014 * in the transit list of objects. The first object in the pair is the
1015 * "before" object and the second is the "after" object.
1017 * @remarks It is highly recommended to just create a transit with this effect when
1018 * the window that the objects of the transit belongs has already been created.
1019 * This is because this effect needs the color information about the objects,
1020 * and if the window is not created yet, it can get wrong information.
1022 * @param[in] transit The transit object
1023 * @return The blend effect context data
1025 * @see elm_transit_effect_add()
1027 EAPI Elm_Transit_Effect *elm_transit_effect_blend_add(Elm_Transit *transit);
1030 * @brief Adds the rotation effect to Elm_Transit.
1032 * @if MOBILE @since_tizen 2.3
1033 * @elseif WEARABLE @since_tizen 2.3.1
1036 * @remarks This API is one of the facades. It creates rotation effect context
1037 * and adds its required APIs to elm_transit_effect_add().
1039 * @remarks It is highly recommended to just create a transit with this effect when
1040 * the window to which the objects of the transit belong has already been created.
1041 * This is because this effect needs the geometry information about the objects,
1042 * and if the window is not created yet, it can get wrong information.
1044 * @param[in] transit The transit object
1045 * @param[in] from_degree The degree when the effect begins
1046 * @param[in] to_degree The degree when the effect is ends
1047 * @return The rotation effect context data
1049 * @see elm_transit_effect_add()
1051 EAPI Elm_Transit_Effect *elm_transit_effect_rotation_add(Elm_Transit *transit, float from_degree, float to_degree);
1054 * @brief Adds the image animation effect to Elm_Transit.
1056 * @if MOBILE @since_tizen 2.3
1057 * @elseif WEARABLE @since_tizen 2.3.1
1060 * @remarks This API is one of the facades. It creates image animation effect context
1061 * and adds its required APIs to elm_transit_effect_add.
1062 * The @a images parameter is a list images paths. This list and
1063 * its contents is deleted at the end of the effect by the
1064 * elm_transit_effect_image_animation_context_free() function.
1068 * char buf[PATH_MAX];
1069 * Eina_List *images = NULL;
1070 * Elm_Transit *transi = elm_transit_add();
1072 * snprintf(buf, sizeof(buf), "%s/images/icon_11.png", PACKAGE_DATA_DIR);
1073 * images = eina_list_append(images, eina_stringshare_add(buf));
1075 * snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
1076 * images = eina_list_append(images, eina_stringshare_add(buf));
1077 * elm_transit_effect_image_animation_add(transi, images);
1082 * @param[in] transit The transit object
1083 * @param[in] images The Eina_List of images file paths \n
1084 * This list and its contents are deleted at the end of the effect by the
1085 * elm_transit_effect_image_animation_context_free() function.
1087 * @return The image animation effect context data
1089 * @see elm_transit_effect_add()
1091 EAPI Elm_Transit_Effect *elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images);