gdk: Make GdkEventSequence a boxed type

Not much to copy nor free, but this'll make bindings happy
This commit is contained in:
Carlos Garnacho 2014-05-20 14:07:16 +02:00
parent 5fdf07547f
commit 0d4e75f078
2 changed files with 21 additions and 1 deletions

View File

@ -1952,7 +1952,7 @@ gdk_event_get_screen (const GdkEvent *event)
* %GDK_TOUCH_END or %GDK_TOUCH_CANCEL, returns the #GdkEventSequence
* to which the event belongs. Otherwise, return %NULL.
*
* Returns: the event sequence that the event belongs to
* Returns: (transfer none): the event sequence that the event belongs to
*
* Since: 3.4
*/
@ -2209,6 +2209,22 @@ G_DEFINE_BOXED_TYPE (GdkEvent, gdk_event,
gdk_event_copy,
gdk_event_free)
static GdkEventSequence *
gdk_event_sequence_copy (GdkEventSequence *sequence)
{
return sequence;
}
static void
gdk_event_sequence_free (GdkEventSequence *sequence)
{
/* Nothing to free here */
}
G_DEFINE_BOXED_TYPE (GdkEventSequence, gdk_event_sequence,
gdk_event_sequence_copy,
gdk_event_sequence_free)
/**
* gdk_setting_get:
* @name: the name of the setting.

View File

@ -50,6 +50,7 @@ G_BEGIN_DECLS
#define GDK_TYPE_EVENT (gdk_event_get_type ())
#define GDK_TYPE_EVENT_SEQUENCE (gdk_event_sequence_get_type ())
/**
* GDK_PRIORITY_EVENTS:
@ -1193,6 +1194,9 @@ union _GdkEvent
GDK_AVAILABLE_IN_ALL
GType gdk_event_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_3_14
GType gdk_event_sequence_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
gboolean gdk_events_pending (void);
GDK_AVAILABLE_IN_ALL