52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
/* -----------------------------------------------------------------------------
|
|
GSFramework
|
|
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
|
----------------------------------------------------------------------------- */
|
|
|
|
|
|
#ifndef __INPUT_SYSTEM__
|
|
#define __INPUT_SYSTEM__
|
|
|
|
|
|
#include "input/input_device.h"
|
|
#include "nstring/nstring.h"
|
|
#include "container/nlist.h"
|
|
|
|
|
|
namespace GS {
|
|
namespace Input {
|
|
|
|
/*
|
|
@short Input system.
|
|
@author Emmanuel Julien (ejulien@nworks.fr)
|
|
*/
|
|
struct System
|
|
{
|
|
/// Return true if the input system is active.
|
|
virtual bool IsActive() { return true; }
|
|
|
|
virtual void Update() = 0;
|
|
|
|
/// Return the current display handle.
|
|
virtual void *GetHandle() const { return 0; }
|
|
/// Set display handle.
|
|
virtual void SetHandle(void *) {}
|
|
|
|
/// Return a list of devices available on this system.
|
|
virtual bool GetDeviceList(StringList &, Device::Type = Device::Type_Any) const { return true; }
|
|
/// Return a list of guid devices available on this system.
|
|
virtual bool GetDeviceGuidList(StringList &, Device::Type = Device::Type_Any) const { return true; }
|
|
|
|
/// Get a device from its name.
|
|
virtual Device *GetDevice(const char *name) = 0;
|
|
virtual Device *GetDeviceFromGuid(const char *name) {return NULL;};
|
|
|
|
virtual ~System() {}
|
|
};
|
|
|
|
} // Input
|
|
} // GS
|
|
|
|
|
|
#endif // __INPUT_SYSTEM__
|