diff --git a/clutter/clutter-stage-window.c b/clutter/clutter-stage-window.c index c6c9f1ad8..450d264a1 100644 --- a/clutter/clutter-stage-window.c +++ b/clutter/clutter-stage-window.c @@ -333,3 +333,30 @@ _clutter_stage_window_can_clip_redraws (ClutterStageWindow *window) return FALSE; } + +void +_clutter_stage_window_set_scale_factor (ClutterStageWindow *window, + int factor) +{ + ClutterStageWindowIface *iface; + + g_return_if_fail (CLUTTER_IS_STAGE_WINDOW (window)); + + iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window); + if (iface->set_scale_factor != NULL) + iface->set_scale_factor (window, factor); +} + +int +_clutter_stage_window_get_scale_factor (ClutterStageWindow *window) +{ + ClutterStageWindowIface *iface; + + g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), 1); + + iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window); + if (iface->get_scale_factor != NULL) + return iface->get_scale_factor (window); + + return 1; +} diff --git a/clutter/clutter-stage-window.h b/clutter/clutter-stage-window.h index 9b38994cc..c6233d1bc 100644 --- a/clutter/clutter-stage-window.h +++ b/clutter/clutter-stage-window.h @@ -84,6 +84,10 @@ struct _ClutterStageWindowIface CoglFramebuffer *(* get_active_framebuffer) (ClutterStageWindow *stage_window); gboolean (* can_clip_redraws) (ClutterStageWindow *stage_window); + + void (* set_scale_factor) (ClutterStageWindow *stage_window, + int factor); + int (* get_scale_factor) (ClutterStageWindow *stage_window); }; GType _clutter_stage_window_get_type (void) G_GNUC_CONST; @@ -137,6 +141,10 @@ CoglFramebuffer *_clutter_stage_window_get_active_framebuffer (ClutterStageWin gboolean _clutter_stage_window_can_clip_redraws (ClutterStageWindow *window); +void _clutter_stage_window_set_scale_factor (ClutterStageWindow *window, + int factor); +int _clutter_stage_window_get_scale_factor (ClutterStageWindow *window); + G_END_DECLS #endif /* __CLUTTER_STAGE_WINDOW_H__ */