From 7da930fb75b7a653b2d8360267b0060c6c996e67 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 4 Feb 2011 15:08:48 +0000 Subject: [PATCH] stage-window: Add ::redraw virtual function How to redraw a ClutterStage's implementation should be part of the ClutterStageWindow interface. --- clutter/clutter-stage-window.c | 12 ++++++++++++ clutter/clutter-stage-window.h | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/clutter/clutter-stage-window.c b/clutter/clutter-stage-window.c index 173f2dfbc..a438d5098 100644 --- a/clutter/clutter-stage-window.c +++ b/clutter/clutter-stage-window.c @@ -180,3 +180,15 @@ _clutter_stage_window_set_accept_focus (ClutterStageWindow *window, if (iface->set_accept_focus) iface->set_accept_focus (window, accept_focus); } + +void +_clutter_stage_window_redraw (ClutterStageWindow *window) +{ + ClutterStageWindowIface *iface; + + g_return_if_fail (CLUTTER_IS_STAGE_WINDOW (window)); + + iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window); + if (iface->redraw) + iface->redraw (window); +} diff --git a/clutter/clutter-stage-window.h b/clutter/clutter-stage-window.h index fb985c1c9..d616d2b11 100644 --- a/clutter/clutter-stage-window.h +++ b/clutter/clutter-stage-window.h @@ -66,6 +66,8 @@ struct _ClutterStageWindowIface void (* set_accept_focus) (ClutterStageWindow *stage_window, gboolean accept_focus); + + void (* redraw) (ClutterStageWindow *stage_window); }; GType clutter_stage_window_get_type (void) G_GNUC_CONST; @@ -103,6 +105,8 @@ gboolean _clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *w void _clutter_stage_window_set_accept_focus (ClutterStageWindow *window, gboolean accept_focus); +void _clutter_stage_window_redraw (ClutterStageWindow *window); + G_END_DECLS #endif /* __CLUTTER_STAGE_WINDOW_H__ */