/src/Core_WindowEvents/Win32D3D9/WindowData_DIRECTX9.h
C Header | 72 lines | 58 code | 14 blank | 0 comment | 0 complexity | c5b81e8079deff01331c44ed00788e76 MD5 | raw file
Possible License(s): AGPL-3.0, LGPL-2.1, LGPL-3.0, GPL-2.0
1#ifndef _WINDOW_DATA_DIRECTX10_H_ 2#define _WINDOW_DATA_DIRECTX10_H_ 3 4#include <windows.h> 5#include <map> 6 7 8 9class WindowData 10{ 11 friend class WindowEvents; 12 HWND handle_window; 13 HDC handle_device_context; 14 bool mouse_position_must_update; 15 static std::map<HWND, WindowEvents *> * handle_map_window; 16 17 static int vsync; 18public: 19 WindowData(); 20 ~WindowData(); 21 static WindowEvents * FindWindowEvents(HWND & hWnd); 22 inline const HWND & GetWindowHandle() const; 23 inline const HDC & GetDeviceContext() const; 24 inline void GetWindowHandle(HWND & hwnd); 25 inline void GetDeviceContext(HDC & hdc); 26 inline bool MouseRequiresUpdate() const; 27 inline void SetMouseRequiresUpdate(bool value); 28 29 inline void SetVSync(bool sync); 30 inline int GetVSync() const; 31}; 32 33inline const HWND & WindowData::GetWindowHandle() const 34{ 35 return handle_window; 36} 37inline const HDC & WindowData::GetDeviceContext() const 38{ 39 return handle_device_context; 40} 41 42inline void WindowData::GetWindowHandle(HWND & hwnd) 43{ 44 handle_window = hwnd; 45} 46inline void WindowData::GetDeviceContext(HDC & hdc) 47{ 48 handle_device_context = hdc; 49} 50 51inline bool WindowData::MouseRequiresUpdate() const 52{ 53 return mouse_position_must_update; 54} 55 56inline void WindowData::SetMouseRequiresUpdate(bool value) 57{ 58 mouse_position_must_update = value; 59} 60 61inline void WindowData::SetVSync(bool sync) 62{ 63 vsync = sync ? 1 : 0; 64} 65inline int WindowData::GetVSync() const 66{ 67 return vsync; 68} 69 70 71 72#endif