mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-23 22:39:20 +03:00
feat(client): migrate gui functions and implement OsGuiGetWindow
This commit is contained in:
1 parent
acaa42019a
commit
ba790418e1
12 files changed
+120
-33
No files matched your search
@@ -0,0 +1,14 @@
|
||||
#ifndef CLIENT_GUI_OS_GUI_HPP
|
||||
#define CLIENT_GUI_OS_GUI_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
void* OsGuiGetWindow(int32_t type);
|
||||
|
||||
bool OsGuiIsModifierKeyDown(int32_t key);
|
||||
|
||||
int32_t OsGuiProcessMessage(void* message);
|
||||
|
||||
void OsGuiSetGxWindow(void* window);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "client/gui/OsGui.hpp"
|
||||
|
||||
void* OsGuiGetWindow(int32_t type) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool OsGuiIsModifierKeyDown(int32_t key) {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t OsGuiProcessMessage(void* message) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OsGuiSetGxWindow(void* window) {
|
||||
// TODO
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "client/gui/OsGui.hpp"
|
||||
|
||||
void* OsGuiGetWindow(int32_t type) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool OsGuiIsModifierKeyDown(int32_t key) {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t OsGuiProcessMessage(void* message) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OsGuiSetGxWindow(void* window) {
|
||||
// TODO
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#include "client/gui/OsGui.hpp"
|
||||
#include <windows.h>
|
||||
|
||||
static void* s_GxDevWindow;
|
||||
|
||||
void* OsGuiGetWindow(int32_t type) {
|
||||
switch (type) {
|
||||
case 0:
|
||||
return s_GxDevWindow;
|
||||
case 1:
|
||||
return GetActiveWindow();
|
||||
case 2:
|
||||
return GetForegroundWindow();
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool OsGuiIsModifierKeyDown(int32_t key) {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t OsGuiProcessMessage(void* message) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OsGuiSetGxWindow(void* window) {
|
||||
s_GxDevWindow = window;
|
||||
}
|
||||
Reference in new issue
Block a user