docs: Clarify enum_scenes order

This commit is contained in:
CodeYan01 2023-02-25 13:15:34 +08:00 committed by Ryan Foster
parent 8ac894a62b
commit b4fdf2a329
3 changed files with 9 additions and 4 deletions

View file

@ -285,7 +285,9 @@ Libobs Objects
.. function:: void obs_enum_scenes(bool (*enum_proc)(void*, obs_source_t*), void *param)
Enumerates all scenes. Use :c:func:`obs_scene_from_source()` if the scene is
needed as an :c:type:`obs_scene_t`.
needed as an :c:type:`obs_scene_t`. The order that they are enumerated should
not be relied on. If one intends to enumerate the scenes in the order
presented by the OBS Studio Frontend, use :c:func:`obs_frontend_get_scenes()`.
Callback function returns true to continue enumeration, or false to end
enumeration.

View file

@ -259,7 +259,8 @@ Functions
:return: The scene name list, ending with NULL. The list is stored
within one contiguous segment of memory, so freeing the
returned pointer with :c:func:`bfree()` will free the entire
list.
list. The order is same as the way the frontend displays it in
the Scenes dock.
---------------------------------------
@ -268,7 +269,8 @@ Functions
:param sources: Pointer to a :c:type:`obs_frontend_source_list`
structure to receive the list of
reference-incremented scenes. Release with
:c:func:`obs_frontend_source_list_free`
:c:func:`obs_frontend_source_list_free`. The order is same as
the way the frontend displays it in the Scenes dock.
---------------------------------------

View file

@ -265,7 +265,8 @@ General Scene Functions
.. function:: void obs_scene_enum_items(obs_scene_t *scene, bool (*callback)(obs_scene_t*, obs_sceneitem_t*, void*), void *param)
Enumerates scene items within a scene.
Enumerates scene items within a scene in order of the bottommost scene item
to the topmost scene item.
Callback function returns true to continue enumeration, or false to end
enumeration.