diff --git a/gdk/gdkdrawcontext.c b/gdk/gdkdrawcontext.c index 7a22c49b76..f89939eb0f 100644 --- a/gdk/gdkdrawcontext.c +++ b/gdk/gdkdrawcontext.c @@ -68,6 +68,12 @@ gdk_draw_context_default_surface_resized (GdkDrawContext *context) { } +static void +gdk_draw_context_default_empty_frame (GdkDrawContext *context) +{ + g_warning ("FIXME: Implement"); +} + static void gdk_draw_context_dispose (GObject *gobject) { @@ -161,6 +167,7 @@ gdk_draw_context_class_init (GdkDrawContextClass *klass) gobject_class->dispose = gdk_draw_context_dispose; klass->surface_resized = gdk_draw_context_default_surface_resized; + klass->empty_frame = gdk_draw_context_default_empty_frame; /** * GdkDrawContext:display: (attributes org.gtk.Property.get=gdk_draw_context_get_display) @@ -470,3 +477,17 @@ gdk_draw_context_get_frame_region (GdkDrawContext *context) return priv->frame_region; } + +void +gdk_draw_context_empty_frame (GdkDrawContext *context) +{ + GdkDrawContextPrivate *priv = gdk_draw_context_get_instance_private (context); + + g_return_if_fail (GDK_IS_DRAW_CONTEXT (context)); + g_return_if_fail (priv->surface != NULL); + + if (GDK_SURFACE_DESTROYED (priv->surface)) + return; + + GDK_DRAW_CONTEXT_GET_CLASS (context)->empty_frame (context); +} diff --git a/gdk/gdkdrawcontext.h b/gdk/gdkdrawcontext.h index dd3e347b8e..420b5363f1 100644 --- a/gdk/gdkdrawcontext.h +++ b/gdk/gdkdrawcontext.h @@ -45,6 +45,7 @@ void gdk_draw_context_begin_frame (GdkDrawContext const cairo_region_t *region); GDK_AVAILABLE_IN_ALL void gdk_draw_context_end_frame (GdkDrawContext *context); + GDK_AVAILABLE_IN_ALL gboolean gdk_draw_context_is_in_frame (GdkDrawContext *context); GDK_AVAILABLE_IN_ALL diff --git a/gdk/gdkdrawcontextprivate.h b/gdk/gdkdrawcontextprivate.h index ecc1412cc9..a85cd8b3b5 100644 --- a/gdk/gdkdrawcontextprivate.h +++ b/gdk/gdkdrawcontextprivate.h @@ -46,6 +46,7 @@ struct _GdkDrawContextClass cairo_region_t *update_area); void (* end_frame) (GdkDrawContext *context, cairo_region_t *painted); + void (* empty_frame) (GdkDrawContext *context); void (* surface_resized) (GdkDrawContext *context); }; @@ -54,5 +55,9 @@ void gdk_draw_context_surface_resized (GdkDrawContext void gdk_draw_context_begin_frame_full (GdkDrawContext *context, GdkMemoryDepth depth, const cairo_region_t *region); + +void gdk_draw_context_empty_frame (GdkDrawContext *context); + + G_END_DECLS