keymapping

This commit is contained in:
2026-07-03 22:07:03 +03:00
parent c809aa98f5
commit 7a98eb4dfb
12 changed files with 248 additions and 119 deletions

37
src/pltf/win32/internal.h Normal file
View File

@@ -0,0 +1,37 @@
#ifndef PLTF_WIN32_INTERNAL_H_
#define PLTF_WIN32_INTERNAL_H_
#include <windef.h>
#include "../pltf.h"
#include "DynArray.h"
typedef struct {
HGLRC gl_ctx;
} WinState;
#define PLTF_KEYS_X(lower, upper) \
PltfKeyCallback key_##lower##_cb; \
void* key_##lower##_cb_user_data;
typedef struct {
const wchar_t* wc_name;
HMODULE exe_module;
HWND hwnd;
HDC hdc;
DynArray_DynString wgl_extensions;
WinState window_state;
PLTF_KEYS(PLTF_KEYS_X);
} PltfWin32State;
#undef PLTF_KEYS_X
extern PltfWin32State pltf_state;
extern HMODULE opengl_module;
bool pltf_has_wgl_extension(const DynString* name);
bool pltf_has_wgl_extension_c_str(const char* name);
unsigned int vk_to_pltf_key(WPARAM key);
#endif // PLTF_WIN32_INTERNAL_H_