[clutter] actor: add touch event vfuncs
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] actor: add touch event vfuncs
- Date: Fri, 22 Jun 2012 20:55:34 +0000 (UTC)
commit 1af7de8ac8b438b18dace38f883807eda77316ee
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Wed Jun 13 11:10:55 2012 +0100
actor: add touch event vfuncs
https://bugzilla.gnome.org/show_bug.cgi?id=678047
clutter/clutter-actor.c | 26 ++++++++++++++++++++++++++
clutter/clutter-actor.h | 5 ++++-
2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index a4a2988..b0c874b 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -954,6 +954,7 @@ enum
LEAVE_EVENT,
ALLOCATION_CHANGED,
TRANSITIONS_COMPLETED,
+ TOUCH_EVENT,
LAST_SIGNAL
};
@@ -7419,6 +7420,25 @@ clutter_actor_class_init (ClutterActorClass *klass)
NULL, NULL,
_clutter_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+
+ /**
+ * ClutterActor::touch-event:
+ * @actor: a #ClutterActor
+ *
+ * The ::touch-event signal is emitted each time a touch
+ * begin/end/update/cancel event.
+ *
+ * Since: 1.12
+ */
+ actor_signals[TOUCH_EVENT] =
+ g_signal_new (I_("touch-event"),
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ClutterActorClass, touch_event),
+ _clutter_boolean_handled_accumulator, NULL,
+ _clutter_marshal_BOOLEAN__BOXED,
+ G_TYPE_BOOLEAN, 1,
+ CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
}
static void
@@ -12548,6 +12568,12 @@ clutter_actor_event (ClutterActor *actor,
case CLUTTER_LEAVE:
signal_num = LEAVE_EVENT;
break;
+ case CLUTTER_TOUCH_BEGIN:
+ case CLUTTER_TOUCH_END:
+ case CLUTTER_TOUCH_UPDATE:
+ case CLUTTER_TOUCH_CANCEL:
+ signal_num = TOUCH_EVENT;
+ break;
case CLUTTER_DELETE:
case CLUTTER_DESTROY_NOTIFY:
case CLUTTER_CLIENT_MESSAGE:
diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h
index 7447f77..9c3d702 100644
--- a/clutter/clutter-actor.h
+++ b/clutter/clutter-actor.h
@@ -263,9 +263,12 @@ struct _ClutterActorClass
void (* paint_node) (ClutterActor *self,
ClutterPaintNode *root);
+ gboolean (* touch_event) (ClutterActor *self,
+ ClutterTouchEvent *event);
+
/*< private >*/
/* padding for future expansion */
- gpointer _padding_dummy[27];
+ gpointer _padding_dummy[26];
};
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]