mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-06 07:36:12 -05:00
obs-frontend-api: Access system tray icon from API
All UI elements are accessible through the obs frontend api via obs_frontend_api_get_main_window, except for the tray icon and its elements. This commit adds an obs_frontend_api_get_system_tray function which returns the pointer to the QSystemTrayIcon cast to void (much like the QMainWindow pointer for the main window).
This commit is contained in:
@@ -67,6 +67,11 @@ struct OBSStudioAPI : obs_frontend_callbacks {
|
||||
return (void*)main->winId();
|
||||
}
|
||||
|
||||
void *obs_frontend_get_system_tray(void) override
|
||||
{
|
||||
return (void*)main->trayIcon.data();
|
||||
}
|
||||
|
||||
void obs_frontend_get_scenes(
|
||||
struct obs_frontend_source_list *sources) override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user