diff --git a/clutter/clutter-stage-manager.c b/clutter/clutter-stage-manager.c index 65ea52097..1d9401143 100644 --- a/clutter/clutter-stage-manager.c +++ b/clutter/clutter-stage-manager.c @@ -224,8 +224,9 @@ clutter_stage_manager_get_default_stage (ClutterStageManager *stage_manager) * * Lists all currently used stages. * - * Return value: (transfer container) (element-type ClutterStage): a newly allocated list - * of #ClutterStage objects. Use g_slist_free() to deallocate it when done. + * Return value: (transfer container) (element-type ClutterStage): a newly + * allocated list of #ClutterStage objects. Use g_slist_free() to + * deallocate it when done. * * Since: 0.8 */ @@ -235,6 +236,25 @@ clutter_stage_manager_list_stages (ClutterStageManager *stage_manager) return g_slist_copy (stage_manager->stages); } +/** + * clutter_stage_manager_list_stage: + * @stage_manager: a #ClutterStageManager + * + * Lists all currently used stages. + * + * Return value: (transfer none) (element-type ClutterStage): a pointer + * to the internal list of #ClutterStage objects. The returned list + * is owned by the #ClutterStageManager and should never be modified + * or freed + * + * Since: 1.0 + */ +const GSList * +clutter_stage_manager_peek_stages (ClutterStageManager *stage_manager) +{ + return stage_manager->stages; +} + void _clutter_stage_manager_add_stage (ClutterStageManager *stage_manager, ClutterStage *stage) diff --git a/clutter/clutter-stage-manager.h b/clutter/clutter-stage-manager.h index f2484d7e9..c8a36eca9 100644 --- a/clutter/clutter-stage-manager.h +++ b/clutter/clutter-stage-manager.h @@ -61,6 +61,7 @@ void clutter_stage_manager_set_default_stage (ClutterStageManage ClutterStage *stage); ClutterStage * clutter_stage_manager_get_default_stage (ClutterStageManager *stage_manager); GSList * clutter_stage_manager_list_stages (ClutterStageManager *stage_manager); +const GSList * clutter_stage_manager_peek_stages (ClutterStageManager *stage_manager); G_END_DECLS