4 * An OpenGL based 'interactive canvas' library.
6 * Copyright (C) 2009 Intel Corporation.
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.
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.
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/>.
22 * Emmanuele Bassi <ebassi@linux.intel.com>
25 #ifndef __CLUTTER_ANIMATABLE_H__
26 #define __CLUTTER_ANIMATABLE_H__
28 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
29 #error "Only <clutter/clutter.h> can be included directly."
32 #include <clutter/clutter-types.h>
36 #define CLUTTER_TYPE_ANIMATABLE (clutter_animatable_get_type ())
37 #define CLUTTER_ANIMATABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_ANIMATABLE, ClutterAnimatable))
38 #define CLUTTER_IS_ANIMATABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_ANIMATABLE))
39 #define CLUTTER_ANIMATABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_ANIMATABLE, ClutterAnimatableIface))
41 typedef struct _ClutterAnimatableIface ClutterAnimatableIface;
46 * #ClutterAnimatable is an opaque structure whose members cannot be directly
53 * ClutterAnimatableIface:
54 * @animate_property: virtual function for custom interpolation of a
55 * property. This virtual function is deprecated
56 * @find_property: virtual function for retrieving the #GParamSpec of
57 * an animatable property
58 * @get_initial_state: virtual function for retrieving the initial
59 * state of an animatable property
60 * @set_final_state: virtual function for setting the state of an
62 * @interpolate_value: virtual function for interpolating the progress
65 * Base interface for #GObject<!-- -->s that can be animated by a
66 * a #ClutterAnimation.
70 struct _ClutterAnimatableIface
73 GTypeInterface parent_iface;
76 gboolean (* animate_property) (ClutterAnimatable *animatable,
77 ClutterAnimation *animation,
78 const gchar *property_name,
79 const GValue *initial_value,
80 const GValue *final_value,
83 GParamSpec *(* find_property) (ClutterAnimatable *animatable,
84 const gchar *property_name);
85 void (* get_initial_state) (ClutterAnimatable *animatable,
86 const gchar *property_name,
88 void (* set_final_state) (ClutterAnimatable *animatable,
89 const gchar *property_name,
91 gboolean (* interpolate_value) (ClutterAnimatable *animatable,
92 const gchar *property_name,
93 ClutterInterval *interval,
98 GType clutter_animatable_get_type (void) G_GNUC_CONST;
100 GParamSpec *clutter_animatable_find_property (ClutterAnimatable *animatable,
101 const gchar *property_name);
102 void clutter_animatable_get_initial_state (ClutterAnimatable *animatable,
103 const gchar *property_name,
105 void clutter_animatable_set_final_state (ClutterAnimatable *animatable,
106 const gchar *property_name,
107 const GValue *value);
108 gboolean clutter_animatable_interpolate_value (ClutterAnimatable *animatable,
109 const gchar *property_name,
110 ClutterInterval *interval,
116 #endif /* __CLUTTER_ANIMATABLE_H__ */