1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Copyright (C) 2010  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 #ifndef __CLUTTER_ACTION_H__
26 #define __CLUTTER_ACTION_H__
27 
28 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
29 #error "Only <clutter/clutter.h> can be included directly."
30 #endif
31 
32 #include <clutter/clutter-actor-meta.h>
33 
34 G_BEGIN_DECLS
35 
36 #define CLUTTER_TYPE_ACTION             (clutter_action_get_type ())
37 #define CLUTTER_ACTION(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_ACTION, ClutterAction))
38 #define CLUTTER_IS_ACTION(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_ACTION))
39 #define CLUTTER_ACTION_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_ACTION, ClutterActionClass))
40 #define CLUTTER_IS_ACTION_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_ACTION))
41 #define CLUTTER_ACTION_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_ACTION, ClutterActionClass))
42 
43 typedef struct _ClutterActionClass      ClutterActionClass;
44 
45 /**
46  * ClutterAction:
47  *
48  * The #ClutterAction structure contains only private data and
49  * should be accessed using the provided API.
50  *
51  * Since: 1.4
52  */
53 struct _ClutterAction
54 {
55   /*< private >*/
56   ClutterActorMeta parent_instance;
57 };
58 
59 /**
60  * ClutterActionClass:
61  *
62  * The ClutterActionClass structure contains only private data
63  *
64  * Since: 1.4
65  */
66 struct _ClutterActionClass
67 {
68   /*< private >*/
69   ClutterActorMetaClass parent_class;
70 
71   void (* _clutter_action1) (void);
72   void (* _clutter_action2) (void);
73   void (* _clutter_action3) (void);
74   void (* _clutter_action4) (void);
75   void (* _clutter_action5) (void);
76   void (* _clutter_action6) (void);
77   void (* _clutter_action7) (void);
78   void (* _clutter_action8) (void);
79 };
80 
81 CLUTTER_AVAILABLE_IN_1_4
82 GType clutter_action_get_type (void) G_GNUC_CONST;
83 
84 /* ClutterActor API */
85 CLUTTER_AVAILABLE_IN_1_4
86 void           clutter_actor_add_action            (ClutterActor  *self,
87                                                     ClutterAction *action);
88 CLUTTER_AVAILABLE_IN_1_4
89 void           clutter_actor_add_action_with_name  (ClutterActor  *self,
90                                                     const gchar   *name,
91                                                     ClutterAction *action);
92 CLUTTER_AVAILABLE_IN_1_4
93 void           clutter_actor_remove_action         (ClutterActor  *self,
94                                                     ClutterAction *action);
95 CLUTTER_AVAILABLE_IN_1_4
96 void           clutter_actor_remove_action_by_name (ClutterActor  *self,
97                                                     const gchar   *name);
98 CLUTTER_AVAILABLE_IN_1_4
99 ClutterAction *clutter_actor_get_action            (ClutterActor  *self,
100                                                     const gchar   *name);
101 CLUTTER_AVAILABLE_IN_1_4
102 GList *        clutter_actor_get_actions           (ClutterActor  *self);
103 CLUTTER_AVAILABLE_IN_1_4
104 void           clutter_actor_clear_actions         (ClutterActor  *self);
105 
106 CLUTTER_AVAILABLE_IN_1_10
107 gboolean       clutter_actor_has_actions           (ClutterActor  *self);
108 
109 G_END_DECLS
110 
111 #endif /* __CLUTTER_ACTION_H__ */
112