Commit 5b9bbf9d authored by Benjamin Otte's avatar Benjamin Otte

API: Add gdk_window_get_visual() and gdk_window_get_screen()

Now that we store the visual in the GdkWindow, these are rather trivial
accessors.
parent eee6c002
......@@ -363,6 +363,8 @@ GdkWindowAttributesType
gdk_window_new
gdk_window_destroy
gdk_window_get_window_type
gdk_window_get_screen
gdk_window_get_visual
gdk_window_at_pointer
gdk_window_show
gdk_window_show_unraised
......
......@@ -581,6 +581,8 @@ gdk_window_get_origin
gdk_window_get_root_coords
gdk_window_set_support_multidevice
gdk_window_get_support_multidevice
gdk_window_get_screen
gdk_window_get_visual
gdk_window_has_native
gdk_window_set_background
gdk_window_set_background_pattern
......
......@@ -2172,6 +2172,46 @@ gdk_window_get_window_type (GdkWindow *window)
return GDK_WINDOW_TYPE (window);
}
/**
* gdk_window_get_visual:
* @window: a #GdkWindow
*
* Gets the #GdkVisual describing the pixel format of @window.
*
* Return value: a #GdkVisual
**/
GdkVisual*
gdk_window_get_visual (GdkWindow *window)
{
GdkWindowObject *private;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
private = (GdkWindowObject *) window;
return private->visual;
}
/**
* gdk_window_get_screen:
* @window: a #GdkWindow
*
* Gets the #GdkScreen associated with a #GdkWindow.
*
* Return value: the #GdkScreen associated with @window
**/
GdkScreen*
gdk_window_get_screen (GdkWindow *window)
{
GdkWindowObject *private;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
private = (GdkWindowObject *) window;
return gdk_visual_get_screen (private->visual);
}
/**
* gdk_window_is_destroyed:
* @window: a #GdkWindow
......
......@@ -505,6 +505,8 @@ void gdk_window_destroy (GdkWindow *window);
GdkWindowType gdk_window_get_window_type (GdkWindow *window);
gboolean gdk_window_is_destroyed (GdkWindow *window);
GdkVisual * gdk_window_get_visual (GdkWindow *window);
GdkScreen * gdk_window_get_screen (GdkWindow *window);
#ifndef GDK_MULTIDEVICE_SAFE
GdkWindow* gdk_window_at_pointer (gint *win_x,
gint *win_y);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment