feat: add tray icon
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
|
||||
class TrayIcon {
|
||||
public:
|
||||
TrayIcon();
|
||||
~TrayIcon();
|
||||
|
||||
bool init();
|
||||
void shutdown();
|
||||
void processMessages();
|
||||
|
||||
void onToggleConsole();
|
||||
void onOpenControlPanel();
|
||||
void onExit();
|
||||
|
||||
void setExitCallback(std::function<void()> callback);
|
||||
|
||||
private:
|
||||
static void* windowProc(void* hwnd, unsigned int msg, unsigned long long wParam, long long lParam);
|
||||
static TrayIcon* instance;
|
||||
|
||||
void* _hwnd;
|
||||
bool _isConsoleVisible;
|
||||
std::function<void()> _exitCallback;
|
||||
};
|
||||
Reference in New Issue
Block a user