ClutterActor *_clutter_input_device_update (ClutterInputDevice *device);
/* stage manager */
-void _clutter_stage_manager_add_stage (ClutterStageManager *stage_manager,
- ClutterStage *stage);
-void _clutter_stage_manager_remove_stage (ClutterStageManager *stage_manager,
- ClutterStage *stage);
+void _clutter_stage_manager_add_stage (ClutterStageManager *stage_manager,
+ ClutterStage *stage);
+void _clutter_stage_manager_remove_stage (ClutterStageManager *stage_manager,
+ ClutterStage *stage);
+void _clutter_stage_manager_set_default_stage (ClutterStageManager *stage_manager,
+ ClutterStage *stage);
/* stage */
void _clutter_stage_set_window (ClutterStage *stage,
{
}
+/*
+ * _clutter_stage_manager_set_default_stage:
+ * @stage_manager: a #ClutterStageManager
+ * @stage: a #ClutterStage
+ *
+ * Sets @stage as the default stage
+ *
+ * A no-op if there already is a default stage
+ *
+ * This is called by clutter_stage_get_default() and should be removed
+ * along with #ClutterStageManager:default-stage when we stop having
+ * the default stage
+ */
+void
+_clutter_stage_manager_set_default_stage (ClutterStageManager *stage_manager,
+ ClutterStage *stage)
+{
+ if (G_UNLIKELY (default_stage == NULL))
+ {
+ default_stage = stage;
+
+ g_object_notify (G_OBJECT (stage_manager), "default-stage");
+ }
+}
+
/**
* clutter_stage_manager_get_default_stage:
* @stage_manager: a #ClutterStageManager
stage_manager->stages = g_slist_append (stage_manager->stages, stage);
- if (G_UNLIKELY (default_stage == NULL))
- {
- default_stage = stage;
-
- g_object_notify (G_OBJECT (stage_manager), "default-stage");
- }
-
g_signal_emit (stage_manager, manager_signals[STAGE_ADDED], 0, stage);
}
* reference will be claimed by the stage manager.
*/
stage = g_object_new (CLUTTER_TYPE_STAGE, NULL);
+ _clutter_stage_manager_set_default_stage (stage_manager, stage);
/* the default stage is realized by default */
clutter_actor_realize (CLUTTER_ACTOR (stage));