1 /*!**************************************************************************** 2 3 @file Windows/PVRShellOS.h 4 @ingroup OS_Windows 5 @copyright Copyright (c) Imagination Technologies Limited. 6 @brief Initialization for the shell for the Windows OS. 7 @details Makes programming for 3D APIs easier by wrapping surface 8 initialization, Texture allocation and other functions for use by a demo. 9 10 ******************************************************************************/ 11 #ifndef _PVRSHELLOS_ 12 #define _PVRSHELLOS_ 13 14 #include <windows.h> 15 16 // The following defines are for Windows PC platforms only 17 #if defined(_WIN32) 18 // Enable the following 2 lines for memory leak checking - also see WinMain() 19 #define _CRTDBG_MAP_ALLOC 20 #include <crtdbg.h> 21 #endif 22 23 #define PVRSHELL_DIR_SYM '\\' 24 #define vsnprintf _vsnprintf 25 26 /*! 27 @addtogroup OS_Windows 28 @brief Windows OS 29 @details The following table illustrates how key codes are mapped in Windows: 30 <table> 31 <tr><th> Key code </th><th> KeyPressed (PVRShell) </th></tr> 32 <tr><td> ESCAPE </td><td> PVRShellKeyNameQUIT </td></tr> 33 <tr><td> UP </td><td> m_eKeyMapUP </td></tr> 34 <tr><td> DOWN </td><td> m_eKeyMapDOWN </td></tr> 35 <tr><td> LEFT </td><td> m_eKeyMapLEFT </td></tr> 36 <tr><td> RIGHT </td><td> m_eKeyMapRIGHT </td></tr> 37 <tr><td> SPACE </td><td> PVRShellKeyNameSELECT </td></tr> 38 <tr><td> '1' </td><td> PVRShellKeyNameACTION1 </td></tr> 39 <tr><td> '2' </td><td> PVRShellKeyNameACTION2 </td></tr> 40 <tr><td> F11 </td><td> PVRShellKeyNameScreenshot </td></tr> 41 </table> 42 @{ 43 */ 44 45 /*!*************************************************************************** 46 @class PVRShellInitOS 47 @brief Interface with specific Operating System. 48 *****************************************************************************/ 49 class PVRShellInitOS 50 { 51 public: 52 HDC m_hDC; 53 HWND m_hWnd; 54 55 // Pixmap support: variables for the pixmap 56 HBITMAP m_hBmPixmap, m_hBmPixmapOld; 57 HDC m_hDcPixmap; 58 59 HACCEL m_hAccelTable; 60 HINSTANCE m_hInstance; 61 int m_nCmdShow; 62 63 bool m_bHaveFocus; 64 65 unsigned int m_u32ButtonState; 66 67 public: 68 ATOM MyRegisterClass(); 69 }; 70 71 /*! @} */ 72 73 #endif /* _PVRSHELLOS_ */ 74 /***************************************************************************** 75 End of file (PVRShellOS.h) 76 *****************************************************************************/ 77 78