aboutsummaryrefslogtreecommitdiff
path: root/src/graveyard/win32/Win32WindowService.h
blob: a02ef2bc728d60b24b2774e1c301a7b1d9dee0ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
struct Win32WindowSettings
{
    const char *name;
    int width;
    int height;
};

class Win32WindowService
{
public:
    bool Init();

    Win32Window *CreateWin32Window(const char *name, int width, int height);
    void DestroyWin32Window(Win32Window *window);
    i32 GetWindowEvents(Win32Window *window, Sys_Event *events, i32 max_event_count);
    void ShowOffscreenBuffer(Win32Window *window);

    enum
    {
        SERVICE_WINDOW_CREATED     = (WM_USER + 0),
        SERVICE_WINDOW_NOT_CREATED = (WM_USER + 1),
        CREATE_WINDOW              = (WM_USER + 2),
        DESTROY_WINDOW             = (WM_USER + 3),
        WINDOW_CREATED             = (WM_USER + 4),
        WINDOW_DESTROYED           = (WM_USER + 5)
    };

private:
    void RecreateOffscreenBuffer(Sys_Offscreen_Buffer *buff, i32 width, i32 height);

public:
    HWND m_ServiceWindow;
};