os -> wm; *_w32_ -> w32_*_, *_lnx_ -> lnx_*_

This commit is contained in:
Ryan Fleury committed 2026-05-08 21:17:21 -07:00
1 parent 9a7782de47
commit 2f6d0f9aaa
52 files changed
+3086 -3115

No files matched your search

File diff suppressed because it is too large. Load diff
+41 -41
View File
@@ -24,18 +24,18 @@
////////////////////////////////
//~ rjf: Windows
typedef struct OS_W32_TitleBarClientArea OS_W32_TitleBarClientArea;
struct OS_W32_TitleBarClientArea
typedef struct W32_WM_TitleBarClientArea W32_WM_TitleBarClientArea;
struct W32_WM_TitleBarClientArea
{
OS_W32_TitleBarClientArea *next;
W32_WM_TitleBarClientArea *next;
Rng2F32 rect;
};
typedef struct OS_W32_Window OS_W32_Window;
struct OS_W32_Window
typedef struct W32_WM_Window W32_WM_Window;
struct W32_WM_Window
{
OS_W32_Window *next;
OS_W32_Window *prev;
W32_WM_Window *next;
W32_WM_Window *prev;
HWND hwnd;
HDC hdc;
WINDOWPLACEMENT last_window_placement;
@@ -47,77 +47,77 @@ struct OS_W32_Window
F32 custom_border_edge_thickness;
B32 custom_border_composition_enabled;
Arena *paint_arena;
OS_W32_TitleBarClientArea *first_title_bar_client_area;
OS_W32_TitleBarClientArea *last_title_bar_client_area;
W32_WM_TitleBarClientArea *first_title_bar_client_area;
W32_WM_TitleBarClientArea *last_title_bar_client_area;
};
////////////////////////////////
//~ rjf: Monitor Gathering Bundle
typedef struct OS_W32_MonitorGatherNode OS_W32_MonitorGatherNode;
struct OS_W32_MonitorGatherNode
typedef struct W32_WM_MonitorGatherNode W32_WM_MonitorGatherNode;
struct W32_WM_MonitorGatherNode
{
OS_W32_MonitorGatherNode *next;
OS_Monitor v;
W32_WM_MonitorGatherNode *next;
WM_Monitor v;
};
typedef struct OS_W32_MonitorGatherBundle OS_W32_MonitorGatherBundle;
struct OS_W32_MonitorGatherBundle
typedef struct W32_WM_MonitorGatherBundle W32_WM_MonitorGatherBundle;
struct W32_WM_MonitorGatherBundle
{
Arena *arena;
OS_W32_MonitorGatherNode *first_monitor;
OS_W32_MonitorGatherNode *last_monitor;
W32_WM_MonitorGatherNode *first_monitor;
W32_WM_MonitorGatherNode *last_monitor;
U64 monitor_count;
};
////////////////////////////////
//~ rjf: Global State
typedef struct OS_W32_GfxState OS_W32_GfxState;
struct OS_W32_GfxState
typedef struct W32_WM_State W32_WM_State;
struct W32_WM_State
{
Arena *arena;
U32 gfx_thread_tid;
HINSTANCE hInstance;
HCURSOR hCursor;
OS_GfxInfo gfx_info;
OS_W32_Window *first_window;
OS_W32_Window *last_window;
OS_W32_Window *free_window;
OS_Key key_from_vkey_table[256];
WM_SystemInfo gfx_info;
W32_WM_Window *first_window;
W32_WM_Window *last_window;
W32_WM_Window *free_window;
WM_Key key_from_vkey_table[256];
};
////////////////////////////////
//~ rjf: Globals
global OS_W32_GfxState *os_w32_gfx_state = 0;
global OS_EventList os_w32_event_list = {0};
global Arena *os_w32_event_arena = 0;
global B32 os_w32_resizing = 0;
global B32 os_w32_new_window_custom_border = 0;
global W32_WM_State *w32_wm_state = 0;
global WM_EventList w32_wm_event_list = {0};
global Arena *w32_wm_event_arena = 0;
global B32 w32_wm_resizing = 0;
global B32 w32_wm_new_window_custom_border = 0;
////////////////////////////////
//~ rjf: Basic Helpers
internal Rng2F32 os_w32_rng2f32_from_rect(RECT rect);
internal Rng2F32 w32_wm_rng2f32_from_rect(RECT rect);
////////////////////////////////
//~ rjf: Windows
internal OS_Window os_w32_handle_from_window(OS_W32_Window *window);
internal OS_W32_Window * os_w32_window_from_handle(OS_Window window);
internal OS_W32_Window * os_w32_window_from_hwnd(HWND hwnd);
internal HWND os_w32_hwnd_from_window(OS_W32_Window *window);
internal OS_W32_Window * os_w32_window_alloc(void);
internal void os_w32_window_release(OS_W32_Window *window);
internal OS_Event * os_w32_push_event(OS_EventKind kind, OS_W32_Window *window);
internal OS_Key os_w32_os_key_from_vkey(WPARAM vkey);
internal WPARAM os_w32_vkey_from_os_key(OS_Key key);
internal LRESULT os_w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
internal WM_Window w32_wm_handle_from_window(W32_WM_Window *window);
internal W32_WM_Window * w32_wm_window_from_handle(WM_Window window);
internal W32_WM_Window * w32_wm_window_from_hwnd(HWND hwnd);
internal HWND w32_wm_hwnd_from_window(W32_WM_Window *window);
internal W32_WM_Window * w32_wm_window_alloc(void);
internal void w32_wm_window_release(W32_WM_Window *window);
internal WM_Event * w32_wm_push_event(WM_EventKind kind, W32_WM_Window *window);
internal WM_Key w32_wm_os_key_from_vkey(WPARAM vkey);
internal WPARAM w32_wm_vkey_from_os_key(WM_Key key);
internal LRESULT w32_wm_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
////////////////////////////////
//~ rjf: Monitors
internal BOOL os_w32_monitor_gather_enum_proc(HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM bundle_ptr);
internal BOOL w32_wm_monitor_gather_enum_proc(HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM bundle_ptr);
#endif // WIN32_WINDOW_MANAGER_H