[clutter] Add symbolic constants for event propagation



commit 6184bf1b6e19fb73d96f20aa4f6bdf26ec299a0e
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Tue Dec 20 12:28:06 2011 +0000

    Add symbolic constants for event propagation
    
    I always have to think twice before returning a value from an event
    signal handler, and I've been writing them for the past 10 years, so
    it's conceivable that application developers that start with Clutter
    will find them confusing as well.
    
    Simple symbolic names should be easier to use.

 clutter/clutter-event.h |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-event.h b/clutter/clutter-event.h
index d07c927..a6d49ca 100644
--- a/clutter/clutter-event.h
+++ b/clutter/clutter-event.h
@@ -31,6 +31,8 @@
 #include <clutter/clutter-types.h>
 #include <clutter/clutter-input-device.h>
 
+G_BEGIN_DECLS
+
 #define CLUTTER_TYPE_EVENT	(clutter_event_get_type ())
 
 /**
@@ -51,7 +53,25 @@
  */
 #define CLUTTER_CURRENT_TIME    0L
 
-G_BEGIN_DECLS
+/**
+ * CLUTTER_EVENT_PROPAGATE:
+ *
+ * Continues the propagation of an event; this macro should be
+ * used in event-related signals.
+ *
+ * Since: 1.10
+ */
+#define CLUTTER_EVENT_PROPAGATE         FALSE
+
+/**
+ * CLUTTER_EVENT_STOP:
+ *
+ * Stops the propagattion of an event; this macro should be used
+ * in event-related signals.
+ *
+ * Since: 1.10
+ */
+#define CLUTTER_EVENT_STOP              TRUE
 
 typedef struct _ClutterAnyEvent         ClutterAnyEvent;
 typedef struct _ClutterButtonEvent      ClutterButtonEvent;



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