Commit df106318 authored by Javier Jardón's avatar Javier Jardón

[gdk] Add gdk_window_has_native() function

https://bugzilla.gnome.org/show_bug.cgi?id=622677
parent f40fea13
......@@ -595,6 +595,7 @@ gdk_window_move_resize
gdk_window_scroll
gdk_window_move_region
gdk_window_flush
gdk_window_has_native
gdk_window_ensure_native
gdk_window_reparent
gdk_window_clear
......
......@@ -661,6 +661,7 @@ gdk_window_get_root_coords
gdk_window_get_deskrelative_origin
gdk_window_set_support_multidevice
gdk_window_get_support_multidevice
gdk_window_has_native
gdk_window_set_background
gdk_window_set_back_pixmap
gdk_window_set_cursor
......
......@@ -2399,6 +2399,29 @@ from_embedder (GdkWindowObject *window,
offscreen_x, offscreen_y);
}
/**
* gdk_window_has_native:
* @window: a #GdkWindow
*
* Checks whether the window has a native window or not. Note that
* you can use gdk_window_ensure_native() if a native window is needed.
*
* Returns: %TRUE if the %window has a native window, %FALSE otherwise.
*
* Since: 2.22
*/
gboolean
gdk_window_has_native (GdkWindow *window)
{
GdkWindowObject *w;
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
w = GDK_WINDOW_OBJECT (window);
return w->parent == NULL || w->parent->impl != w->impl;
}
/**
* gdk_window_get_position:
* @window: a #GdkWindow
......
......@@ -716,6 +716,7 @@ GdkWindow* gdk_window_lookup_for_display (GdkDisplay *display,
/* GdkWindow */
gboolean gdk_window_has_native (GdkWindow *window);
void gdk_window_set_type_hint (GdkWindow *window,
GdkWindowTypeHint hint);
GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window);
......
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