Make gdk_windowing_window_destroy a GdkWindowImpl method

This commit is contained in:
Alexander Larsson 2008-12-15 15:04:44 +01:00 committed by Alexander Larsson
parent 36ce54878b
commit 0ba99e6e7b
5 changed files with 28 additions and 31 deletions

View File

@ -360,23 +360,6 @@ gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
#define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
/* Called to do the windowing system specific part of gdk_window_destroy(),
*
* window: The window being destroyed
* recursing: If TRUE, then this is being called because a parent
* was destroyed. This generally means that the call to the windowing system
* to destroy the window can be omitted, since it will be destroyed as a result
* of the parent being destroyed. Unless @foreign_destroy
*
* foreign_destroy: If TRUE, the window or a parent was destroyed by some external
* agency. The window has already been destroyed and no windowing
* system calls should be made. (This may never happen for some
* windowing systems.)
*/
void _gdk_windowing_window_destroy (GdkWindow *window,
gboolean recursing,
gboolean foreign_destroy);
/* Called when gdk_window_destroy() is called on a foreign window
* or an ancestor of the foreign window. It should generally reparent
* the window out of it's current heirarchy, hide it, and then
@ -546,8 +529,6 @@ void _gdk_offscreen_window_new (GdkWindow *window,
GdkVisual *visual,
GdkWindowAttr *attributes,
gint attributes_mask);
void _gdk_offscreen_window_destroy (GdkWindow *window,
gboolean recursing);
/************************************

View File

@ -103,9 +103,10 @@ gdk_offscreen_window_init (GdkOffscreenWindow *window)
{
}
void
_gdk_offscreen_window_destroy (GdkWindow *window,
gboolean recursing)
static void
gdk_offscreen_window_destroy (GdkWindow *window,
gboolean recursing,
gboolean foreign_destroy)
{
GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
GdkOffscreenWindow *offscreen;
@ -1184,6 +1185,7 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
iface->queue_translation = gdk_offscreen_window_queue_translation;
iface->get_origin = gdk_offscreen_window_get_origin;
iface->destroy = gdk_offscreen_window_destroy;
}
#define __GDK_OFFSCREEN_WINDOW_C__

View File

@ -1261,10 +1261,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
if (gdk_window_has_impl (private))
{
if (gdk_window_is_offscreen (private))
_gdk_offscreen_window_destroy (window, recursing);
else
_gdk_windowing_window_destroy (window, recursing, foreign_destroy);
GDK_WINDOW_IMPL_GET_IFACE (private->impl)->destroy (window, recursing, foreign_destroy);
}
else
{

View File

@ -113,6 +113,22 @@ struct _GdkWindowImplIface
gint dx,
gint dy);
/* Called to do the windowing system specific part of gdk_window_destroy(),
*
* window: The window being destroyed
* recursing: If TRUE, then this is being called because a parent
* was destroyed. This generally means that the call to the windowing system
* to destroy the window can be omitted, since it will be destroyed as a result
* of the parent being destroyed. Unless @foreign_destroy
*
* foreign_destroy: If TRUE, the window or a parent was destroyed by some external
* agency. The window has already been destroyed and no windowing
* system calls should be made. (This may never happen for some
* windowing systems.)
*/
void (* destroy) (GdkWindow *window,
gboolean recursing,
gboolean foreign_destroy);
};
/* Interface Functions */

View File

@ -1001,8 +1001,8 @@ gdk_toplevel_x11_free_contents (GdkDisplay *display,
#endif
}
void
_gdk_windowing_window_destroy (GdkWindow *window,
static void
_gdk_x11_window_destroy (GdkWindow *window,
gboolean recursing,
gboolean foreign_destroy)
{
@ -5926,6 +5926,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
iface->set_static_gravities = gdk_window_x11_set_static_gravities;
iface->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
iface->queue_translation = _gdk_x11_window_queue_translation;
iface->destroy = _gdk_x11_window_destroy;
}
#define __GDK_WINDOW_X11_C__