Sunshine v2025.118.151840
Self-hosted game stream host for Moonlight.
system_tray.h
Go to the documentation of this file.
1
5#pragma once
6
10namespace system_tray {
15 void
16 tray_open_ui_cb(struct tray_menu *item);
17
22 void
23 tray_donate_github_cb(struct tray_menu *item);
24
29 void
30 tray_donate_patreon_cb(struct tray_menu *item);
31
36 void
37 tray_donate_paypal_cb(struct tray_menu *item);
38
43 void
44 tray_reset_display_device_config_cb(struct tray_menu *item);
45
50 void
51 tray_restart_cb(struct tray_menu *item);
52
57 void
58 tray_quit_cb(struct tray_menu *item);
59
65 int
67
72 int
73 run_tray();
74
79 int
80 end_tray();
81
86 void
87 update_tray_playing(std::string app_name);
88
93 void
94 update_tray_pausing(std::string app_name);
95
100 void
101 update_tray_stopped(std::string app_name);
102
106 void
108} // namespace system_tray
Handles the system tray icon and notification system.
Definition system_tray.cpp:50
void tray_donate_github_cb(struct tray_menu *item)
Callback for opening GitHub Sponsors from the system tray.
Definition system_tray.cpp:60
void tray_donate_paypal_cb(struct tray_menu *item)
Callback for opening PayPal donation from the system tray.
Definition system_tray.cpp:70
void update_tray_require_pin()
Spawns a notification for PIN Pairing. Clicking it opens the PIN Web UI Page.
Definition system_tray.cpp:318
void update_tray_playing(std::string app_name)
Sets the tray icon in playing mode and spawns the appropriate notification.
Definition system_tray.cpp:252
void update_tray_pausing(std::string app_name)
Sets the tray icon in pausing mode (stream stopped but app running) and spawns the appropriate notifi...
Definition system_tray.cpp:274
void tray_reset_display_device_config_cb(struct tray_menu *item)
Callback for resetting display device configuration.
Definition system_tray.cpp:75
int system_tray()
Create the system tray.
Definition system_tray.cpp:133
void tray_restart_cb(struct tray_menu *item)
Callback for restarting Sunshine from the system tray.
Definition system_tray.cpp:82
void run_tray()
Run the system tray with platform specific options.
Definition system_tray.cpp:226
void tray_open_ui_cb(struct tray_menu *item)
Callback for opening the UI from the system tray.
Definition system_tray.cpp:54
void tray_quit_cb(struct tray_menu *item)
Callback for exiting Sunshine from the system tray.
Definition system_tray.cpp:89
int end_tray()
Exit the system tray.
Definition system_tray.cpp:245
void update_tray_stopped(std::string app_name)
Sets the tray icon in stopped mode (app and stream stopped) and spawns the appropriate notification.
Definition system_tray.cpp:296
void tray_donate_patreon_cb(struct tray_menu *item)
Callback for opening Patreon from the system tray.
Definition system_tray.cpp:65