Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
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
17
18 void tray_force_stop_cb(struct tray_menu *item);
19
24
29 void tray_restart_cb([[maybe_unused]] struct tray_menu *item);
30
35 void tray_quit_cb([[maybe_unused]] struct tray_menu *item);
36
41 int init_tray();
42
48
53 int end_tray();
54
59 void update_tray_playing(std::string app_name);
60
65 void update_tray_pausing(std::string app_name);
66
71 void update_tray_stopped(std::string app_name);
72
73 void
74 update_tray_launch_error(std::string app_name, int exit_code);
75
85 void update_tray_session_error(std::string reason);
86
91
92 void update_tray_paired(std::string device_name);
93
94 void update_tray_client_connected(std::string client_name);
100
105 int end_tray_threaded();
106} // namespace system_tray
Handles the system tray icon and notification system.
int init_tray()
Initializes the system tray without starting a loop.
int init_tray_threaded()
Initializes and runs the system tray in a separate thread.
int process_tray_events()
Processes a single tray event iteration.
int end_tray_threaded()
Stops the threaded system tray and waits for the thread to finish.
void update_tray_require_pin()
Spawns a notification for PIN Pairing. Clicking it opens the PIN Web UI Page.
void update_tray_playing(std::string app_name)
Sets the tray icon in playing mode and spawns the appropriate notification.
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...
void tray_restart_cb(struct tray_menu *item)
Callback for resetting display device configuration.
void update_tray_session_error(std::string reason)
Spawns a notification for a session that could not start at all.
void tray_open_ui_cb(struct tray_menu *item)
Callback for opening the UI from the system tray.
void tray_quit_cb(struct tray_menu *item)
Callback for exiting Sunshine from the system tray.
int end_tray()
Exit the system tray.
void update_tray_stopped(std::string app_name)
Sets the tray icon in stopped mode (app and stream stopped) and spawns the appropriate notification.