From 6184bf1b6e19fb73d96f20aa4f6bdf26ec299a0e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 20 Dec 2011 12:28:06 +0000 Subject: [PATCH] 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 file changed, 21 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-event.h b/clutter/clutter-event.h index d07c92772..a6d49ca07 100644 --- a/clutter/clutter-event.h +++ b/clutter/clutter-event.h @@ -31,6 +31,8 @@ #include #include +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;