Commit de84a7b1 authored by Matthias Clasen's avatar Matthias Clasen

Move gdk_window_lookup to common code

parent 31cd046c
......@@ -10685,3 +10685,21 @@ gdk_window_register_dnd (GdkWindow *window)
{
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->register_dnd (window);
}
/**
* gdk_window_lookup:
* @anid: a native window handle
*
* Looks up the #GdkWindow that wraps the given native window handle.
*
* For example in the X backend, a native window handle is an Xlib
* <type>XID</type>.
*
* Return value: (transfer none): the #GdkWindow wrapper for the native
* window, or %NULL if there is none.
**/
GdkWindow *
gdk_window_lookup (GdkNativeWindow anid)
{
return gdk_window_lookup_for_display (gdk_display_get_default (), anid);
}
......@@ -2868,13 +2868,6 @@ gdk_window_foreign_new_for_display (GdkDisplay *display,
return NULL;
}
GdkWindow*
gdk_window_lookup (GdkNativeWindow anid)
{
/* Foreign windows aren't supported in Mac OS X */
return NULL;
}
GdkWindow *
gdk_window_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid)
{
......
......@@ -685,12 +685,6 @@ gdk_window_foreign_new_for_display (GdkDisplay *display,
return window;
}
GdkWindow*
gdk_window_lookup (GdkNativeWindow hwnd)
{
return (GdkWindow*) gdk_win32_handle_table_lookup (hwnd);
}
void
_gdk_win32_window_destroy (GdkWindow *window,
gboolean recursing,
......@@ -3103,7 +3097,7 @@ gdk_window_lookup_for_display (GdkDisplay *display,
{
g_return_val_if_fail (display == _gdk_display, NULL);
return gdk_window_lookup (anid);
return (GdkWindow*) gdk_win32_handle_table_lookup (hwnd);
}
void
......
......@@ -969,24 +969,6 @@ gdk_window_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid)
return (GdkWindow*) gdk_xid_table_lookup_for_display (display, anid);
}
/**
* gdk_window_lookup:
* @anid: a native window handle.
*
* Looks up the #GdkWindow that wraps the given native window handle.
*
* For example in the X backend, a native window handle is an Xlib
* <type>XID</type>.
*
* Return value: (transfer none): the #GdkWindow wrapper for the native
* window, or %NULL if there is none.
**/
GdkWindow *
gdk_window_lookup (GdkNativeWindow anid)
{
return (GdkWindow*) gdk_xid_table_lookup (anid);
}
static void
gdk_toplevel_x11_free_contents (GdkDisplay *display,
GdkToplevelX11 *toplevel)
......
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