E:/Download/ois-1.0RC1/includes/win32/Win32InputManager.h

Go to the documentation of this file.
00001 /*
00002 The zlib/libpng License
00003 
00004 Copyright (c) 2006 Phillip Castaneda (pjcast -- www.wreckedgames.com)
00005 
00006 This software is provided 'as-is', without any express or implied warranty. In no event will
00007 the authors be held liable for any damages arising from the use of this software.
00008 
00009 Permission is granted to anyone to use this software for any purpose, including commercial 
00010 applications, and to alter it and redistribute it freely, subject to the following
00011 restrictions:
00012 
00013     1. The origin of this software must not be misrepresented; you must not claim that 
00014                 you wrote the original software. If you use this software in a product, 
00015                 an acknowledgment in the product documentation would be appreciated but is 
00016                 not required.
00017 
00018     2. Altered source versions must be plainly marked as such, and must not be 
00019                 misrepresented as being the original software.
00020 
00021     3. This notice may not be removed or altered from any source distribution.
00022 */
00023 #ifndef OIS_Win32InputManager_H
00024 #define OIS_Win32InputManager_H
00025 
00026 #include "OISInputManager.h"
00027 #include "Win32/Win32Prereqs.h"
00028 
00029 namespace OIS
00030 {
00034         class Win32InputManager : public InputManager
00035         {
00036         public:
00037                 Win32InputManager();
00038                 virtual ~Win32InputManager();
00039 
00041                 virtual const std::string& inputSystemName() { return iName; }
00042                 
00044                 virtual int numJoysticks();
00046                 virtual int numMice();
00048                 virtual int numKeyBoards();
00049                 
00051                 Object* createInputObject( Type iType, bool bufferMode );
00053                 void destroyInputObject( Object* obj );
00054 
00056                 HWND getWindowHandle() { return hWnd; }
00057 
00059                 void _initialize( ParamList &paramList );
00060 
00061         protected:
00063                 void _parseConfigSettings( ParamList &paramList );
00065                 void _enumerateDevices();
00066                 static BOOL CALLBACK _DIEnumKbdCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
00067 
00068                 JoyStickInfoList unusedJoyStickList;
00069 
00070                 static const std::string iName;
00071                 HWND hWnd;
00072 
00073                 //Direct Input Interface
00074                 IDirectInput8* mDirectInput;
00075 
00076                 //Used for setting device properties - as read in from paramlist
00077                 DWORD kbSettings;
00078                 DWORD mouseSettings;
00079                 DWORD joySettings;
00080 
00081                 char joySticks;
00082         };
00083 }
00084 #endif

Generated on Sat Dec 1 20:13:51 2007 for OIS by  doxygen 1.5.4