4 * An OpenGL based 'interactive canvas' library.
6 * Copyright (C) 2010 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_CONSTRAINT_H__
30 #define __CLUTTER_CONSTRAINT_H__
32 #include <clutter/clutter-actor-meta.h>
36 #define CLUTTER_TYPE_CONSTRAINT (clutter_constraint_get_type ())
37 #define CLUTTER_CONSTRAINT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_CONSTRAINT, ClutterConstraint))
38 #define CLUTTER_IS_CONSTRAINT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_CONSTRAINT))
39 #define CLUTTER_CONSTRAINT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_CONSTRAINT, ClutterConstraintClass))
40 #define CLUTTER_IS_CONSTRAINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_CONSTRAINT))
41 #define CLUTTER_CONSTRAINT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_CONSTRAINT, ClutterConstraintClass))
43 typedef struct _ClutterConstraintClass ClutterConstraintClass;
48 * The <structname>ClutterConstraint</structname> structure contains only
49 * private data and should be accessed using the provided API
53 struct _ClutterConstraint
56 ClutterActorMeta parent_instance;
60 * ClutterConstraintClass:
62 * The <structname>ClutterConstraintClass</structname> structure contains
67 struct _ClutterConstraintClass
70 ClutterActorMetaClass parent_class;
72 void (* update_allocation) (ClutterConstraint *constraint,
74 ClutterActorBox *allocation);
77 void (* _clutter_constraint1) (void);
78 void (* _clutter_constraint2) (void);
79 void (* _clutter_constraint3) (void);
80 void (* _clutter_constraint4) (void);
81 void (* _clutter_constraint5) (void);
82 void (* _clutter_constraint6) (void);
83 void (* _clutter_constraint7) (void);
84 void (* _clutter_constraint8) (void);
87 GType clutter_constraint_get_type (void) G_GNUC_CONST;
89 /* ClutterActor API */
90 void clutter_actor_add_constraint (ClutterActor *self,
91 ClutterConstraint *constraint);
92 void clutter_actor_add_constraint_with_name (ClutterActor *self,
94 ClutterConstraint *constraint);
95 void clutter_actor_remove_constraint (ClutterActor *self,
96 ClutterConstraint *constraint);
97 void clutter_actor_remove_constraint_by_name (ClutterActor *self,
99 GList * clutter_actor_get_constraints (ClutterActor *self);
100 ClutterConstraint *clutter_actor_get_constraint (ClutterActor *self,
102 void clutter_actor_clear_constraints (ClutterActor *self);
104 gboolean clutter_actor_has_constraints (ClutterActor *self);
108 #endif /* __CLUTTER_CONSTRAINT_H__ */