diff options
| author | Fuwn <[email protected]> | 2021-08-18 16:00:40 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-08-18 16:00:40 -0700 |
| commit | 44489f0883cfdb96ec4366160c726fb794c1e17d (patch) | |
| tree | 349cde911a7dda9adae936934dd879663e8446ca /include | |
| parent | Merge branch 'main' of https://github.com/fuwn/soyuz (diff) | |
| download | soyuz-44489f0883cfdb96ec4366160c726fb794c1e17d.tar.xz soyuz-44489f0883cfdb96ec4366160c726fb794c1e17d.zip | |
feat(soyuz): tray support, and much more
Diffstat (limited to 'include')
| -rw-r--r-- | include/soyuz/library.hh | 4 | ||||
| -rw-r--r-- | include/soyuz/resource.hh | 17 | ||||
| -rw-r--r-- | include/soyuz/soyuz.hh | 1 | ||||
| -rw-r--r-- | include/soyuz/tray.hh | 26 | ||||
| -rw-r--r-- | include/soyuz/windows.hh | 3 |
5 files changed, 51 insertions, 0 deletions
diff --git a/include/soyuz/library.hh b/include/soyuz/library.hh index 41668a7..ae7ce13 100644 --- a/include/soyuz/library.hh +++ b/include/soyuz/library.hh @@ -11,8 +11,12 @@ #define NT_SUCCESS(status) (status >= 0) #define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) +namespace soyuz { + static auto enum_windows_proc(HWND hwnd, LPARAM lparam) -> BOOL; auto find_lunar() -> DWORD; auto delete_handle(DWORD pid) -> int; +} + #endif //SOYUZ_LIBRARY_HH diff --git a/include/soyuz/resource.hh b/include/soyuz/resource.hh new file mode 100644 index 0000000..89c1242 --- /dev/null +++ b/include/soyuz/resource.hh @@ -0,0 +1,17 @@ +// Copyright (C) 2021-2021 Fuwn +// SPDX-License-Identifier: GPL-3.0-only + +#ifndef SOYUZ_RESOURCE_HH +#define SOYUZ_RESOURCE_HH + +#pragma once + +#include <shellapi.h> +#include <Windows.h> + +#define ICO1 101 +#define ID_TRAY_APP_ICON 1001 +#define ID_TRAY_EXIT 1002 +#define WM_SYSICON (WM_USER + 1) + +#endif //SOYUZ_RESOURCE_HH diff --git a/include/soyuz/soyuz.hh b/include/soyuz/soyuz.hh index 20cf432..99ffaa4 100644 --- a/include/soyuz/soyuz.hh +++ b/include/soyuz/soyuz.hh @@ -8,5 +8,6 @@ #define LUNAR_WINDOW_NAME_BASE "Lunar Client (" #define DISCORD_IPC_NAMED_PIPE_NAME L"\\Device\\NamedPipe\\discord-ipc-0" +#define WINDOW_TRAY_NAME "Soyuz - 1.1.0 | Copyright (C) 2021-2021 Fuwn" #endif //SOYUZ_SOYUZ_HH diff --git a/include/soyuz/tray.hh b/include/soyuz/tray.hh new file mode 100644 index 0000000..27c3214 --- /dev/null +++ b/include/soyuz/tray.hh @@ -0,0 +1,26 @@ +// Copyright (C) 2021-2021 Fuwn +// SPDX-License-Identifier: GPL-3.0-only + +#ifndef SOYUZ_TRAY_HH +#define SOYUZ_TRAY_HH + +#pragma once + +#include <string> +#include <vector> +#include <Windows.h> + +#define LOG(message) logs.push_back(message); + +auto WindowProcedure(HWND, UINT, WPARAM, LPARAM) -> LRESULT; // CALLBACK +auto minimize() -> void; +auto restore() -> void; +auto InitNotifyIconData() -> void; + +namespace soyuz { + +auto log(const std::string &message) -> void; + +} + +#endif //SOYUZ_TRAY_HH diff --git a/include/soyuz/windows.hh b/include/soyuz/windows.hh index dd145ac..f709444 100644 --- a/include/soyuz/windows.hh +++ b/include/soyuz/windows.hh @@ -1,3 +1,6 @@ +// Copyright (C) 2021-2021 Fuwn +// SPDX-License-Identifier: GPL-3.0-only + #ifndef SOYUZ_WINDOWS_HH #define SOYUZ_WINDOWS_HH |