From d2dd917721b6301837405c1253afd56fd59d1c79 Mon Sep 17 00:00:00 2001 From: CodeYan01 <65320293+CodeYan01@users.noreply.github.com> Date: Wed, 22 Feb 2023 23:36:14 +0800 Subject: [PATCH] docs: Fix layout and typos --- docs/sphinx/reference-core.rst | 8 ++++---- docs/sphinx/reference-libobs-graphics-effects.rst | 2 +- docs/sphinx/reference-modules.rst | 2 +- docs/sphinx/reference-outputs.rst | 2 +- docs/sphinx/reference-properties.rst | 4 ++-- docs/sphinx/reference-scenes.rst | 7 ++++--- docs/sphinx/reference-sources.rst | 2 +- docs/sphinx/scripting.rst | 3 ++- libobs/obs-properties.h | 4 ++-- 9 files changed, 18 insertions(+), 16 deletions(-) diff --git a/docs/sphinx/reference-core.rst b/docs/sphinx/reference-core.rst index ca4cf14fd..42ce3d468 100644 --- a/docs/sphinx/reference-core.rst +++ b/docs/sphinx/reference-core.rst @@ -52,7 +52,7 @@ Initialization, Shutdown, and Information .. function:: void obs_set_locale(const char *locale) Sets a new locale to use for modules. This will call - obs_module_set_locale for each module with the new locale. + :c:func:`obs_module_set_locale()` for each module with the new locale. :param locale: The locale to use for modules @@ -67,8 +67,8 @@ Initialization, Shutdown, and Information .. function:: profiler_name_store_t *obs_get_profiler_name_store(void) :return: The profiler name store (see util/profiler.h) used by OBS, - which is either a name store passed to obs_startup, an - internal name store, or NULL in case obs_initialized() + which is either a name store passed to :c:func:`obs_startup()`, an + internal name store, or NULL in case :c:func:`obs_initialized()` returns false. --------------------- @@ -462,7 +462,7 @@ Video, Audio, and Graphics .. function:: gs_effect_t *obs_get_base_effect(enum obs_base_effect effect) - Returns a commoinly used base effect. + Returns a commonly used base effect. :param effect: | Can be one of the following values: | OBS_EFFECT_DEFAULT - RGB/YUV diff --git a/docs/sphinx/reference-libobs-graphics-effects.rst b/docs/sphinx/reference-libobs-graphics-effects.rst index b4db4e1ce..8fb86715b 100644 --- a/docs/sphinx/reference-libobs-graphics-effects.rst +++ b/docs/sphinx/reference-libobs-graphics-effects.rst @@ -174,7 +174,7 @@ HLSL format. --------------------- -.. function:: gs_eparam_t *gs_param_get_annotation_by_name(const gs_eparam_t *pardam, const char *annotation) +.. function:: gs_eparam_t *gs_param_get_annotation_by_name(const gs_eparam_t *param, const char *annotation) Gets parameter of an effect by its name. diff --git a/docs/sphinx/reference-modules.rst b/docs/sphinx/reference-modules.rst index 36b7d7136..acbfcd3d5 100644 --- a/docs/sphinx/reference-modules.rst +++ b/docs/sphinx/reference-modules.rst @@ -176,7 +176,7 @@ plugin modules. | MODULE_FILE_NOT_FOUND - The module was not found | MODULE_MISSING_EXPORTS - Required exports are missing | MODULE_INCOMPATIBLE_VER - Incompatible version - | MODULE_HARDCODED_SKIP - Skipped by harcoded rules + | MODULE_HARDCODED_SKIP - Skipped by hardcoded rules (e.g. obsolete obs-browser macOS plugin) --------------------- diff --git a/docs/sphinx/reference-outputs.rst b/docs/sphinx/reference-outputs.rst index 28dad3805..0cbe9f988 100644 --- a/docs/sphinx/reference-outputs.rst +++ b/docs/sphinx/reference-outputs.rst @@ -674,7 +674,7 @@ General Output Functions const char *obs_output_get_supported_audio_codecs(const obs_output_t *output) :return: Supported video/audio codecs of an encoded output, separated - by semicolen + by semicolon --------------------- diff --git a/docs/sphinx/reference-properties.rst b/docs/sphinx/reference-properties.rst index 8f469df00..fc3c3e43c 100644 --- a/docs/sphinx/reference-properties.rst +++ b/docs/sphinx/reference-properties.rst @@ -162,7 +162,7 @@ Property Object Functions Adds a 'path' property. Can be a directory or a file. If target is a file path, the filters should be this format, separated by - double semi-colens, and extensions separated by space:: + double semicolons, and extensions separated by space:: "Example types 1 and 2 (*.ex1 *.ex2);;Example type 3 (*.ex3)" @@ -176,7 +176,7 @@ Property Object Functions :param filter: If type is a file path, then describes the file filter that the user can browse. Items are separated via - double semi-colens. If multiple file types in a + double semicolons. If multiple file types in a filter, separate with space. :param default_path: The default path to start in, or *NULL* :return: The property diff --git a/docs/sphinx/reference-scenes.rst b/docs/sphinx/reference-scenes.rst index 82a15ab3a..359dfaa27 100644 --- a/docs/sphinx/reference-scenes.rst +++ b/docs/sphinx/reference-scenes.rst @@ -129,11 +129,11 @@ Scene Signals **item_remove** (ptr scene, ptr item) - Called when a scene item has been removed from the scen. + Called when a scene item has been removed from the scene. **reorder** (ptr scene) - Called when scene items have been reoredered in the scene. + Called when scene items have been reordered in the scene. **refresh** (ptr scene) @@ -149,6 +149,7 @@ Scene Signals Called when a scene item has been locked or unlocked. **item_select** (ptr scene, ptr item) + **item_deselect** (ptr scene, ptr item) Called when a scene item has been selected/deselected. @@ -353,7 +354,7 @@ Scene Item Functions .. function:: obs_data_t *obs_scene_save_transform_states(obs_scene_t *scene, bool all_items) .. function:: void obs_scene_load_transform_states(const char *states) - Saves all the transformation states for the sceneitms in scene. When all_items is false, it + Saves all the transformation states for the sceneitems in scene. When all_items is false, it will only save selected items :return: Data containing transformation states for all* sceneitems in scene diff --git a/docs/sphinx/reference-sources.rst b/docs/sphinx/reference-sources.rst index b72e96b45..7f4caf2fb 100644 --- a/docs/sphinx/reference-sources.rst +++ b/docs/sphinx/reference-sources.rst @@ -493,7 +493,7 @@ Source Definition Structure (obs_source_info) Called to get the current time of the media. -.. member:: void (*obs_source_info.media_set_time)(void *data, int64_t miliseconds) +.. member:: void (*obs_source_info.media_set_time)(void *data, int64_t milliseconds) Called to set the media time. diff --git a/docs/sphinx/scripting.rst b/docs/sphinx/scripting.rst index 75cefa031..62c8f3569 100644 --- a/docs/sphinx/scripting.rst +++ b/docs/sphinx/scripting.rst @@ -36,6 +36,7 @@ There are a number of global functions that scripts can optionally provide: .. py:function:: script_description() + Called to retrieve a description string to be displayed to the user in the Scripts window. @@ -119,7 +120,7 @@ without necessarily having to lock scripts/interpreters every frame. .. py:function:: timer_add(callback, milliseconds) - Adds an timer callback which triggers every *millseconds*. + Adds an timer callback which triggers every *milliseconds*. .. py:function:: timer_remove(callback) diff --git a/libobs/obs-properties.h b/libobs/obs-properties.h index 636616ebb..511deffe1 100644 --- a/libobs/obs-properties.h +++ b/libobs/obs-properties.h @@ -210,7 +210,7 @@ EXPORT obs_property_t *obs_properties_add_text(obs_properties_t *props, * Adds a 'path' property. Can be a directory or a file. * * If target is a file path, the filters should be this format, separated by - * double semi-colens, and extensions separated by space: + * double semicolons, and extensions separated by space: * "Example types 1 and 2 (*.ex1 *.ex2);;Example type 3 (*.ex3)" * * @param props Properties object @@ -219,7 +219,7 @@ EXPORT obs_property_t *obs_properties_add_text(obs_properties_t *props, * @param type Type of path (directory or file) * @param filter If type is a file path, then describes the file filter * that the user can browse. Items are separated via - * double semi-colens. If multiple file types in a + * double semicolons. If multiple file types in a * filter, separate with space. */ EXPORT obs_property_t *