4 * An OpenGL based 'interactive canvas' library.
6 * Copyright (C) 2008 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 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
26 #error "Only <clutter/clutter.h> can be included directly."
29 #ifndef __CLUTTER_INTERVAL_H__
30 #define __CLUTTER_INTERVAL_H__
32 #include <clutter/clutter-types.h>
36 #define CLUTTER_TYPE_INTERVAL (clutter_interval_get_type ())
37 #define CLUTTER_INTERVAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_INTERVAL, ClutterInterval))
38 #define CLUTTER_IS_INTERVAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_INTERVAL))
39 #define CLUTTER_INTERVAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_INTERVAL, ClutterIntervalClass))
40 #define CLUTTER_IS_INTERVAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_INTERVAL))
41 #define CLUTTER_INTERVAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_INTERVAL, ClutterIntervalClass))
43 typedef struct _ClutterIntervalPrivate ClutterIntervalPrivate;
44 typedef struct _ClutterIntervalClass ClutterIntervalClass;
49 * The #ClutterInterval structure contains only private data and should
50 * be accessed using the provided functions.
54 struct _ClutterInterval
57 GInitiallyUnowned parent_instance;
59 ClutterIntervalPrivate *priv;
63 * ClutterIntervalClass:
64 * @validate: virtual function for validating an interval
66 * @compute_value: virtual function for computing the value
67 * inside an interval using an adimensional factor between 0 and 1
69 * The #ClutterIntervalClass contains only private data.
73 struct _ClutterIntervalClass
76 GInitiallyUnownedClass parent_class;
79 gboolean (* validate) (ClutterInterval *interval,
81 gboolean (* compute_value) (ClutterInterval *interval,
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);
95 GType clutter_interval_get_type (void) G_GNUC_CONST;
97 ClutterInterval *clutter_interval_new (GType gtype,
99 ClutterInterval *clutter_interval_new_with_values (GType gtype,
100 const GValue *initial,
101 const GValue *final);
103 ClutterInterval *clutter_interval_clone (ClutterInterval *interval);
105 GType clutter_interval_get_value_type (ClutterInterval *interval);
107 void clutter_interval_set_initial (ClutterInterval *interval,
109 void clutter_interval_set_initial_value (ClutterInterval *interval,
110 const GValue *value);
111 void clutter_interval_get_initial_value (ClutterInterval *interval,
113 GValue * clutter_interval_peek_initial_value (ClutterInterval *interval);
114 void clutter_interval_set_final (ClutterInterval *interval,
116 void clutter_interval_set_final_value (ClutterInterval *interval,
117 const GValue *value);
118 void clutter_interval_get_final_value (ClutterInterval *interval,
120 GValue * clutter_interval_peek_final_value (ClutterInterval *interval);
122 void clutter_interval_set_interval (ClutterInterval *interval,
124 void clutter_interval_get_interval (ClutterInterval *interval,
127 gboolean clutter_interval_validate (ClutterInterval *interval,
129 gboolean clutter_interval_compute_value (ClutterInterval *interval,
133 const GValue * clutter_interval_compute (ClutterInterval *interval,
138 #endif /* __CLUTTER_INTERVAL_H__ */