[gtk+] gdk: Remove gdk_window_set_invalidate_handler()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Remove gdk_window_set_invalidate_handler()
- Date: Thu, 27 Oct 2016 03:03:40 +0000 (UTC)
commit dd105f3db87cc515179150b5e844eca73ecdcb3d
Author: Benjamin Otte <otte redhat com>
Date: Thu Oct 27 00:07:01 2016 +0200
gdk: Remove gdk_window_set_invalidate_handler()
It's not used anymore.
docs/reference/gdk/gdk4-sections.txt | 2 --
docs/reference/gtk/drawing-model.xml | 14 --------------
gdk/gdkinternals.h | 1 -
gdk/gdkwindow.c | 27 ---------------------------
gdk/gdkwindow.h | 20 --------------------
5 files changed, 0 insertions(+), 64 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 7d51e65..419ce89 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -374,8 +374,6 @@ gdk_window_begin_draw_frame
gdk_window_end_draw_frame
gdk_window_should_draw
gdk_window_get_visible_region
-GdkWindowInvalidateHandlerFunc
-gdk_window_set_invalidate_handler
<SUBSECTION>
gdk_window_invalidate_rect
diff --git a/docs/reference/gtk/drawing-model.xml b/docs/reference/gtk/drawing-model.xml
index 1304603..a6a5285 100644
--- a/docs/reference/gtk/drawing-model.xml
+++ b/docs/reference/gtk/drawing-model.xml
@@ -241,20 +241,6 @@
hardware where self-copy operations are problematic (they break the
rendering pipeline).
</para>
-
- <para>
- Since the above causes some overhead, we introduce a caching mechanism.
- Containers that scroll a lot (GtkViewport, GtkTextView, GtkTreeView,
- etc) allocate an offscreen image during scrolling and render their
- children to it (which is possible since drawing is fully hierarchical).
- The offscreen image is a bit larger than the visible area, so most of
- the time when scrolling it just needs to draw the offscreen in a
- different position. This matches contemporary graphics hardware much
- better, as well as allowing efficient transparent backgrounds.
- In order for this to work such containers need to detect when child
- widgets are redrawn so that it can update the offscreen. This can be
- done with the new gdk_window_set_invalidate_handler() function.
- </para>
</refsect2>
</refsect1>
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index b9b113c..81b1e93 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -328,7 +328,6 @@ struct _GdkWindow
gulong device_changed_handler_id;
GdkFrameClock *frame_clock; /* NULL to use from parent or default */
- GdkWindowInvalidateHandlerFunc invalidate_handler;
GdkDrawingContext *drawing_context;
};
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 242b262..30647c7 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3771,30 +3771,6 @@ gdk_window_invalidate_rect (GdkWindow *window,
gdk_window_invalidate_rect_full (window, rect, invalidate_children);
}
-/**
- * gdk_window_set_invalidate_handler: (skip)
- * @window: a #GdkWindow
- * @handler: a #GdkWindowInvalidateHandlerFunc callback function
- *
- * Registers an invalidate handler for a specific window. This
- * will get called whenever a region in the window or its children
- * is invalidated.
- *
- * This can be used to record the invalidated region, which is
- * useful if you are keeping an offscreen copy of some region
- * and want to keep it up to date. You can also modify the
- * invalidated region in case you’re doing some effect where
- * e.g. a child widget appears in multiple places.
- *
- * Since: 3.10
- **/
-void
-gdk_window_set_invalidate_handler (GdkWindow *window,
- GdkWindowInvalidateHandlerFunc handler)
-{
- window->invalidate_handler = handler;
-}
-
static void
impl_window_add_update_area (GdkWindow *impl_window,
cairo_region_t *region)
@@ -3920,9 +3896,6 @@ gdk_window_invalidate_maybe_recurse_full (GdkWindow *window,
while (window != NULL &&
!cairo_region_is_empty (visible_region))
{
- if (window->invalidate_handler)
- window->invalidate_handler (window, visible_region);
-
r.width = window->width;
r.height = window->height;
cairo_region_intersect_rectangle (visible_region, &r);
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 4765303..0991982 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -641,26 +641,6 @@ GdkWindowState gdk_window_get_state (GdkWindow *window);
/* GdkWindow */
-/**
- * GdkWindowInvalidateHandlerFunc:
- * @window: a #GdkWindow
- * @region: a #cairo_region_t
- *
- * Whenever some area of the window is invalidated (directly in the
- * window or in a child window) this gets called with @region in
- * the coordinate space of @window. You can use @region to just
- * keep track of the dirty region, or you can actually change
- * @region in case you are doing display tricks like showing
- * a child in multiple places.
- *
- * Since: 3.10
- */
-typedef void (*GdkWindowInvalidateHandlerFunc) (GdkWindow *window,
- cairo_region_t *region);
-GDK_AVAILABLE_IN_3_10
-void gdk_window_set_invalidate_handler (GdkWindow *window,
- GdkWindowInvalidateHandlerFunc handler);
-
GDK_AVAILABLE_IN_ALL
gboolean gdk_window_has_native (GdkWindow *window);
GDK_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]