Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call

This commit is contained in:
Alexander Larsson 2008-12-15 14:55:53 +01:00 committed by Alexander Larsson
parent f22211c881
commit 36ce54878b
7 changed files with 39 additions and 31 deletions

View File

@ -359,11 +359,6 @@ gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
#define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
void _gdk_windowing_window_queue_translation (GdkWindow *window,
GdkRegion *area,
gint dx,
gint dy);
/* Called to do the windowing system specific part of gdk_window_destroy(),
*

View File

@ -1119,6 +1119,15 @@ gdk_offscreen_window_queue_antiexpose (GdkWindow *window,
return FALSE;
}
static void
gdk_offscreen_window_queue_translation (GdkWindow *window,
GdkRegion *area,
gint dx,
gint dy)
{
}
static void
gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
{
@ -1173,6 +1182,7 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
iface->merge_child_shapes = gdk_offscreen_window_merge_child_shapes;
iface->set_static_gravities = gdk_offscreen_window_set_static_gravities;
iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
iface->queue_translation = gdk_offscreen_window_queue_translation;
iface->get_origin = gdk_offscreen_window_get_origin;
}

View File

@ -5559,9 +5559,8 @@ gdk_window_move_resize_internal (GdkWindow *window,
/* The old_region area is moved and we queue translations for all expose events
to it that will be sent before the copy operation */
/* TODO: Make queue_translation a vtable call instead of hardcoding this crap */
if (!gdk_window_is_offscreen (impl_window))
_gdk_windowing_window_queue_translation ((GdkWindow *)impl_window, old_region, dx, dy);
GDK_WINDOW_IMPL_GET_IFACE (impl_window->impl)->queue_translation ((GdkWindow *)impl_window,
old_region, dx, dy);
/* convert from parent coords to impl */
gdk_region_offset (copy_area, private->abs_x - private->x, private->abs_y - private->y);
@ -5732,15 +5731,13 @@ gdk_window_scroll (GdkWindow *window,
/* Get window clip and convert to real window coords, this
area is moved and we queue translations for all expose events
to it that will be sent before the copy operation */
/* TODO: Make queue_translation a vtable call instead of hardcoding this crap */
if (!gdk_window_is_offscreen (impl_window))
{
source_area = gdk_region_copy (private->clip_region);
/* convert from window coords to real parent */
gdk_region_offset (source_area, private->abs_x, private->abs_y);
_gdk_windowing_window_queue_translation ((GdkWindow *)impl_window, source_area, dx, dy);
GDK_WINDOW_IMPL_GET_IFACE (impl_window->impl)->queue_translation ((GdkWindow *)impl_window,
source_area, dx, dy);
gdk_region_destroy (source_area);
}
/* convert from window coords to impl */
gdk_region_offset (copy_area, private->abs_x, private->abs_y);
@ -5809,12 +5806,9 @@ gdk_window_move_region (GdkWindow *window,
gdk_window_invalidate_region (window, nocopy_area, FALSE);
gdk_region_destroy (nocopy_area);
/* TODO: Make queue_translation a vtable call instead of hardcoding this crap */
if (!gdk_window_is_offscreen (impl_window))
{
gdk_region_offset (source_area, private->abs_x, private->abs_y);
_gdk_windowing_window_queue_translation ((GdkWindow *)impl_window, source_area, dx, dy);
}
GDK_WINDOW_IMPL_GET_IFACE (impl_window->impl)->queue_translation ((GdkWindow *)impl_window,
source_area, dx, dy);
/* convert from window coords to impl */
gdk_region_offset (copy_area, private->abs_x, private->abs_y);

View File

@ -108,6 +108,11 @@ struct _GdkWindowImplIface
*/
gboolean (* queue_antiexpose) (GdkWindow *window,
GdkRegion *update_area);
void (* queue_translation) (GdkWindow *window,
GdkRegion *area,
gint dx,
gint dy);
};
/* Interface Functions */

View File

@ -357,7 +357,7 @@ gdk_window_queue (GdkWindow *window,
}
void
_gdk_windowing_window_queue_translation (GdkWindow *window,
_gdk_x11_window_queue_translation (GdkWindow *window,
GdkRegion *area,
gint dx,
gint dy)

View File

@ -129,7 +129,10 @@ void _gdk_window_process_expose (GdkWindow *window,
gboolean _gdk_x11_window_queue_antiexpose (GdkWindow *window,
GdkRegion *area);
void _gdk_x11_window_queue_translation (GdkWindow *window,
GdkRegion *area,
gint dx,
gint dy);
void _gdk_selection_window_destroyed (GdkWindow *window);
gboolean _gdk_selection_filter_clear_event (XSelectionClearEvent *event);

View File

@ -5925,6 +5925,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
iface->merge_child_shapes = gdk_window_x11_merge_child_shapes;
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;
}
#define __GDK_WINDOW_X11_C__