[clutter/clutter-1.20] event: define a boxed type for ClutterEventSequence



commit 958ffd4d40de4edb46140c7a282176aa8bb734c2
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jul 21 23:46:44 2014 +0200

    event: define a boxed type for ClutterEventSequence
    
    This allows for some minimal interaction from bindings.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733561

 clutter/clutter-event.c |   17 +++++++++++++++++
 clutter/clutter-event.h |    4 ++++
 2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-event.c b/clutter/clutter-event.c
index 06870c6..26d5611 100644
--- a/clutter/clutter-event.c
+++ b/clutter/clutter-event.c
@@ -79,6 +79,23 @@ G_DEFINE_BOXED_TYPE (ClutterEvent, clutter_event,
                      clutter_event_copy,
                      clutter_event_free);
 
+static ClutterEventSequence *
+clutter_event_sequence_copy (ClutterEventSequence *sequence)
+{
+  /* Nothing to copy here */
+  return sequence;
+}
+
+static void
+clutter_event_sequence_free (ClutterEventSequence *sequence)
+{
+  /* Nothing to free here */
+}
+
+G_DEFINE_BOXED_TYPE (ClutterEventSequence, clutter_event_sequence,
+                     clutter_event_sequence_copy,
+                     clutter_event_sequence_free);
+
 static gboolean
 is_event_allocated (const ClutterEvent *event)
 {
diff --git a/clutter/clutter-event.h b/clutter/clutter-event.h
index d320569..9e39693 100644
--- a/clutter/clutter-event.h
+++ b/clutter/clutter-event.h
@@ -34,6 +34,7 @@
 G_BEGIN_DECLS
 
 #define CLUTTER_TYPE_EVENT             (clutter_event_get_type ())
+#define CLUTTER_TYPE_EVENT_SEQUENCE    (clutter_event_sequence_get_type ())
 
 /**
  * CLUTTER_PRIORITY_EVENTS:
@@ -426,6 +427,9 @@ typedef gboolean (* ClutterEventFilterFunc) (const ClutterEvent *event,
 CLUTTER_AVAILABLE_IN_ALL
 GType clutter_event_get_type (void) G_GNUC_CONST;
 
+CLUTTER_AVAILABLE_IN_1_20
+GType clutter_event_sequence_get_type (void) G_GNUC_CONST;
+
 CLUTTER_AVAILABLE_IN_ALL
 gboolean                clutter_events_pending                  (void);
 CLUTTER_AVAILABLE_IN_ALL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]