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.
|
|
|
|
*/
|
2014-02-21 11:43:05 +01:00
|
|
|
static InputManager* Instance ();
|
2014-02-14 15:50:00 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Returns a new input manager. Should be destroyd with DestroyInputManager function.
|
|
|
|
*/
|
2014-02-21 11:43:05 +01:00
|
|
|
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.
|
|
|
|
*/
|
2014-02-21 11:43:05 +01:00
|
|
|
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
|
|
|
|
|