Sunshine latest
Self-hosted game stream host for Moonlight.
system_tray.cpp File Reference

Definitions for the system tray icon and notification system. More...

#include <accctrl.h>
#include <aclapi.h>
#include <csignal>
#include <string>
#include <boost/filesystem.hpp>
#include <boost/process/v1/environment.hpp>
#include <tray/src/tray.h>
#include "confighttp.h"
#include "display_device.h"
#include "logging.h"
#include "platform/common.h"
#include "process.h"
#include "src/entry_handler.h"
#include "version.h"
Include dependency graph for system_tray.cpp:

Namespaces

namespace  system_tray
 Handles the system tray icon and notification system.
 

Macros

#define TRAY_ICON   WEB_DIR "images/sunshine.ico"
 
#define TRAY_ICON_LOCKED   WEB_DIR "images/sunshine-locked.ico"
 
#define TRAY_ICON_PAUSING   WEB_DIR "images/sunshine-pausing.ico"
 
#define TRAY_ICON_PLAYING   WEB_DIR "images/sunshine-playing.ico"
 
#define WIN32_LEAN_AND_MEAN
 

Functions

int system_tray::end_tray ()
 Exit the system tray.
 
void system_tray::run_tray ()
 Run the system tray with platform specific options.
 
int system_tray::system_tray ()
 Create the system tray.
 
void system_tray::tray_donate_github_cb (struct tray_menu *item)
 Callback for opening GitHub Sponsors from the system tray.
 
void system_tray::tray_donate_patreon_cb (struct tray_menu *item)
 Callback for opening Patreon from the system tray.
 
void system_tray::tray_donate_paypal_cb (struct tray_menu *item)
 Callback for opening PayPal donation from the system tray.
 
void system_tray::tray_open_ui_cb (struct tray_menu *item)
 Callback for opening the UI from the system tray.
 
void system_tray::tray_quit_cb (struct tray_menu *item)
 Callback for exiting Sunshine from the system tray.
 
void system_tray::tray_reset_display_device_config_cb (struct tray_menu *item)
 Callback for resetting display device configuration.
 
void system_tray::tray_restart_cb (struct tray_menu *item)
 Callback for restarting Sunshine from the system tray.
 
void system_tray::update_tray_pausing (std::string app_name)
 Sets the tray icon in pausing mode (stream stopped but app running) and spawns the appropriate notification.
 
void system_tray::update_tray_playing (std::string app_name)
 Sets the tray icon in playing mode and spawns the appropriate notification.
 
void system_tray::update_tray_require_pin ()
 Spawns a notification for PIN Pairing. Clicking it opens the PIN Web UI Page.
 
void system_tray::update_tray_stopped (std::string app_name)
 Sets the tray icon in stopped mode (app and stream stopped) and spawns the appropriate notification.
 

Detailed Description

Definitions for the system tray icon and notification system.