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.
This commit is contained in:
Emmanuele Bassi 2011-12-20 12:28:06 +00:00
parent 83c560db98
commit 6184bf1b6e

View File

@ -31,6 +31,8 @@
#include <clutter/clutter-types.h> #include <clutter/clutter-types.h>
#include <clutter/clutter-input-device.h> #include <clutter/clutter-input-device.h>
G_BEGIN_DECLS
#define CLUTTER_TYPE_EVENT (clutter_event_get_type ()) #define CLUTTER_TYPE_EVENT (clutter_event_get_type ())
/** /**
@ -51,7 +53,25 @@
*/ */
#define CLUTTER_CURRENT_TIME 0L #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 _ClutterAnyEvent ClutterAnyEvent;
typedef struct _ClutterButtonEvent ClutterButtonEvent; typedef struct _ClutterButtonEvent ClutterButtonEvent;