-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow.h
More file actions
47 lines (39 loc) · 1.53 KB
/
Copy pathWindow.h
File metadata and controls
47 lines (39 loc) · 1.53 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
// ===========================================================================
/// <summary>
/// Windows.h
/// DirectXIntroduction
/// created by Mehrdad Soleimanimajd on 19.07.2019
/// </summary>
/// <created>ʆϒʅ, 19.07.2019</created>
/// <changed>ʆϒʅ, 04.07.2023</changed>
// ===========================================================================
#ifndef WINDOW_H
#define WINDOW_H
#include <windows.h> // Windows standard APIs
#include "Core.h"
// Windows OS window class container
class Window
{
friend class TheCore;
private:
HINSTANCE appInstance; // handle to the application instance
HWND handle; // handle to game window (main window)
TheCore* core; // pointer to the framework core
bool initialized; // true if the initialization was successful
unsigned int clientWidth; // desired window resolution
unsigned int clientHeight;
bool minimized; // true if minimized
bool maximized; // true if maximized
bool resizing; // true while being dragged around
bool resized; // true when resized
public:
Window (TheCore*); // constructor and initializer
const bool& isInitialized (void); // get the initialized state
const HWND& getHandle (void); // get the handle to main window
unsigned int& getWidth (void); // get/set current window width
unsigned int& getHeight (void); // get/set current window height
bool& isResized (void); // get/set the resized state
virtual LRESULT CALLBACK msgProc (HWND, UINT, WPARAM, LPARAM); // Windows callback procedure
};
#endif // !WINDOW_H