From b69fdbbd047fce2c370073688cc50ec81beb03df Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 26 Aug 2010 01:17:04 +0200 Subject: [PATCH] API: Remove gdk_window_get_internal_paint_info() This function should not exist in public API, it exposes too many internals. --- docs/reference/gdk/gdk3-sections.txt | 1 - gdk/gdk.symbols | 1 - gdk/gdkwindow.c | 81 ---------------------------- gdk/gdkwindow.h | 5 -- 4 files changed, 88 deletions(-) diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt index 1b0fcaa019..85b1015a9d 100644 --- a/docs/reference/gdk/gdk3-sections.txt +++ b/docs/reference/gdk/gdk3-sections.txt @@ -449,7 +449,6 @@ gdk_window_thaw_updates gdk_window_process_all_updates gdk_window_process_updates gdk_window_set_debug_updates -gdk_window_get_internal_paint_info gdk_window_enable_synchronized_configure gdk_window_configure_finished diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols index 7a9e959774..4d2526eb3b 100644 --- a/gdk/gdk.symbols +++ b/gdk/gdk.symbols @@ -622,7 +622,6 @@ gdk_window_foreign_new gdk_window_freeze_toplevel_updates_libgtk_only gdk_window_freeze_updates gdk_window_get_children -gdk_window_get_internal_paint_info gdk_window_get_parent gdk_window_get_effective_parent #ifndef GDK_MULTIDEVICE_SAFE diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 03e325bef9..5c1c1467bc 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -3424,87 +3424,6 @@ gdk_window_flush_recursive (GdkWindowObject *window) gdk_window_flush_recursive_helper (window, window->impl); } -static void -gdk_window_get_offsets (GdkWindow *window, - gint *x_offset, - gint *y_offset) -{ - GdkWindowObject *private = (GdkWindowObject *)window; - - if (private->paint_stack) - { - GdkWindowPaint *paint = private->paint_stack->data; - *x_offset = paint->x_offset; - *y_offset = paint->y_offset; - } - else - { - *x_offset = -private->abs_x; - *y_offset = -private->abs_y; - } -} - -/** - * gdk_window_get_internal_paint_info: - * @window: a #GdkWindow - * @real_drawable: (out): location to store the drawable to which drawing should be - * done. - * @x_offset: (out): location to store the X offset between coordinates in @window, - * and the underlying window system primitive coordinates for - * *@real_drawable. - * @y_offset: (out): location to store the Y offset between coordinates in @window, - * and the underlying window system primitive coordinates for - * *@real_drawable. - * - * If you bypass the GDK layer and use windowing system primitives to - * draw directly onto a #GdkWindow, then you need to deal with two - * details: there may be an offset between GDK coordinates and windowing - * system coordinates, and GDK may have redirected drawing to a offscreen - * pixmap as the result of a gdk_window_begin_paint_region() calls. - * This function allows retrieving the information you need to compensate - * for these effects. - * - * This function exposes details of the GDK implementation, and is thus - * likely to change in future releases of GDK. - **/ -void -gdk_window_get_internal_paint_info (GdkWindow *window, - GdkDrawable **real_drawable, - gint *x_offset, - gint *y_offset) -{ - gint x_off, y_off; - - GdkWindowObject *private; - - g_return_if_fail (GDK_IS_WINDOW (window)); - - private = (GdkWindowObject *)window; - - if (real_drawable) - { - if (private->paint_stack) - { - GdkWindowPaint *paint = private->paint_stack->data; - *real_drawable = paint->pixmap; - } - else - { - /* This means you're probably gonna be doing some weird shit - directly to the window, so we flush all outstanding stuff */ - gdk_window_flush (window); - *real_drawable = window; - } - } - - gdk_window_get_offsets (window, &x_off, &y_off); - - if (x_offset) - *x_offset = x_off; - if (y_offset) - *y_offset = y_off; -} - static GdkDrawable * gdk_window_get_source_drawable (GdkDrawable *drawable) { diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h index 540bcd3fdc..4c02cc2849 100644 --- a/gdk/gdkwindow.h +++ b/gdk/gdkwindow.h @@ -836,11 +836,6 @@ void gdk_window_constrain_size (GdkGeometry *geometry, gint *new_width, gint *new_height); -void gdk_window_get_internal_paint_info (GdkWindow *window, - GdkDrawable **real_drawable, - gint *x_offset, - gint *y_offset); - void gdk_window_enable_synchronized_configure (GdkWindow *window); void gdk_window_configure_finished (GdkWindow *window);