Commit Graph

24 Commits

Author SHA1 Message Date
Sebastian Beckmann
dba426630a libobs: Deprecate v1 of obs_properties_add_button
With v1 of this function, it's unclear where exactly the data pointer
comes from or what it is. In fact, this is not determined by libobs, but
the consumer. libobs assumes that the caller of
obs_property_button_clicked passes an obs_context_data pointer, and then
passes the data pointer of that obs_context_data as the data pointer to
the callback.
In OBS Studio, this is always the private data of the associated object.
However, this assumes that there even is such an object (source/encoder/
etc), even though properties are meant to be free-standing. This is not
just philosophical, because with obs_get_source_properties you can
actually get an obs_properties_t that isn't associated with any specific
source, at which point you have no idea what the data pointer will be.

For this reason, obs_properties_add_button v1 needs to go.
obs_properties_add_button2 can be used as a drop-in replacement.
With v2, it's well-defined that the pointer you're passing as priv is
the pointer you get back in the callback as data. If you don't care
about it, simply pass NULL/nullptr.

Once v1 is removed in the future, obs_property_button_clicked should be
replaced with a variant that doesn't take a second argument, as that
argument will no longer be used anywhere.
2026-05-05 15:45:04 -04:00
Anton Kesy
376c0eb0a5 docs: Fix typos 2026-01-14 13:47:30 -05:00
Sebastian Beckmann
35c02e7bc2 docs: Clarify some aspects of OBS_PROPERTY_BUTTON
The important point here is that "data" from the callback isn't defined
by libobs, but rather by the API consumer.
Additionally, it's not entirely clear from the documentation whether the
callback would still be called for button of type OBS_BUTTON_URL. There
should be no negatives to always calling it and the OBS Studio frontend
already behaves that way, so let's document that in libobs.
2025-09-12 16:41:48 -04:00
CodeYan01
9c427c5f93 docs: Add versionadded for 30.x functions 2024-06-03 13:52:34 -04:00
CodeYan01
937986452b docs: Add property functions 2023-12-14 16:56:52 -05:00
Lain
d2d3e46e14 Revert "UI: Only defer property updates for input and transition sources"
This reverts commit 58fb63030c.

This is not the ideal fix for the fact that scripts can use a deferred
update flag because it makes it so that filters in general cannot use
flags. We need to disable this via other means.
2023-08-03 16:09:31 -07:00
gxalpha
32713eb95e docs: Add obs_properties_add_button2 2023-07-15 16:37:14 -07:00
gxalpha
58fb63030c UI: Only defer property updates for input and transition sources
Deferring properties was only ever made for input and transition
sources. As other property dialogs do not have an "Ok" button that would
cause an update to happen, if the deferred flag was set the callback
would never be called.
Also clarifies the docs to reflect this.
2023-05-20 16:55:50 -07:00
gxalpha
ad9fd6c6f0 libobs,UI: Add properties radio button list 2023-05-20 16:48:23 -07:00
gxalpha
f049962bb2 libobs: Add properties list boolean format 2023-05-20 16:48:23 -07:00
CodeYan01
d2dd917721 docs: Fix layout and typos 2023-02-26 10:31:02 +11:00
CodeYan01
17c0820d2f docs: Add info on property modified callback 2022-12-03 15:32:28 -08:00
CodeYan01
9e3a95cbdf docs: Add info on funcs to use for properties
Add links to obs_data_* funcs for color, font, and editable list
properties
2022-11-10 00:36:29 -08:00
CodeYan01
bdf6809f45 docs: Add clarifications
Adds links to release functions for "new/incremented reference".
Extra info on signal handler.
Parameter description on `obs_property_list_add_*` functions, since
their parameter `name` can be confusing and it is unclear which value
is stored in obs_data_t.
Adds clarifications on calldata_ptr.
2022-11-05 16:12:13 -07:00
CodeYan01
81233c6dd4 docs: Add links to python functions 2022-10-01 16:09:29 -07:00
tytan652
bf985946a4 libobs,UI,docs: Add info as text property sub-type in the property API 2022-06-26 17:31:59 +10:00
Matt Gajownik
74c3781554 libobs, UI: Add support for button properties as links
This adds support for a button property that opens a URL, after showing
a confirmation dialog to the user. Both the Type and URL must be set.
2021-07-09 17:32:09 +12:00
jpark37
e4bfb783ee docs/sphinx: Add obs_properties_add_color_alpha 2021-01-11 11:52:50 -08:00
VodBox
a78162991a docs/sphinx: Fix mismatched typedefs 2020-08-31 12:07:19 +12:00
Exeldro
b7a17d5b22 docs/sphinx: Add Property Grouping 2020-04-15 16:40:52 +02:00
Scratch
e462937fbc docs/sphinx: Fix obs_property_list_item_disable entry 2020-01-10 10:31:19 +11:00
luz.paz
d124e6402c docs/sphinx: Fix various typos
(This modifies UI, libobs, deps/obs-scripting, various cmake files)

Found using:
`codespell -q 3 -S *.ini,./UI/data/locale,./deps/w32-pthreads -L aci,dur,iff,mut,numer,uint`
2019-10-14 17:19:38 -07:00
jamacanbacn
8a59d68e47 libobs: Fix property text typo
(This commit also modifies UI)

Closes jp9000/obs-studio#1204
2018-02-27 05:37:40 -08:00
jp9000
d51e2a019b docs/sphinx: Add sphinx documentation 2017-11-27 03:02:04 -08:00