[gtk+/rendering-cleanup: 127/141] API: Add gdk_window_get_display()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 127/141] API: Add gdk_window_get_display()
- Date: Sat, 11 Sep 2010 03:11:18 +0000 (UTC)
commit 6940bfb900c7ddae5968bb1a07067ab8333c55c3
Author: Benjamin Otte <otte redhat com>
Date: Sun Aug 29 02:03:19 2010 +0200
API: Add gdk_window_get_display()
docs/reference/gdk/gdk3-sections.txt | 1 +
gdk/gdk.symbols | 1 +
gdk/gdkwindow.c | 19 +++++++++++++++++++
gdk/gdkwindow.h | 1 +
4 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 223be96..46fc167 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -359,6 +359,7 @@ GdkWindowAttributesType
gdk_window_new
gdk_window_destroy
gdk_window_get_window_type
+gdk_window_get_display
gdk_window_get_screen
gdk_window_get_visual
gdk_window_at_pointer
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 3a1ed0c..ecee325 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -570,6 +570,7 @@ gdk_window_get_accept_focus
gdk_window_get_background_pattern
gdk_window_get_composited
gdk_window_get_cursor
+gdk_window_get_display
gdk_window_get_focus_on_map
gdk_window_get_geometry
gdk_window_get_modal_hint
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index f6d111e..083b5dd 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2207,6 +2207,25 @@ gdk_window_get_screen (GdkWindow *window)
}
/**
+ * gdk_window_get_display:
+ * @window: a #GdkWindow
+ *
+ * Gets the #GdkDisplay associated with a #GdkWindow.
+ *
+ * Return value: the #GdkDisplay associated with @window
+ **/
+GdkDisplay *
+gdk_window_get_display (GdkWindow *window)
+{
+ GdkWindowObject *private;
+
+ g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
+
+ private = (GdkWindowObject *) window;
+
+ return gdk_screen_get_display (gdk_visual_get_screen (private->visual));
+}
+/**
* gdk_window_is_destroyed:
* @window: a #GdkWindow
*
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 74667ca..b99af20 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -507,6 +507,7 @@ gboolean gdk_window_is_destroyed (GdkWindow *window);
GdkVisual * gdk_window_get_visual (GdkWindow *window);
GdkScreen * gdk_window_get_screen (GdkWindow *window);
+GdkDisplay * gdk_window_get_display (GdkWindow *window);
#ifndef GDK_MULTIDEVICE_SAFE
GdkWindow* gdk_window_at_pointer (gint *win_x,
gint *win_y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]