[clutter/wip/action-handle-event: 1/6] action: Add handle_event() virtual function
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/action-handle-event: 1/6] action: Add handle_event() virtual function
- Date: Tue, 26 Jun 2012 16:16:00 +0000 (UTC)
commit b9bf089887363166bdde4f0cd5578305ff4ab352
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Jun 24 09:01:57 2012 +0100
action: Add handle_event() virtual function
clutter/Makefile.am | 1 +
clutter/clutter-action-private.h | 14 ++++++++++++++
clutter/clutter-action.c | 16 +++++++++++++++-
clutter/clutter-action.h | 33 +++++++++++++++++----------------
4 files changed, 47 insertions(+), 17 deletions(-)
---
diff --git a/clutter/Makefile.am b/clutter/Makefile.am
index 7899493..3982c85 100644
--- a/clutter/Makefile.am
+++ b/clutter/Makefile.am
@@ -209,6 +209,7 @@ source_c = \
# private headers; these should not be distributed or introspected
source_h_priv = \
+ $(srcdir)/clutter-action-private.h \
$(srcdir)/clutter-actor-meta-private.h \
$(srcdir)/clutter-actor-private.h \
$(srcdir)/clutter-backend-private.h \
diff --git a/clutter/clutter-action-private.h b/clutter/clutter-action-private.h
new file mode 100644
index 0000000..66d1e91
--- /dev/null
+++ b/clutter/clutter-action-private.h
@@ -0,0 +1,14 @@
+#ifndef __CLUTTER_ACTION_PRIVATE_H__
+#define __CLUTTER_ACTION_PRIVATE_H__
+
+#include "clutter-action.h"
+#include "clutter-event.h"
+
+G_BEGIN_DECLS
+
+void _clutter_action_handle_event (ClutterAction *action,
+ const ClutterEvent *event);
+
+G_END_DECLS
+
+#endif /* __CLUTTER_ACTION_PRIVATE_H__ */
diff --git a/clutter/clutter-action.c b/clutter/clutter-action.c
index c233fd1..df75f3f 100644
--- a/clutter/clutter-action.c
+++ b/clutter/clutter-action.c
@@ -45,7 +45,7 @@
#include "config.h"
#endif
-#include "clutter-action.h"
+#include "clutter-action-private.h"
#include "clutter-debug.h"
#include "clutter-private.h"
@@ -53,11 +53,25 @@
G_DEFINE_ABSTRACT_TYPE (ClutterAction, clutter_action, CLUTTER_TYPE_ACTOR_META);
static void
+clutter_action_real_handle_event (ClutterAction *self,
+ const ClutterEvent *event)
+{
+}
+
+static void
clutter_action_class_init (ClutterActionClass *klass)
{
+ klass->handle_event = clutter_action_real_handle_event;
}
static void
clutter_action_init (ClutterAction *self)
{
}
+
+void
+_clutter_action_handle_event (ClutterAction *self,
+ const ClutterEvent *event)
+{
+ CLUTTER_ACTION_GET_CLASS (self)->handle_event (self, event);
+}
diff --git a/clutter/clutter-action.h b/clutter/clutter-action.h
index d2e98db..da081a6 100644
--- a/clutter/clutter-action.h
+++ b/clutter/clutter-action.h
@@ -69,6 +69,9 @@ struct _ClutterActionClass
/*< private >*/
ClutterActorMetaClass parent_class;
+ void (* handle_event) (ClutterAction *action,
+ const ClutterEvent *event);
+
void (* _clutter_action1) (void);
void (* _clutter_action2) (void);
void (* _clutter_action3) (void);
@@ -76,27 +79,25 @@ struct _ClutterActionClass
void (* _clutter_action5) (void);
void (* _clutter_action6) (void);
void (* _clutter_action7) (void);
- void (* _clutter_action8) (void);
};
GType clutter_action_get_type (void) G_GNUC_CONST;
/* ClutterActor API */
-void clutter_actor_add_action (ClutterActor *self,
- ClutterAction *action);
-void clutter_actor_add_action_with_name (ClutterActor *self,
- const gchar *name,
- ClutterAction *action);
-void clutter_actor_remove_action (ClutterActor *self,
- ClutterAction *action);
-void clutter_actor_remove_action_by_name (ClutterActor *self,
- const gchar *name);
-ClutterAction *clutter_actor_get_action (ClutterActor *self,
- const gchar *name);
-GList * clutter_actor_get_actions (ClutterActor *self);
-void clutter_actor_clear_actions (ClutterActor *self);
-
-gboolean clutter_actor_has_actions (ClutterActor *self);
+void clutter_actor_add_action (ClutterActor *self,
+ ClutterAction *action);
+void clutter_actor_add_action_with_name (ClutterActor *self,
+ const gchar *name,
+ ClutterAction *action);
+void clutter_actor_remove_action (ClutterActor *self,
+ ClutterAction *action);
+void clutter_actor_remove_action_by_name (ClutterActor *self,
+ const gchar *name);
+ClutterAction * clutter_actor_get_action (ClutterActor *self,
+ const gchar *name);
+GList * clutter_actor_get_actions (ClutterActor *self);
+void clutter_actor_clear_actions (ClutterActor *self);
+gboolean clutter_actor_has_actions (ClutterActor *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]