gdk: Remove gdk_window_set_invalidate_handler()

It's not used anymore.
This commit is contained in:
Benjamin Otte 2016-10-27 00:07:01 +02:00
parent b1f61b6fcc
commit dd105f3db8
5 changed files with 0 additions and 64 deletions

View File

@ -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

View File

@ -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>

View File

@ -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;
};

View File

@ -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 youre 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);

View File

@ -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