diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-04-21 01:27:07 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-05-07 16:34:04 +0200 |
commit | e13fb1d3e089299da7d1a0b1843bf5b850cdc2df (patch) | |
tree | 996969d0d51e228230129697d464c4b6d97411ce /gdk/gdkwindow.h | |
parent | 590366f0e7944b6228d362d385ae2d631a82a294 (diff) | |
download | gtk+-e13fb1d3e089299da7d1a0b1843bf5b850cdc2df.tar.gz |
Add gdk_window_set_invalidate_handler
This lets you register callbacks for when child widgets invalidate
areas of the window read it and/or change it.
For instance, this lets you do rendering effects and keeping offscreen
caches uptodate.
Diffstat (limited to 'gdk/gdkwindow.h')
-rw-r--r-- | gdk/gdkwindow.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h index b898a394c1..73e6f86494 100644 --- a/gdk/gdkwindow.h +++ b/gdk/gdkwindow.h @@ -679,6 +679,26 @@ gboolean gdk_window_set_static_gravities (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 |