4 * An OpenGL based 'interactive canvas' library.
6 * Copyright (C) 2012 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/>.
21 * Author: Emmanuele Bassi <ebassi@linux.intel.com>
24 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
25 #error "Only <clutter/clutter.h> can be included directly."
28 #ifndef __CLUTTER_TRANSITION_H__
29 #define __CLUTTER_TRANSITION_H__
31 #include <clutter/clutter-types.h>
32 #include <clutter/clutter-timeline.h>
36 #define CLUTTER_TYPE_TRANSITION (clutter_transition_get_type ())
37 #define CLUTTER_TRANSITION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_TRANSITION, ClutterTransition))
38 #define CLUTTER_IS_TRANSITION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_TRANSITION))
39 #define CLUTTER_TRANSITION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_TRANSITION, ClutterTransitionClass))
40 #define CLUTTER_IS_TRANSITION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_TRANSITION))
41 #define CLUTTER_TRANSITION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_TRANSITION, ClutterTransitionClass))
43 typedef struct _ClutterTransitionPrivate ClutterTransitionPrivate;
44 typedef struct _ClutterTransitionClass ClutterTransitionClass;
49 * The <structname>ClutterTransition</structname> structure contains private
50 * data and should only be accessed using the provided API.
54 struct _ClutterTransition
57 ClutterTimeline parent_instance;
59 ClutterTransitionPrivate *priv;
63 * ClutterTransitionClass:
64 * @attached: virtual function; called when a transition is attached to
65 * a #ClutterAnimatable instance
66 * @detached: virtual function; called when a transition is detached from
67 * a #ClutterAnimatable instance
68 * @compute_value: virtual function; called each frame to compute and apply
69 * the interpolation of the interval
71 * The <structname>ClutterTransitionClass</structname> structure contains
76 struct _ClutterTransitionClass
79 ClutterTimelineClass parent_class;
82 void (* attached) (ClutterTransition *transition,
83 ClutterAnimatable *animatable);
84 void (* detached) (ClutterTransition *transition,
85 ClutterAnimatable *animatable);
87 void (* compute_value) (ClutterTransition *transition,
88 ClutterAnimatable *animatable,
89 ClutterInterval *interval,
96 CLUTTER_AVAILABLE_IN_1_10
97 GType clutter_transition_get_type (void) G_GNUC_CONST;
99 CLUTTER_AVAILABLE_IN_1_10
100 void clutter_transition_set_interval (ClutterTransition *transition,
101 ClutterInterval *interval);
102 CLUTTER_AVAILABLE_IN_1_10
103 ClutterInterval * clutter_transition_get_interval (ClutterTransition *transition);
104 CLUTTER_AVAILABLE_IN_1_12
105 void clutter_transition_set_from_value (ClutterTransition *transition,
106 const GValue *value);
107 CLUTTER_AVAILABLE_IN_1_12
108 void clutter_transition_set_to_value (ClutterTransition *transition,
109 const GValue *value);
110 CLUTTER_AVAILABLE_IN_1_12
111 void clutter_transition_set_from (ClutterTransition *transition,
114 CLUTTER_AVAILABLE_IN_1_12
115 void clutter_transition_set_to (ClutterTransition *transition,
119 CLUTTER_AVAILABLE_IN_1_10
120 void clutter_transition_set_animatable (ClutterTransition *transition,
121 ClutterAnimatable *animatable);
122 CLUTTER_AVAILABLE_IN_1_10
123 ClutterAnimatable * clutter_transition_get_animatable (ClutterTransition *transition);
124 CLUTTER_AVAILABLE_IN_1_10
125 void clutter_transition_set_remove_on_complete (ClutterTransition *transition,
126 gboolean remove_complete);
127 CLUTTER_AVAILABLE_IN_1_10
128 gboolean clutter_transition_get_remove_on_complete (ClutterTransition *transition);
132 #endif /* __CLUTTER_TRANSITION_H__ */