[stage manager] Add peek_stages()
We need an method for StageManager that returns a const pointer to the internal list, to avoid the copy.
This commit is contained in:
parent
63c7cc0175
commit
5d4974ed36
@ -224,8 +224,9 @@ clutter_stage_manager_get_default_stage (ClutterStageManager *stage_manager)
|
|||||||
*
|
*
|
||||||
* Lists all currently used stages.
|
* Lists all currently used stages.
|
||||||
*
|
*
|
||||||
* Return value: (transfer container) (element-type ClutterStage): a newly allocated list
|
* Return value: (transfer container) (element-type ClutterStage): a newly
|
||||||
* of #ClutterStage objects. Use g_slist_free() to deallocate it when done.
|
* allocated list of #ClutterStage objects. Use g_slist_free() to
|
||||||
|
* deallocate it when done.
|
||||||
*
|
*
|
||||||
* Since: 0.8
|
* Since: 0.8
|
||||||
*/
|
*/
|
||||||
@ -235,6 +236,25 @@ clutter_stage_manager_list_stages (ClutterStageManager *stage_manager)
|
|||||||
return g_slist_copy (stage_manager->stages);
|
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
|
void
|
||||||
_clutter_stage_manager_add_stage (ClutterStageManager *stage_manager,
|
_clutter_stage_manager_add_stage (ClutterStageManager *stage_manager,
|
||||||
ClutterStage *stage)
|
ClutterStage *stage)
|
||||||
|
@ -61,6 +61,7 @@ void clutter_stage_manager_set_default_stage (ClutterStageManage
|
|||||||
ClutterStage *stage);
|
ClutterStage *stage);
|
||||||
ClutterStage * clutter_stage_manager_get_default_stage (ClutterStageManager *stage_manager);
|
ClutterStage * clutter_stage_manager_get_default_stage (ClutterStageManager *stage_manager);
|
||||||
GSList * clutter_stage_manager_list_stages (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
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user