Sunshine v2026.319.132152
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 tray_open_ui_cb([[maybe_unused]] struct tray_menu *item);
16
21 void tray_donate_github_cb([[maybe_unused]] struct tray_menu *item);
22
27 void tray_donate_patreon_cb([[maybe_unused]] struct tray_menu *item);
28
33 void tray_donate_paypal_cb([[maybe_unused]] struct tray_menu *item);
34
39 void tray_reset_display_device_config_cb([[maybe_unused]] struct tray_menu *item);
40
45 void tray_restart_cb([[maybe_unused]] struct tray_menu *item);
46
51 void tray_quit_cb([[maybe_unused]] struct tray_menu *item);
52
57 int init_tray();
58
64
69 int end_tray();
70
75 void update_tray_playing(std::string app_name);
76
81 void update_tray_pausing(std::string app_name);
82
87 void update_tray_stopped(std::string app_name);
88
93
99} // namespace system_tray
Handles the system tray icon and notification system.
Definition system_tray.cpp:55
void tray_donate_github_cb(struct tray_menu *item)
Callback for opening GitHub Sponsors from the system tray.
Definition system_tray.cpp:63
int init_tray()
Initializes the system tray without starting a loop.
Definition system_tray.cpp:184
int init_tray_threaded()
Initializes and runs the system tray in a separate thread.
Definition system_tray.cpp:387
void tray_donate_paypal_cb(struct tray_menu *item)
Callback for opening PayPal donation from the system tray.
Definition system_tray.cpp:71
int process_tray_events()
Processes a single tray event iteration.
Definition system_tray.cpp:267
void update_tray_require_pin()
Spawns a notification for PIN Pairing. Clicking it opens the PIN Web UI Page.
Definition system_tray.cpp:348
void update_tray_playing(std::string app_name)
Sets the tray icon in playing mode and spawns the appropriate notification.
Definition system_tray.cpp:285
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:306
void tray_reset_display_device_config_cb(struct tray_menu *item)
Callback for resetting display device configuration.
Definition system_tray.cpp:75
void tray_restart_cb(struct tray_menu *item)
Callback for restarting Sunshine from the system tray.
Definition system_tray.cpp:81
void tray_open_ui_cb(struct tray_menu *item)
Callback for opening the UI from the system tray.
Definition system_tray.cpp:58
void tray_quit_cb(struct tray_menu *item)
Callback for exiting Sunshine from the system tray.
Definition system_tray.cpp:87
int end_tray()
Exit the system tray.
Definition system_tray.cpp:277
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:327
void tray_donate_patreon_cb(struct tray_menu *item)
Callback for opening Patreon from the system tray.
Definition system_tray.cpp:67