00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef NL_INPUT_DEVICE_MANAGER_H
00027 #define NL_INPUT_DEVICE_MANAGER_H
00028
00029 #include "nel/misc/types_nl.h"
00030 #include "nel/misc/game_device.h"
00031
00032
00033 namespace NLMISC
00034 {
00035
00036
00037 struct IMouseDevice;
00038 struct IKeyboardDevice;
00039
00040
00041
00042 struct EInputDevice : public Exception
00043 {
00044 EInputDevice(const char *reason) : Exception(reason) {}
00045 };
00046
00047
00052 struct IInputDeviceManager
00053 {
00055 virtual IMouseDevice *getMouseDevice() throw(EInputDevice) = 0;
00057 virtual void releaseMouse() = 0;
00059 virtual IKeyboardDevice *getKeyboardDevice() throw(EInputDevice) = 0;
00061 virtual void releaseKeyboard() = 0;
00062
00063 virtual void enumerateGameDevice(TDeviceDescVect &descs) throw(EInputDevice) = 0;
00064
00065 virtual IGameDevice *createGameDevice(const std::string &instanceName) throw(EInputDevice) = 0;
00066
00067 virtual void releaseGameDevice(IGameDevice *gd) = 0;
00068 };
00069
00070
00071 }
00072
00073
00074 #endif // NL_INPUT_DEVICE_MANAGER_H
00075
00076