comparison EXCLUDE/GLTSF/include/Window.hpp @ 4730:6032ada8b9e5

Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
author dewyatt
date Tue, 25 May 2010 18:53:09 -0400
parents
children 0c7c67d4e6ee
comparison
equal deleted inserted replaced
4464:fa77a6429698 4730:6032ada8b9e5
1 #ifndef WINDOW_HPP
2 #define WINDOW_HPP
3
4 #include <string>
5
6 #define WIN32_LEAN_AND_MEAN
7 #include <Windows.h>
8
9 #include "Video_Mode.hpp"
10 #include "Window_Listener.hpp"
11
12 class Window
13 {
14 public:
15 Window();
16 ~Window();
17
18 void Initialize(const std::wstring &Title, const Video_Mode &Mode, bool Fullscreen);
19 void Finalize();
20
21 void Set_Listener(Window_Listener *Listener);
22
23 void Show();
24 void Hide();
25
26 void Update();
27 void Display();
28
29 private:
30 static const wchar_t *Window_Class_Name;
31
32 void Register_Class();
33 void Unregister_Class();
34
35 void Create_Window(const std::wstring &Title, const Video_Mode &Mode, bool Fullscreen);
36 void Destroy_Window();
37
38 void Create_Context(const Video_Mode &Mode);
39 void Destroy_Context();
40
41 void Switch_To_Fullscreen(const Video_Mode &Mode);
42
43 LRESULT Handle_Message(HWND Handle, UINT Message, WPARAM wParam, LPARAM lParam);
44 static LRESULT CALLBACK Window_Procedure(HWND Handle, UINT Message, WPARAM wParam, LPARAM lParam);
45
46 HWND my_Handle;
47 Video_Mode my_Video_Mode;
48 bool my_Fullscreen;
49 HDC my_Device_Context;
50 HGLRC my_GL_Context;
51 bool my_Class_Registered;
52 Window_Listener *my_Listener;
53 };
54
55 #endif