feat(client): migrate gui functions and implement OsGuiGetWindow

This commit is contained in:
fallenoak authored and GitHub committed 2023-03-20 00:06:50 -05:00
1 parent acaa42019a
commit ba790418e1
12 files changed
+120 -33

No files matched your search

+14
View File
@@ -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
+18
View File
@@ -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
}
+18
View File
@@ -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
}
+31
View File
@@ -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;
}