summaryrefslogtreecommitdiff
path: root/gdk/gdkevents.c
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2013-09-10 11:20:28 +0100
committerLionel Landwerlin <llandwerlin@gmail.com>2013-09-10 11:38:38 +0100
commit659a6f3a2f1b8e7c028ab4c74d3d068401e48446 (patch)
treefe2f8d5b1d8bc66b9fcec68ae62261c958628658 /gdk/gdkevents.c
parent6c0769a47cfc40b18f8df71cd84dd110d74acf3f (diff)
downloadgtk+-659a6f3a2f1b8e7c028ab4c74d3d068401e48446.tar.gz
gdk: event: add get_window() method
https://bugzilla.gnome.org/show_bug.cgi?id=707844
Diffstat (limited to 'gdk/gdkevents.c')
-rw-r--r--gdk/gdkevents.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 43e45d77a8..327b543824 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -799,6 +799,24 @@ gdk_event_free (GdkEvent *event)
}
/**
+ * gdk_event_get_window:
+ * @event: a #GdkEvent
+ *
+ * Extracts the #GdkWindow associated with an event.
+ *
+ * Return value: (transfer none): The #GdkWindow associated with the event
+ *
+ * Since: 3.10
+ */
+GdkWindow *
+gdk_event_get_window (const GdkEvent *event)
+{
+ g_return_val_if_fail (event != NULL, NULL);
+
+ return event->any.window;
+}
+
+/**
* gdk_event_get_time:
* @event: a #GdkEvent
*