@@ -210,6 +210,22 @@ Structures/Enumerations
210210
211211 obs_frontend_source_list_free(&scenes);
212212
213+ .. type :: struct obs_frontend_browser_params
214+
215+ - const char* **url **
216+ - struct dstr **startup_script **
217+ - DARRAY(char*) **force_popup_urls **
218+
219+ .. code :: cpp
220+
221+ struct obs_frontend_browser_params params = {0};
222+
223+ params.url = "https://obsproject.com/";
224+
225+ obs_frontend_add_browser_dock("example", "Example", ¶ms);
226+
227+ obs_frontend_browser_params_free(¶ms);
228+
213229 .. type :: void (*obs_frontend_cb)(void *private_data)
214230
215231 Frontend tool menu callback
@@ -238,6 +254,14 @@ Functions
238254
239255---------------------------------------
240256
257+ .. function :: void obs_frontend_browser_params_free(struct obs_frontend_browser_params *params)
258+
259+ Frees the startup script and force popup URLs if not empty.
260+
261+ :param params: Browser parameters with dynamic types to free
262+
263+ ---------------------------------------
264+
241265.. function :: void *obs_frontend_get_main_window(void)
242266
243267 :return: The QMainWindow pointer to the OBS Studio window
@@ -485,6 +509,39 @@ Functions
485509
486510---------------------------------------
487511
512+ .. function :: bool obs_frontend_is_browser_available(void)
513+
514+ :return: If browser feature is available (built with obs-browser or
515+ not runnning under Wayland)
516+
517+ ---------------------------------------
518+
519+ .. function :: bool obs_frontend_add_browser_dock(const char *id, const char *title, struct obs_frontend_browser_params* params)
520+
521+ Adds a browser dock with the widget to the UI with a toggle in the Docks
522+ menu.
523+
524+ Note: Use :c:func: `obs_frontend_remove_dock ` to remove the dock
525+ and the id from the UI.
526+
527+ :param id: Unique identifier of the dock
528+ :param title: Window title of the dock
529+ :param params: Parameters of the browser widget
530+ :return: *true * if the dock was added, *false * if the id was already
531+ used
532+
533+ ---------------------------------------
534+
535+ .. function :: void obs_frontend_change_browser_dock_url(const char *id, const char *url)
536+
537+ Change the URL of browser dock created with
538+ :c:func: `obs_frontend_add_browser_dock `.
539+
540+ :param id: Unique identifier of the targeted browser dock
541+ :param url: New URL
542+
543+ ---------------------------------------
544+
488545.. function :: void obs_frontend_add_event_callback(obs_frontend_event_cb callback, void *private_data)
489546
490547 Adds a callback that will be called when a frontend event occurs.
0 commit comments