#pragma once #include #include #include // All extra Windows headers come after . #include #include #include "window.h" #define STELA_WIN32_KEY_MAX (VK_OEM_7 + 1) struct stl_win32_global { HINSTANCE ModuleHandle; BOOL IsWine; HWND ServiceWindow; #ifdef STELA_API_VULKAN const char **VKExtensions; #endif HCURSOR Cursors[STELA_CURSOR_HIDDEN]; u16 keycodes[STELA_WIN32_KEY_MAX]; array(struct stl_monitor *) monitors; u32 argc; str *argv; void *extra; s32 (*main)(u32, str *, void *); }; struct stl_monitor_win32 { struct stl_monitor M; s32 X; s32 Y; HMONITOR Handle; }; struct stl_window_win32 { struct stl_window w; HWND Window; wstr WindowName; struct { struct stl_monitor_win32 *Monitor; s32 X; s32 Y; s32 Width; s32 Height; LONG Style; } Prev; BOOL Decorated; BOOL UserDecorated; BOOL WindowMoving; POINTS LastMousePos; u32 MouseButtonMask; #ifdef STELA_API_OPENGL HDC DeviceContext; HGLRC GLContext; HGLRC CurrentContext; #endif };