event: define a boxed type for ClutterEventSequence

This allows for some minimal interaction from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=733561
This commit is contained in:
Carlos Garnacho 2014-07-21 23:46:44 +02:00
parent c167d3a4d3
commit 958ffd4d40
2 changed files with 21 additions and 0 deletions

View File

@ -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)
{

View File

@ -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