reference-properties.rst 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  1. Properties API Reference (obs_properties_t)
  2. ===========================================
  3. Properties are used to enumerate available settings for a libobs object.
  4. Typically this is used to automatically generate user interface widgets,
  5. though can be used to enumerate available and/or valid values for
  6. specific settings as well.
  7. .. type:: obs_properties_t
  8. Properties object (not reference counted).
  9. .. type:: obs_property_t
  10. A property object (not reference counted).
  11. .. code:: cpp
  12. #include <obs.h>
  13. General Functions
  14. -----------------
  15. .. function:: obs_properties_t *obs_properties_create(void)
  16. :return: A new properties object.
  17. ---------------------
  18. .. function:: obs_properties_t *obs_properties_create_param(void *param, void (*destroy)(void *param))
  19. Creates a new properties object with specific private data *param*
  20. associated with the object, and is automatically freed with the
  21. object when the properties are destroyed via the *destroy* function.
  22. :return: A new properties object.
  23. ---------------------
  24. .. function:: void obs_properties_destroy(obs_properties_t *props)
  25. ---------------------
  26. .. function:: void obs_properties_set_flags(obs_properties_t *props, uint32_t flags)
  27. uint32_t obs_properties_get_flags(obs_properties_t *props)
  28. :param flags: 0 or a bitwise OR combination of one of the following
  29. values:
  30. - OBS_PROPERTIES_DEFER_UPDATE - A hint that tells the
  31. front-end to defers updating the settings until the
  32. user has finished editing all properties rather than
  33. immediately updating any settings
  34. ---------------------
  35. .. function:: void obs_properties_set_param(obs_properties_t *props, void *param, void (*destroy)(void *param))
  36. void *obs_properties_get_param(obs_properties_t *props)
  37. Sets custom data associated with this properties object. If private
  38. data is already associated with the object, that private data will be
  39. destroyed before assigning new private data to it.
  40. ---------------------
  41. .. function:: void obs_properties_apply_settings(obs_properties_t *props, obs_data_t *settings)
  42. Applies settings to the properties by calling all the necessary
  43. modification callbacks
  44. ---------------------
  45. .. function:: obs_properties_t *obs_properties_get_parent(obs_properties_t *props)
  46. ---------------------
  47. .. function:: void obs_properties_remove_by_name(obs_properties_t *props, const char *property)
  48. Removes a property from a properties list. Only valid in ``get_properties``,
  49. ``script_properties`` for scripts, ``modified_callback``, and ``modified_callback2``.
  50. ``modified_callback`` and ``modified_callback2`` *must* return true so that
  51. all UI properties are rebuilt. Returning false is undefined behavior.
  52. :param props: Properties to remove from.
  53. :param property: Name of the property to remove.
  54. ---------------------
  55. Property Object Functions
  56. -------------------------
  57. .. function:: obs_property_t *obs_properties_add_bool(obs_properties_t *props, const char *name, const char *description)
  58. Adds a boolean property.
  59. :param name: Setting identifier string
  60. :param description: Localized name shown to user
  61. :return: The property
  62. ---------------------
  63. .. function:: obs_property_t *obs_properties_add_int(obs_properties_t *props, const char *name, const char *description, int min, int max, int step)
  64. Adds an integer property.
  65. :param name: Setting identifier string
  66. :param description: Localized name shown to user
  67. :param min: Minimum value
  68. :param max: Maximum value
  69. :param step: Step value
  70. :return: The property
  71. ---------------------
  72. .. function:: obs_property_t *obs_properties_add_float(obs_properties_t *props, const char *name, const char *description, double min, double max, double step)
  73. :param name: Setting identifier string
  74. :param description: Localized name shown to user
  75. :param min: Minimum value
  76. :param max: Maximum value
  77. :param step: Step value
  78. :return: The property
  79. ---------------------
  80. .. function:: obs_property_t *obs_properties_add_int_slider(obs_properties_t *props, const char *name, const char *description, int min, int max, int step)
  81. :param name: Setting identifier string
  82. :param description: Localized name shown to user
  83. :param min: Minimum value
  84. :param max: Maximum value
  85. :param step: Step value
  86. :return: The property
  87. ---------------------
  88. .. function:: obs_property_t *obs_properties_add_float_slider(obs_properties_t *props, const char *name, const char *description, double min, double max, double step)
  89. :param name: Setting identifier string
  90. :param description: Localized name shown to user
  91. :param min: Minimum value
  92. :param max: Maximum value
  93. :param step: Step value
  94. :return: The property
  95. ---------------------
  96. .. function:: obs_property_t *obs_properties_add_text(obs_properties_t *props, const char *name, const char *description, enum obs_text_type type)
  97. :param name: Setting identifier string
  98. :param description: Localized name shown to user
  99. :param type: Can be one of the following values:
  100. - **OBS_TEXT_DEFAULT** - Single line of text
  101. - **OBS_TEXT_PASSWORD** - Single line of text (passworded)
  102. - **OBS_TEXT_MULTILINE** - Multi-line text
  103. - **OBS_TEXT_INFO** - Read-only informative text, behaves differently
  104. depending on wether description, string value and long description
  105. are set
  106. :return: The property
  107. Important Related Functions:
  108. - :c:func:`obs_property_text_set_info_type`
  109. - :c:func:`obs_property_text_set_info_word_wrap`
  110. ---------------------
  111. .. function:: obs_property_t *obs_properties_add_path(obs_properties_t *props, const char *name, const char *description, enum obs_path_type type, const char *filter, const char *default_path)
  112. Adds a 'path' property. Can be a directory or a file.
  113. If target is a file path, the filters should be this format, separated by
  114. double semicolons, and extensions separated by space::
  115. "Example types 1 and 2 (*.ex1 *.ex2);;Example type 3 (*.ex3)"
  116. :param name: Setting identifier string
  117. :param description: Localized name shown to user
  118. :param type: Can be one of the following values:
  119. - **OBS_PATH_FILE** - File (for reading)
  120. - **OBS_PATH_FILE_SAVE** - File (for writing)
  121. - **OBS_PATH_DIRECTORY** - Directory
  122. :param filter: If type is a file path, then describes the file filter
  123. that the user can browse. Items are separated via
  124. double semicolons. If multiple file types in a
  125. filter, separate with space.
  126. :param default_path: The default path to start in, or *NULL*
  127. :return: The property
  128. ---------------------
  129. .. function:: obs_property_t *obs_properties_add_list(obs_properties_t *props, const char *name, const char *description, enum obs_combo_type type, enum obs_combo_format format)
  130. Adds an integer/string/floating point item list. This would be
  131. implemented as a combo box in user interface.
  132. :param name: Setting identifier string
  133. :param description: Localized name shown to user
  134. :param type: Can be one of the following values:
  135. - **OBS_COMBO_TYPE_EDITABLE** - Can be edited.
  136. Only used with string lists.
  137. - **OBS_COMBO_TYPE_LIST** - Not editable. Displayed as combo box.
  138. - **OBS_COMBO_TYPE_RADIO** - Not editable. Displayed as radio buttons.
  139. .. versionadded:: 30.0
  140. :param format: Can be one of the following values:
  141. - **OBS_COMBO_FORMAT_INT** - Integer list
  142. - **OBS_COMBO_FORMAT_FLOAT** - Floating point
  143. list
  144. - **OBS_COMBO_FORMAT_STRING** - String list
  145. - **OBS_COMBO_FORMAT_BOOL** - Boolean list
  146. .. versionadded:: 30.0
  147. :return: The property
  148. Important Related Functions:
  149. - :c:func:`obs_property_list_add_string`
  150. - :c:func:`obs_property_list_add_int`
  151. - :c:func:`obs_property_list_add_float`
  152. - :c:func:`obs_property_list_insert_string`
  153. - :c:func:`obs_property_list_insert_int`
  154. - :c:func:`obs_property_list_insert_float`
  155. - :c:func:`obs_property_list_item_remove`
  156. - :c:func:`obs_property_list_clear`
  157. ---------------------
  158. .. function:: obs_property_t *obs_properties_add_color(obs_properties_t *props, const char *name, const char *description)
  159. Adds a color property without alpha (stored internally with an alpha value of 255).
  160. The color can be retrieved from an :c:type:`obs_data_t` object by using :c:func:`obs_data_get_int()`.
  161. :param name: Setting identifier string
  162. :param description: Localized name shown to user
  163. :return: The property
  164. ---------------------
  165. .. function:: obs_property_t *obs_properties_add_color_alpha(obs_properties_t *props, const char *name, const char *description)
  166. Adds a color property with alpha. The color can be retrieved from an
  167. :c:type:`obs_data_t` object by using :c:func:`obs_data_get_int()`.
  168. :param name: Setting identifier string
  169. :param description: Localized name shown to user
  170. :return: The property
  171. ---------------------
  172. .. function:: obs_property_t *obs_properties_add_button(obs_properties_t *props, const char *name, const char *text, obs_property_clicked_t callback)
  173. obs_property_t *obs_properties_add_button2(obs_properties_t *props, const char *name, const char *text, obs_property_clicked_t callback, void *priv)
  174. Adds a button property. This property does not actually store any
  175. settings; it's used to implement a button in user interface if the
  176. properties are used to generate user interface.
  177. If the properties need to be refreshed due to changes to the property layout,
  178. the callback should return true, otherwise return false.
  179. :param name: Setting identifier string
  180. :param text: Localized name shown to user
  181. :param callback: Callback to be executed when the button is pressed
  182. :param priv: Pointer passed back as the `data` argument of the callback
  183. :return: The property
  184. Important Related Functions:
  185. - :c:func:`obs_property_button_set_type`
  186. - :c:func:`obs_property_button_set_url`
  187. For scripting, use :py:func:`obs_properties_add_button`.
  188. Relevant data types used with this function:
  189. .. code:: cpp
  190. typedef bool (*obs_property_clicked_t)(obs_properties_t *props,
  191. obs_property_t *property, void *data);
  192. ---------------------
  193. .. function:: obs_property_t *obs_properties_add_font(obs_properties_t *props, const char *name, const char *description)
  194. Adds a font property. The font can be retrieved from an :c:type:`obs_data_t`
  195. object by using :c:func:`obs_data_get_obj()`.
  196. :param name: Setting identifier string
  197. :param description: Localized name shown to user
  198. :return: The property
  199. ---------------------
  200. .. function:: obs_property_t *obs_properties_add_editable_list(obs_properties_t *props, const char *name, const char *description, enum obs_editable_list_type type, const char *filter, const char *default_path)
  201. Adds a list in which the user can add/insert/remove items. The items can be
  202. retrieved from an :c:type:`obs_data_t` object by using :c:func:`obs_data_get_array()`.
  203. :param name: Setting identifier string
  204. :param description: Localized name shown to user
  205. :param type: Can be one of the following values:
  206. - **OBS_EDITABLE_LIST_TYPE_STRINGS** - An
  207. editable list of strings.
  208. - **OBS_EDITABLE_LIST_TYPE_FILES** - An
  209. editable list of files.
  210. - **OBS_EDITABLE_LIST_TYPE_FILES_AND_URLS** -
  211. An editable list of files and URLs.
  212. :param filter: File filter to use if a file list
  213. :param default_path: Default path if a file list
  214. :return: The property
  215. ---------------------
  216. .. function:: obs_property_t *obs_properties_add_frame_rate(obs_properties_t *props, const char *name, const char *description)
  217. Adds a frame rate property.
  218. :param name: Setting identifier string
  219. :param description: Localized name shown to user
  220. :return: The property
  221. Important Related Functions:
  222. - :c:func:`obs_property_frame_rate_option_add`
  223. - :c:func:`obs_property_frame_rate_fps_range_add`
  224. - :c:func:`obs_property_frame_rate_option_insert`
  225. - :c:func:`obs_property_frame_rate_fps_range_insert`
  226. ---------------------
  227. .. function:: obs_property_t *obs_properties_add_group(obs_properties_t *props, const char *name, const char *description, enum obs_group_type type, obs_properties_t *group)
  228. Adds a property group.
  229. :param name: Setting identifier string
  230. :param description: Localized name shown to user
  231. :param type: Can be one of the following values:
  232. - **OBS_GROUP_NORMAL** - A normal group with just a name and content.
  233. - **OBS_GROUP_CHECKABLE** - A checkable group with a checkbox, name and content.
  234. :param group: Group to add
  235. :return: The property
  236. Important Related Functions:
  237. - :c:func:`obs_property_group_type`
  238. - :c:func:`obs_property_group_content`
  239. - :c:func:`obs_properties_get_parent`
  240. ---------------------
  241. Property Enumeration Functions
  242. ------------------------------
  243. .. function:: obs_property_t *obs_properties_first(obs_properties_t *props)
  244. :return: The first property in the properties object.
  245. ---------------------
  246. .. function:: obs_property_t *obs_properties_get(obs_properties_t *props, const char *property)
  247. :param property: The name of the property to get
  248. :return: A specific property or *NULL* if not found
  249. ---------------------
  250. .. function:: bool obs_property_next(obs_property_t **p)
  251. :param p: Pointer to the pointer of the next property
  252. :return: *true* if successful, *false* if no more properties
  253. ---------------------
  254. .. function:: const char * obs_property_name(obs_property_t *p)
  255. :return: The setting identifier string of the property
  256. *(Author's Note: "name" was a bad name to use here. Should have been
  257. "setting")*
  258. ---------------------
  259. .. function:: const char * obs_property_description(obs_property_t *p)
  260. :return: The actual localized display name of the property
  261. *(Author's note: This one should have been the "name")*
  262. ---------------------
  263. .. function:: const char * obs_property_long_description(obs_property_t *p)
  264. :return: A detailed description of what the setting is used for.
  265. Usually used with things like tooltips.
  266. ---------------------
  267. .. function:: enum obs_property_type obs_property_get_type(obs_property_t *p)
  268. :return: One of the following values:
  269. - OBS_PROPERTY_INVALID
  270. - OBS_PROPERTY_BOOL
  271. - OBS_PROPERTY_INT
  272. - OBS_PROPERTY_FLOAT
  273. - OBS_PROPERTY_TEXT
  274. - OBS_PROPERTY_PATH
  275. - OBS_PROPERTY_LIST
  276. - OBS_PROPERTY_COLOR
  277. - OBS_PROPERTY_BUTTON
  278. - OBS_PROPERTY_FONT
  279. - OBS_PROPERTY_EDITABLE_LIST
  280. - OBS_PROPERTY_FRAME_RATE
  281. - OBS_PROPERTY_GROUP
  282. ---------------------
  283. .. function:: bool obs_property_enabled(obs_property_t *p)
  284. ---------------------
  285. .. function:: bool obs_property_visible(obs_property_t *p)
  286. ---------------------
  287. .. function:: int obs_property_int_min(obs_property_t *p)
  288. ---------------------
  289. .. function:: int obs_property_int_max(obs_property_t *p)
  290. ---------------------
  291. .. function:: int obs_property_int_step(obs_property_t *p)
  292. ---------------------
  293. .. function:: enum obs_number_type obs_property_int_type(obs_property_t *p)
  294. ---------------------
  295. .. function:: const char * obs_property_int_suffix(obs_property_t *p)
  296. ---------------------
  297. .. function:: double obs_property_float_min(obs_property_t *p)
  298. ---------------------
  299. .. function:: double obs_property_float_max(obs_property_t *p)
  300. ---------------------
  301. .. function:: double obs_property_float_step(obs_property_t *p)
  302. ---------------------
  303. .. function:: enum obs_number_type obs_property_float_type(obs_property_t *p)
  304. ---------------------
  305. .. function:: const char * obs_property_float_suffix(obs_property_t *p)
  306. ---------------------
  307. .. function:: enum obs_text_type obs_property_text_type(obs_property_t *p)
  308. ---------------------
  309. .. function:: bool obs_property_text_monospace(obs_property_t *p)
  310. Returns whether the input of the text property should be rendered
  311. with a monospace font or not. Only has an effect if the text type
  312. of the property is ``OBS_TEXT_MULTILINE``, even if this returns *true*.
  313. ---------------------
  314. .. function:: enum obs_text_info_type obs_property_text_info_type(obs_property_t *p)
  315. :return: One of the following values:
  316. - OBS_TEXT_INFO_NORMAL
  317. - OBS_TEXT_INFO_WARNING
  318. - OBS_TEXT_INFO_ERROR
  319. ---------------------
  320. .. function:: bool obs_property_text_info_word_wrap(obs_property_t *p)
  321. ---------------------
  322. .. function:: enum obs_path_type obs_property_path_type(obs_property_t *p)
  323. ---------------------
  324. .. function:: const char * obs_property_path_filter(obs_property_t *p)
  325. ---------------------
  326. .. function:: const char * obs_property_path_default_path(obs_property_t *p)
  327. ---------------------
  328. .. function:: enum obs_combo_type obs_property_list_type(obs_property_t *p)
  329. ---------------------
  330. .. function:: enum obs_combo_format obs_property_list_format(obs_property_t *p)
  331. ---------------------
  332. .. function:: bool obs_property_list_item_disabled(obs_property_t *p, size_t idx)
  333. ---------------------
  334. .. function:: size_t obs_property_list_item_count(obs_property_t *p)
  335. ---------------------
  336. .. function:: const char *obs_property_list_item_name(obs_property_t *p, size_t idx)
  337. ---------------------
  338. .. function:: const char *obs_property_list_item_string(obs_property_t *p, size_t idx)
  339. ---------------------
  340. .. function:: long long obs_property_list_item_int(obs_property_t *p, size_t idx)
  341. ---------------------
  342. .. function:: double obs_property_list_item_float(obs_property_t *p, size_t idx)
  343. ---------------------
  344. .. function:: enum obs_editable_list_type obs_property_editable_list_type(obs_property_t *p)
  345. ---------------------
  346. .. function:: const char *obs_property_editable_list_filter(obs_property_t *p)
  347. ---------------------
  348. .. function:: const char *obs_property_editable_list_default_path(obs_property_t *p)
  349. ---------------------
  350. .. function:: size_t obs_property_frame_rate_options_count(obs_property_t *p)
  351. ---------------------
  352. .. function:: const char *obs_property_frame_rate_option_name(obs_property_t *p, size_t idx)
  353. ---------------------
  354. .. function:: const char *obs_property_frame_rate_option_description( obs_property_t *p, size_t idx)
  355. ---------------------
  356. .. function:: size_t obs_property_frame_rate_fps_ranges_count(obs_property_t *p)
  357. ---------------------
  358. .. function:: struct media_frames_per_second obs_property_frame_rate_fps_range_min( obs_property_t *p, size_t idx)
  359. ---------------------
  360. .. function:: struct media_frames_per_second obs_property_frame_rate_fps_range_max( obs_property_t *p, size_t idx)
  361. ---------------------
  362. .. function:: enum obs_button_type obs_property_button_type(obs_property_t *p)
  363. :return: One of the following values:
  364. - OBS_BUTTON_DEFAULT
  365. - OBS_BUTTON_URL
  366. ---------------------
  367. .. function:: const char *obs_property_button_url(obs_property_t *p)
  368. ---------------------
  369. .. function:: enum obs_group_type obs_property_group_type(obs_property_t *p)
  370. :return: One of the following values:
  371. - OBS_COMBO_INVALID
  372. - OBS_GROUP_NORMAL
  373. - OBS_GROUP_CHECKABLE
  374. ---------------------
  375. .. function:: obs_properties_t *obs_property_group_content(obs_property_t *p)
  376. ---------------------
  377. Property Modification Functions
  378. -------------------------------
  379. .. function:: void obs_property_set_modified_callback(obs_property_t *p, obs_property_modified_t modified)
  380. void obs_property_set_modified_callback2(obs_property_t *p, obs_property_modified2_t modified2, void *priv)
  381. Allows the ability to change the properties depending on what
  382. settings are used by the user. The callback should return ``true``
  383. if the property widgets need to be refreshed due to changes to the
  384. property layout.
  385. Relevant data types used with these functions:
  386. .. code:: cpp
  387. typedef bool (*obs_property_modified_t)(obs_properties_t *props,
  388. obs_property_t *property, obs_data_t *settings);
  389. typedef bool (*obs_property_modified2_t)(void *priv,
  390. obs_properties_t *props, obs_property_t *property,
  391. obs_data_t *settings);
  392. ---------------------
  393. .. function:: bool obs_property_modified(obs_property_t *p, obs_data_t *settings)
  394. ---------------------
  395. .. function:: bool obs_property_button_clicked(obs_property_t *p, void *obj)
  396. ---------------------
  397. .. function:: void obs_property_set_visible(obs_property_t *p, bool visible)
  398. ---------------------
  399. .. function:: void obs_property_set_enabled(obs_property_t *p, bool enabled)
  400. ---------------------
  401. .. function:: void obs_property_set_description(obs_property_t *p, const char *description)
  402. Sets the displayed localized name of the property, shown to the user.
  403. ---------------------
  404. .. function:: void obs_property_set_long_description(obs_property_t *p, const char *long_description)
  405. Sets the localized long description of the property, usually shown to
  406. a user via tooltip.
  407. ---------------------
  408. .. function:: void obs_property_int_set_limits(obs_property_t *p, int min, int max, int step)
  409. ---------------------
  410. .. function:: void obs_property_float_set_limits(obs_property_t *p, double min, double max, double step)
  411. ---------------------
  412. .. function:: void obs_property_int_set_suffix(obs_property_t *p, const char *suffix)
  413. Adds a suffix to the int property, such that 100 will show up
  414. as "100ms" if the suffix is "ms". The user will only be able
  415. to edit the number, not the suffix.
  416. ---------------------
  417. .. function:: void obs_property_float_set_suffix(obs_property_t *p, const char *suffix)
  418. Adds a suffix to the float property, such that 1.5 will show up
  419. as "1.5s" if the suffix is "s". The user will only be able
  420. to edit the number, not the suffix.
  421. ---------------------
  422. .. function:: void obs_property_text_set_monospace(obs_property_t *p, bool monospace)
  423. Sets whether the input of text property should be rendered with
  424. a monospace font or not. Only has an effect if the text type of
  425. the property is ``OBS_TEXT_MULTILINE``.
  426. ---------------------
  427. .. function:: void obs_property_text_set_info_type(obs_property_t *p, enum obs_text_info_type type)
  428. :param type: Can be one of the following values:
  429. - **OBS_TEXT_INFO_NORMAL** - To show a basic message
  430. - **OBS_TEXT_INFO_WARNING** - To show a warning
  431. - **OBS_TEXT_INFO_ERROR** - To show an error
  432. ---------------------
  433. .. function:: void obs_property_text_set_info_word_wrap(obs_property_t *p, bool word_wrap)
  434. ---------------------
  435. .. function:: void obs_property_list_clear(obs_property_t *p)
  436. ---------------------
  437. .. function:: size_t obs_property_list_add_string(obs_property_t *p, const char *name, const char *val)
  438. Adds a string to a string list.
  439. :param name: Localized name shown to user
  440. :param val: The actual string value stored and will be returned by :c:func:`obs_data_get_string`
  441. :returns: The index of the list item.
  442. ---------------------
  443. .. function:: size_t obs_property_list_add_int(obs_property_t *p, const char *name, long long val)
  444. Adds an integer to a integer list.
  445. :param name: Localized name shown to user
  446. :param val: The actual int value stored and will be returned by :c:func:`obs_data_get_int`
  447. :returns: The index of the list item.
  448. ---------------------
  449. .. function:: size_t obs_property_list_add_float(obs_property_t *p, const char *name, double val)
  450. Adds a floating point to a floating point list.
  451. :param name: Localized name shown to user
  452. :param val: The actual float value stored and will be returned by :c:func:`obs_data_get_double`
  453. :returns: The index of the list item.
  454. ---------------------
  455. .. function:: void obs_property_list_insert_string(obs_property_t *p, size_t idx, const char *name, const char *val)
  456. Inserts a string in to a string list.
  457. :param idx: The index of the list item
  458. :param name: Localized name shown to user
  459. :param val: The actual string value stored and will be returned by :c:func:`obs_data_get_string`
  460. ---------------------
  461. .. function:: void obs_property_list_insert_int(obs_property_t *p, size_t idx, const char *name, long long val)
  462. Inserts an integer in to an integer list.
  463. :param idx: The index of the list item
  464. :param name: Localized name shown to user
  465. :param val: The actual int value stored and will be returned by :c:func:`obs_data_get_int`
  466. ---------------------
  467. .. function:: void obs_property_list_insert_float(obs_property_t *p, size_t idx, const char *name, double val)
  468. Inserts a floating point in to a floating point list.
  469. :param idx: The index of the list item.
  470. :param name: Localized name shown to user
  471. :param val: The actual float value stored and will be returned by :c:func:`obs_data_get_double`
  472. ---------------------
  473. .. function:: void obs_property_list_item_disable(obs_property_t *p, size_t idx, bool disabled)
  474. ---------------------
  475. .. function:: void obs_property_list_item_remove(obs_property_t *p, size_t idx)
  476. ---------------------
  477. .. function:: size_t obs_property_frame_rate_option_add(obs_property_t *p, const char *name, const char *description)
  478. ---------------------
  479. .. function:: size_t obs_property_frame_rate_fps_range_add(obs_property_t *p, struct media_frames_per_second min, struct media_frames_per_second max)
  480. ---------------------
  481. .. function:: void obs_property_frame_rate_clear(obs_property_t *p)
  482. ---------------------
  483. .. function:: void obs_property_frame_rate_options_clear(obs_property_t *p)
  484. ---------------------
  485. .. function:: void obs_property_frame_rate_fps_ranges_clear(obs_property_t *p)
  486. ---------------------
  487. .. function:: void obs_property_frame_rate_option_insert(obs_property_t *p, size_t idx, const char *name, const char *description)
  488. ---------------------
  489. .. function:: void obs_property_frame_rate_fps_range_insert(obs_property_t *p, size_t idx, struct media_frames_per_second min, struct media_frames_per_second max)
  490. ---------------------
  491. .. function:: void obs_property_button_set_type(obs_property_t *p, enum obs_button_type type)
  492. :param type: Can be one of the following values:
  493. - **OBS_BUTTON_DEFAULT** - Standard button
  494. - **OBS_BUTTON_URL** - Button that opens a URL
  495. :return: The property
  496. ---------------------
  497. .. function:: void obs_property_button_set_url(obs_property_t *p, char *url)