• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

src/window/header/InputWindow.h

Go to the documentation of this file.
00001 
00002 NAMESPACE_START
00003 
00004 class InputWindow {
00005 public:
00006         InputWindow();
00007         virtual ~InputWindow();
00008 
00009         void init(void);
00010         void uninit(void);
00011 
00012         bool activateInput(::DEVICE);
00013         void deactivateInput(::DEVICE);
00014         uint getDevices(::DeviceInfo* array, uint size);
00015 	::pDevice activateDevice(::DEVICE type, int ID);
00016         void deactivateDevice(::pDevice device);
00017 
00018         void loop(void);
00019 
00020         void close(void);
00021 
00022 private:
00023         void initMouseMap(void);
00024         void initKeyboardMap(void);
00025 
00026         WNDCLASS wndClass;
00027         HWND inputWnd;
00028         inline void handleRawInput(HRAWINPUT rawID);
00029         inline void rawMouseHandler(const RAWMOUSE& mouse, MouseDevice& mouseInput);
00030         inline void rawKeyboardHandler(const RAWKEYBOARD& key, KeyboardDevice& keyInput);
00031         static LRESULT CALLBACK inputMessageHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
00032 
00033         bool run, ended;
00034 	::Thread inputThread;
00035 	::Static<MouseDevice,8> mouseDevices;
00036 	::Static<KeyboardDevice,8> keyboardDevices;
00037         int initialized;
00038 };
00039 
00040 NAMESPACE_END

Generated on Fri Jun 18 2010 17:48:40 for Cannonball by  doxygen 1.7.0