obs-frontend-api,UI,docs: Add dock API that ask for unique object name

obs_frontend_add_dock() is deprecated in favor of
obs_frontend_add_dock_by_id()
This commit is contained in:
tytan652
2023-06-03 16:47:01 -07:00
committed by Lain
parent f2fa54120a
commit cde5545f8f
5 changed files with 82 additions and 0 deletions
+27
View File
@@ -447,6 +447,33 @@ Functions
:param dock: QDockWidget to add/create
:return: A pointer to the added QAction
.. deprecated:: 29.1
Prefer :c:func:`obs_frontend_add_dock_by_id()` instead.
---------------------------------------
.. function:: bool obs_frontend_add_dock_by_id(const char *id, const char *title, void *widget)
Adds a dock with the widget to the UI with a toggle in the Docks
menu.
Note: Use :c:func:`obs_frontend_remove_dock` to remove the dock
and the id from the UI.
:param id: Unique identifier of the dock
:param title: Window title of the dock
:param widget: QWidget to insert in the dock
:return: *true* if the dock was added, *false* if the id was already
used
---------------------------------------
.. function:: void obs_frontend_remove_dock(const char *id)
Removes the dock with this id from the UI.
:param id: Unique identifier of the dock to remove.
---------------------------------------
.. function:: void obs_frontend_add_event_callback(obs_frontend_event_cb callback, void *private_data)