#ifndef OS_GFX_WIN32_H
#define OS_GFX_WIN32_H

typedef struct OS_W32_Window OS_W32_Window;
struct OS_W32_Window
{
  OS_W32_Window *next;
  OS_W32_Window *prev;
  HWND hwnd;
  HDC hdc;
};

typedef struct OS_W32_Gfx_State OS_W32_Gfx_State;
struct OS_W32_Gfx_State
{
  Arena *arena;
  HWND global_hwnd;
  HDC global_hdc;

  Arena *window_arena;
  OS_W32_Window *first_window;
  OS_W32_Window *last_window;
  OS_W32_Window *free_window;
};

root_global OS_W32_Gfx_State *os_g_w32_gfx_state = 0;
extern per_thread Arena *os_w32_tl_events_arena = 0;
extern per_thread OS_EventList *os_w32_tl_events_list = 0;

root_function OS_Handle OS_W32_handle_from_window(OS_W32_Window *window);
root_function OS_W32_Window *OS_W32_window_from_handle(OS_Handle handle);
function LRESULT OS_W32_window_proc(HWND hwnd, UINT message, WPARAM w_param, LPARAM l_param);



#endif // OS_GFX_WIN32_H
