瀏覽代碼

docs: Clarify enum_scenes order

CodeYan01 2 年之前
父節點
當前提交
b4fdf2a329
共有 3 個文件被更改,包括 9 次插入4 次删除
  1. 3 1
      docs/sphinx/reference-core.rst
  2. 4 2
      docs/sphinx/reference-frontend-api.rst
  3. 2 1
      docs/sphinx/reference-scenes.rst

+ 3 - 1
docs/sphinx/reference-core.rst

@@ -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.

+ 4 - 2
docs/sphinx/reference-frontend-api.rst

@@ -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.
 
 ---------------------------------------
 

+ 2 - 1
docs/sphinx/reference-scenes.rst

@@ -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.