Browse Source

Merge pull request #3371 from VodBox/docs-fix

docs/sphinx: Fix errors with scripting and properties.
Dillon Pentz 5 years ago
parent
commit
6df30951f5
2 changed files with 18 additions and 5 deletions
  1. 14 3
      docs/sphinx/reference-properties.rst
  2. 4 2
      docs/sphinx/scripting.rst

+ 14 - 3
docs/sphinx/reference-properties.rst

@@ -230,6 +230,13 @@ Property Object Functions
    :param    description: Localized name shown to user
    :param    description: Localized name shown to user
    :return:               The property
    :return:               The property
 
 
+   Relevant data types used with this function:
+
+.. code:: cpp
+
+   typedef bool (*obs_property_clicked_t)(obs_properties_t *props,
+                   obs_property_t *property, void *data);
+
 ---------------------
 ---------------------
 
 
 .. function:: obs_property_t *obs_properties_add_font(obs_properties_t *props, const char *name, const char *description)
 .. function:: obs_property_t *obs_properties_add_font(obs_properties_t *props, const char *name, const char *description)
@@ -514,16 +521,20 @@ Property Modification Functions
 -------------------------------
 -------------------------------
 
 
 .. function:: void obs_property_set_modified_callback(obs_property_t *p, obs_property_modified_t modified)
 .. function:: void obs_property_set_modified_callback(obs_property_t *p, obs_property_modified_t modified)
+              void obs_property_set_modified_callback2(obs_property_t *p, obs_property_modified2_t modified2, void *priv)
 
 
    Allows the ability to change the properties depending on what
    Allows the ability to change the properties depending on what
    settings are used by the user.
    settings are used by the user.
 
 
-   Relevant data types used with this function:
+   Relevant data types used with these functions:
 
 
 .. code:: cpp
 .. code:: cpp
 
 
-   typedef bool (*obs_property_clicked_t)(obs_properties_t *props,
-                   obs_property_t *property, void *data);
+   typedef bool (*obs_property_modified_t)(obs_properties_t *props,
+                   obs_property_t *property, obs_data_t *settings);
+   typedef bool (*obs_property_modified2_t)(void *priv,
+                   obs_properties_t *props, obs_property_t *property,
+                   obs_data_t *settings);
 
 
 ---------------------
 ---------------------
 
 

+ 4 - 2
docs/sphinx/scripting.rst

@@ -274,8 +274,10 @@ modules/namespaces).
 
 
 .. py:function:: obs_properties_add_button(properties, setting_name, text, callback)
 .. py:function:: obs_properties_add_button(properties, setting_name, text, callback)
 
 
-   Adds a button properties to an obs_properties_t object.  The callback
-   takes no parameters.
+   Adds a button property to an obs_properties_t object.  The callback
+   takes two parameters:  the first parameter is the obs_properties_t
+   object, and the second parameter is the obs_property_t for the
+   button.
 
 
    :param properties:   An obs_properties_t object.
    :param properties:   An obs_properties_t object.
    :param setting_name: A setting identifier string.
    :param setting_name: A setting identifier string.