summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-10-27 00:07:01 +0200
committerBenjamin Otte <otte@redhat.com>2016-10-27 05:03:06 +0200
commitdd105f3db87cc515179150b5e844eca73ecdcb3d (patch)
tree92dd712e3a1aef189756f641802694dc9e67850d
parentb1f61b6fcc73e825c635ec6d312bbab8b62d6886 (diff)
downloadgtk+-dd105f3db87cc515179150b5e844eca73ecdcb3d.tar.gz
gdk: Remove gdk_window_set_invalidate_handler()
It's not used anymore.
-rw-r--r--docs/reference/gdk/gdk4-sections.txt2
-rw-r--r--docs/reference/gtk/drawing-model.xml14
-rw-r--r--gdk/gdkinternals.h1
-rw-r--r--gdk/gdkwindow.c27
-rw-r--r--gdk/gdkwindow.h20
5 files changed, 0 insertions, 64 deletions
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 7d51e65351..419ce893dd 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 1304603dcd..a6a52853fb 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 b9b113cd57..81b1e93bb6 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 242b26204a..30647c70fa 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 4765303534..0991982039 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