forked from Green-Sky/tomato
system tray support
This commit is contained in:
24
src/sys_tray.hpp
Normal file
24
src/sys_tray.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
class SystemTray {
|
||||
SDL_Window* _main_window {nullptr};
|
||||
SDL_Tray* _tray {nullptr};
|
||||
|
||||
SDL_TrayEntry* _entry_showhide {nullptr};
|
||||
SDL_TrayEntry* _entry_status {nullptr};
|
||||
|
||||
public:
|
||||
SystemTray(SDL_Window* main_window);
|
||||
~SystemTray(void);
|
||||
|
||||
void setIcon(SDL_Surface* surf);
|
||||
void setStatusText(const std::string& status);
|
||||
|
||||
// check if window is visible and adjust text
|
||||
void update(void);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user