| 1 |
#ifdef HAVE_CONFIG_H |
| 2 |
#include "config.h" |
| 3 |
#endif |
| 4 |
|
| 5 |
#include "clutter-layout-manager.h" |
| 6 |
|
| 7 |
/** |
| 8 |
* clutter_layout_manager_begin_animation: |
| 9 |
* @manager: a #ClutterLayoutManager |
| 10 |
* @duration: the duration of the animation, in milliseconds |
| 11 |
* @mode: the easing mode of the animation |
| 12 |
* |
| 13 |
* Begins an animation of @duration milliseconds, using the provided |
| 14 |
* easing @mode |
| 15 |
* |
| 16 |
* The easing mode can be specified either as a #ClutterAnimationMode |
| 17 |
* or as a logical id returned by clutter_alpha_register_func() |
| 18 |
* |
| 19 |
* The result of this function depends on the @manager implementation |
| 20 |
* |
| 21 |
* Return value: (transfer none): The #ClutterAlpha created by the |
| 22 |
* layout manager; the returned instance is owned by the layout |
| 23 |
* manager and should not be unreferenced |
| 24 |
* |
| 25 |
* Since: 1.2 |
| 26 |
* |
| 27 |
* Deprecated: 1.12 |
| 28 |
*/ |
| 29 |
ClutterAlpha * |
| 30 |
clutter_layout_manager_begin_animation (ClutterLayoutManager *manager, |
| 31 |
guint duration, |
| 32 |
gulong mode) |
| 33 |
{ |
| 34 |
ClutterLayoutManagerClass *klass; |
| 35 |
|
| 36 |
g_return_val_if_fail (CLUTTER_IS_LAYOUT_MANAGER (manager), NULL); |
| 37 |
|
| 38 |
klass = CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager); |
| 39 |
|
| 40 |
return klass->begin_animation (manager, duration, mode); |
| 41 |
} |
| 42 |
|
| 43 |
/** |
| 44 |
* clutter_layout_manager_end_animation: |
| 45 |
* @manager: a #ClutterLayoutManager |
| 46 |
* |
| 47 |
* Ends an animation started by clutter_layout_manager_begin_animation() |
| 48 |
* |
| 49 |
* The result of this call depends on the @manager implementation |
| 50 |
* |
| 51 |
* Since: 1.2 |
| 52 |
* |
| 53 |
* Deprecated: 1.12 |
| 54 |
*/ |
| 55 |
void |
| 56 |
clutter_layout_manager_end_animation (ClutterLayoutManager *manager) |
| 57 |
{ |
| 58 |
g_return_if_fail (CLUTTER_IS_LAYOUT_MANAGER (manager)); |
| 59 |
|
| 60 |
CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager)->end_animation (manager); |
| 61 |
} |
| 62 |
|
| 63 |
/** |
| 64 |
* clutter_layout_manager_get_animation_progress: |
| 65 |
* @manager: a #ClutterLayoutManager |
| 66 |
* |
| 67 |
* Retrieves the progress of the animation, if one has been started by |
| 68 |
* clutter_layout_manager_begin_animation() |
| 69 |
* |
| 70 |
* The returned value has the same semantics of the #ClutterAlpha:alpha |
| 71 |
* value |
| 72 |
* |
| 73 |
* Return value: the progress of the animation |
| 74 |
* |
| 75 |
* Since: 1.2 |
| 76 |
* |
| 77 |
* Deprecated: 1.12 |
| 78 |
*/ |
| 79 |
gdouble |
| 80 |
clutter_layout_manager_get_animation_progress (ClutterLayoutManager *manager) |
| 81 |
{ |
| 82 |
ClutterLayoutManagerClass *klass; |
| 83 |
|
| 84 |
g_return_val_if_fail (CLUTTER_IS_LAYOUT_MANAGER (manager), 1.0); |
| 85 |
|
| 86 |
klass = CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager); |
| 87 |
|
| 88 |
return klass->get_animation_progress (manager); |
| 89 |
} |