-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNouWindow.h
More file actions
54 lines (44 loc) · 1.19 KB
/
NouWindow.h
File metadata and controls
54 lines (44 loc) · 1.19 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include "settings.h"
#include "NouWin.h"
#include "NouException.h"
#include "GraphicsD11.h"
class NouWindow
{
private:
class WindowClass
{
public:
static const char* GetName() noexcept;
static HINSTANCE GetInstance() noexcept;
private:
WindowClass() noexcept;
~WindowClass();
WindowClass(const WindowClass&) = delete;
WindowClass& operator = (const WindowClass&) = delete;
static constexpr const char* wndClassName = "NouEngingeWindowClass";
static WindowClass wndClass;
HINSTANCE hInst;
};
public:
NouWindow(int width, int height, const char* name);
~NouWindow();
NouWindow(const NouWindow&) = delete;
NouWindow& operator = (const NouWindow&) = delete;
void SetTitle(const char* title);
GraphicsD11& Gfx();
int GetWidth();
int GetHeight();
public:
static bool ProcessMessage();
static int LastQuitCode;
private:
static LRESULT CALLBACK HandleMsgSetup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
static LRESULT CALLBACK HandleMsgThunk(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
LRESULT HandleMsg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
private:
int width;
int height;
HWND hWnd;
GraphicsD11* pGfx;
};