Danbias/Code/Misc/Input/Include/InputManager.h

61 lines
1.8 KiB
C
Raw Normal View History

2014-02-14 15:50:00 +01:00
/////////////////////////////////////////////////////////////////////
// Created by [Dennis Andersen] [2013]
/////////////////////////////////////////////////////////////////////
#ifndef RAW_INPUT_H
#define RAW_INPUT_H
#include "PreReq.h"
#include "Common.h"
#include "InputObject.h"
#include "Mouse.h"
#include "Keyboard.h"
namespace Input
{
class InputManager
{
public:
/**
* @return Returns an instance of the default input manager.
*/
static InputManager* Instance ();
2014-02-14 15:50:00 +01:00
/**
* @return Returns a new input manager. Should be destroyd with DestroyInputManager function.
*/
static InputManager* CreateInputManager ();
2014-02-14 15:50:00 +01:00
/**
* @return Destroys a input manager.
*/
static void DestroyInputManager (InputManager* inputSystem);
/**
* Creates a device
* @param inputType Which type of device to register
* @param targetApplication The target proccess that will proc input.
* @see InputDescription
* @return Returns a handle to a device that can be rethrown to a specific device.
*/
virtual InputObject* CreateDevice ( const Enum::SAIType inputType, Typedefs::WindowHandle targetApplication = 0 ) = 0;
virtual Keyboard* CreateKeyboardDevice ( Typedefs::WindowHandle targetApplication = 0 ) { return (Keyboard*)CreateDevice(Enum::SAIType_Keyboard, targetApplication); }
virtual Mouse* CreateMouseDevice ( Typedefs::WindowHandle targetApplication = 0 ) { return (Mouse*)CreateDevice(Enum::SAIType_Mouse, targetApplication); }
2014-02-14 15:50:00 +01:00
/** Enables or Disables the Input proccessing.
* @param The toggler.
*/
virtual void ToggleInputSystem (bool enable) = 0;
protected:
InputManager();
InputManager(const InputManager&) {}
const InputManager& operator=(const InputManager&) {return *this;}
virtual~InputManager();
virtual void Destroy() = 0;
};
}
#endif