17#if defined(_WIN32) || defined(__APPLE__)
51#if defined(_WIN32) || defined(__APPLE__)
81 void tray_quit_cb([[maybe_unused]]
struct tray_menu *item);
131#if defined(_WIN32) || defined(__APPLE__)
158 std::string_view version,
159 bool version_compatible,
160 std::string_view supported_versions
181 const struct tray &tray_data_for_testing();
188 bool tray_initialized_for_testing();
193 void reset_tray_data_for_testing();
201 const char *resource_path_for_testing(
const char *relative_path);
206 void resolve_tray_icon_paths_for_testing();
Thread-safe event value that blocks readers until a value is raised.
Definition thread_safe.h:24
Handles the system tray icon and notification system.
Definition system_tray.cpp:90
void tray_donate_github_cb(struct tray_menu *item)
Callback for opening GitHub Sponsors from the system tray.
Definition system_tray.cpp:175
int init_tray()
Initializes the system tray without starting a loop.
Definition system_tray.cpp:808
int init_tray_threaded()
Initializes and runs the system tray in a separate thread.
Definition system_tray.cpp:964
void tray_donate_paypal_cb(struct tray_menu *item)
Callback for opening PayPal donation from the system tray.
Definition system_tray.cpp:183
int process_tray_events()
Processes a single tray event iteration.
Definition system_tray.cpp:812
void update_tray_require_pin()
Spawns a notification for PIN Pairing. Clicking it opens the PIN Web UI Page.
Definition system_tray.cpp:910
void update_tray_virtualhid_driver(const bool installed, const std::string_view version, const bool version_compatible, const std::string_view supported_versions)
Show an update notification for an unsupported Virtual HID Broker.
Definition system_tray.cpp:550
void update_tray_playing(std::string app_name)
Sets the tray icon in playing mode and spawns the appropriate notification.
Definition system_tray.cpp:844
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:866
void prepare_tray_virtualhid_license()
Query the Virtual HID Broker license and prepare the startup tray state.
Definition system_tray.cpp:545
void tray_reset_display_device_config_cb(struct tray_menu *item)
Callback for resetting display device configuration.
Definition system_tray.cpp:228
void tray_restart_cb(struct tray_menu *item)
Callback for restarting Sunshine from the system tray.
Definition system_tray.cpp:234
void update_tray_virtualhid_license(const lvh::LicenseStatus &license, const bool notify_if_unlicensed)
Update the Virtual HID Broker license submenu and optional notification.
Definition system_tray.cpp:498
void run_tray_until_exit(const std::shared_ptr< safe::event_t< bool > > &shutdown_event)
Process tray events until exit and notify the application's workers.
Definition system_tray.cpp:822
void tray_open_ui_cb(struct tray_menu *item)
Callback for opening the UI from the system tray.
Definition system_tray.cpp:170
void tray_quit_cb(struct tray_menu *item)
Callback for exiting Sunshine from the system tray.
Definition system_tray.cpp:240
void prepare_tray_virtualhid_driver()
Query the Virtual HID Broker version and prepare its startup notification.
Definition system_tray.cpp:588
int end_tray()
Exit the system tray.
Definition system_tray.cpp:827
void tray_virtualhid_license_cb(struct tray_menu *item)
Callback for opening Virtual HID Broker license settings in the Web UI.
Definition system_tray.cpp:188
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:888
void tray_donate_patreon_cb(struct tray_menu *item)
Callback for opening Patreon from the system tray.
Definition system_tray.cpp:179
void tray_virtualhid_download_cb(struct tray_menu *item)
Callback for opening the latest Virtual HID Broker release.
Definition system_tray.cpp:197