mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[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.
|
||||
*
|
||||
* 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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user