1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Copyright (C) 2008  Intel Corporation.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20  *
21  * Author:
22  *   Emmanuele Bassi <ebassi@linux.intel.com>
23  */
24 
25 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
26 #error "Only <clutter/clutter.h> can be included directly."
27 #endif
28 
29 #ifndef __CLUTTER_ANIMATION_H__
30 #define __CLUTTER_ANIMATION_H__
31 
32 #include <clutter/clutter-types.h>
33 
34 G_BEGIN_DECLS
35 
36 #define CLUTTER_TYPE_ANIMATION                  (clutter_animation_get_type ())
37 #define CLUTTER_ANIMATION(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_ANIMATION, ClutterAnimation))
38 #define CLUTTER_IS_ANIMATION(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_ANIMATION))
39 #define CLUTTER_ANIMATION_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_ANIMATION, ClutterAnimationClass))
40 #define CLUTTER_IS_ANIMATION_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_ANIMATION))
41 #define CLUTTER_ANIMATION_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_ANIMATION, ClutterAnimationClass))
42 
43 typedef struct _ClutterAnimationPrivate         ClutterAnimationPrivate;
44 typedef struct _ClutterAnimationClass           ClutterAnimationClass;
45 
46 /**
47  * ClutterAnimation:
48  *
49  * The #ClutterAnimation structure contains only private data and should
50  * be accessed using the provided functions.
51  *
52  * Since: 1.0
53  *
54  * Deprecated: 1.12: Use the implicit animation on #ClutterActor
55  */
56 struct _ClutterAnimation
57 {
58   /*< private >*/
59   GObject parent_instance;
60 
61   ClutterAnimationPrivate *priv;
62 };
63 
64 /**
65  * ClutterAnimationClass:
66  * @started: class handler for the #ClutterAnimation::started signal
67  * @completed: class handler for the #ClutterAnimation::completed signal
68  *
69  * The #ClutterAnimationClass structure contains only private data and
70  * should be accessed using the provided functions.
71  *
72  * Since: 1.0
73  *
74  * Deprecated: 1.12: Use the implicit animation on #ClutterActor
75  */
76 struct _ClutterAnimationClass
77 {
78   /*< private >*/
79   GObjectClass parent_class;
80 
81   /*< public >*/
82   void (* started)   (ClutterAnimation *animation);
83   void (* completed) (ClutterAnimation *animation);
84 
85   /*< private >*/
86   /* padding for future expansion */
87   void (*_clutter_reserved1) (void);
88   void (*_clutter_reserved2) (void);
89   void (*_clutter_reserved3) (void);
90   void (*_clutter_reserved4) (void);
91   void (*_clutter_reserved5) (void);
92   void (*_clutter_reserved6) (void);
93   void (*_clutter_reserved7) (void);
94   void (*_clutter_reserved8) (void);
95 };
96 
97 CLUTTER_DEPRECATED_IN_1_12
98 GType clutter_animation_get_type (void) G_GNUC_CONST;
99 
100 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_property_transition_new)
101 ClutterAnimation *      clutter_animation_new                   (void);
102 
103 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_transition_set_animatable)
104 void                    clutter_animation_set_object            (ClutterAnimation     *animation,
105                                                                  GObject              *object);
106 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_transition_get_animatable)
107 GObject *               clutter_animation_get_object            (ClutterAnimation     *animation);
108 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_timeline_set_progress_mode)
109 void                    clutter_animation_set_mode              (ClutterAnimation     *animation,
110                                                                  gulong                mode);
111 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_timeline_get_progress_mode)
112 gulong                  clutter_animation_get_mode              (ClutterAnimation     *animation);
113 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_timeline_set_duration)
114 void                    clutter_animation_set_duration          (ClutterAnimation     *animation,
115                                                                  guint                 msecs);
116 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_timeline_get_duration)
117 guint                   clutter_animation_get_duration          (ClutterAnimation     *animation);
118 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_timeline_set_repeat_count)
119 void                    clutter_animation_set_loop              (ClutterAnimation     *animation,
120                                                                  gboolean              loop);
121 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_timeline_get_repeat_count)
122 gboolean                clutter_animation_get_loop              (ClutterAnimation     *animation);
123 CLUTTER_DEPRECATED_IN_1_12
124 void                    clutter_animation_set_timeline          (ClutterAnimation     *animation,
125                                                                  ClutterTimeline      *timeline);
126 CLUTTER_DEPRECATED_IN_1_12
127 ClutterTimeline *       clutter_animation_get_timeline          (ClutterAnimation     *animation);
128 CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_animation_set_timeline)
129 void                    clutter_animation_set_alpha             (ClutterAnimation     *animation,
130                                                                  ClutterAlpha         *alpha);
131 CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_animation_get_timeline)
132 ClutterAlpha *          clutter_animation_get_alpha             (ClutterAnimation     *animation);
133 CLUTTER_DEPRECATED_IN_1_12
134 ClutterAnimation *      clutter_animation_bind                  (ClutterAnimation     *animation,
135                                                                  const gchar          *property_name,
136                                                                  const GValue         *final);
137 CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_transition_set_interval)
138 ClutterAnimation *      clutter_animation_bind_interval         (ClutterAnimation     *animation,
139                                                                  const gchar          *property_name,
140                                                                  ClutterInterval      *interval);
141 CLUTTER_DEPRECATED_IN_1_12
142 gboolean                clutter_animation_has_property          (ClutterAnimation     *animation,
143                                                                  const gchar          *property_name);
144 CLUTTER_DEPRECATED_IN_1_12
145 ClutterAnimation *      clutter_animation_update                (ClutterAnimation     *animation,
146                                                                  const gchar          *property_name,
147                                                                  const GValue         *final);
148 CLUTTER_DEPRECATED_IN_1_12
149 void                    clutter_animation_update_interval       (ClutterAnimation     *animation,
150                                                                  const gchar          *property_name,
151                                                                  ClutterInterval      *interval);
152 CLUTTER_DEPRECATED_IN_1_12
153 void                    clutter_animation_unbind_property       (ClutterAnimation     *animation,
154                                                                  const gchar          *property_name);
155 CLUTTER_DEPRECATED_IN_1_12
156 ClutterInterval     *   clutter_animation_get_interval          (ClutterAnimation     *animation,
157                                                                  const gchar          *property_name);
158 CLUTTER_DEPRECATED_IN_1_12
159 void                    clutter_animation_completed             (ClutterAnimation     *animation);
160 
161 /*
162  * ClutterActor API
163  */
164 
165 CLUTTER_DEPRECATED_IN_1_12
166 ClutterAnimation *      clutter_actor_animate                   (ClutterActor         *actor,
167                                                                  gulong                mode,
168                                                                  guint                 duration,
169                                                                  const gchar          *first_property_name,
170                                                                  ...) G_GNUC_NULL_TERMINATED;
171 CLUTTER_DEPRECATED_IN_1_12
172 ClutterAnimation *      clutter_actor_animate_with_timeline     (ClutterActor         *actor,
173                                                                  gulong                mode,
174                                                                  ClutterTimeline      *timeline,
175                                                                  const gchar          *first_property_name,
176                                                                  ...) G_GNUC_NULL_TERMINATED;
177 CLUTTER_DEPRECATED_IN_1_12
178 ClutterAnimation *      clutter_actor_animatev                  (ClutterActor         *actor,
179                                                                  gulong                mode,
180                                                                  guint                 duration,
181                                                                  gint                  n_properties,
182                                                                  const gchar * const   properties[],
183                                                                  const GValue         *values);
184 CLUTTER_DEPRECATED_IN_1_12
185 ClutterAnimation *      clutter_actor_animate_with_timelinev    (ClutterActor         *actor,
186                                                                  gulong                mode,
187                                                                  ClutterTimeline      *timeline,
188                                                                  gint                  n_properties,
189                                                                  const gchar * const   properties[],
190                                                                  const GValue         *values);
191 CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_animate_with_timeline)
192 ClutterAnimation *      clutter_actor_animate_with_alpha        (ClutterActor         *actor,
193                                                                  ClutterAlpha         *alpha,
194                                                                  const gchar          *first_property_name,
195                                                                  ...) G_GNUC_NULL_TERMINATED;
196 CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_animate_with_timelinev)
197 ClutterAnimation *      clutter_actor_animate_with_alphav       (ClutterActor         *actor,
198                                                                  ClutterAlpha         *alpha,
199                                                                  gint                  n_properties,
200                                                                  const gchar * const   properties[],
201                                                                  const GValue         *values);
202 
203 CLUTTER_DEPRECATED_IN_1_12
204 ClutterAnimation *      clutter_actor_get_animation             (ClutterActor         *actor);
205 CLUTTER_DEPRECATED_IN_1_12
206 void                    clutter_actor_detach_animation          (ClutterActor         *actor);
207 
208 G_END_DECLS
209 
210 #endif /* __CLUTTER_ANIMATION_DEPRECATED_H__ */
211