1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
Tom Lint 3a960b5829 Updated comments
Added some new Type infos
Removed excess whitespace
Added some new files
Implemented missing methods
2013-08-13 20:04:25 +02:00

56 lines
1.2 KiB
C++

/*****************************************************************************
* Keyboard.h *
* *
* XFX::Input::Keyboard class definition file *
* Copyright (c) XFX Team. All Rights Reserved *
*****************************************************************************/
#ifndef _XFX_INPUT_KEYBOARD_
#define _XFX_INPUT_KEYBOARD_
#include "Enums.h"
namespace XFX
{
namespace Input
{
/**
* Represents a state of keystrokes recorded by a keyboard input device.
*/
struct KeyboardState
{
KeyboardState();
KeyboardState(Keys_t keys[]);
KeyboardState(const KeyboardState &obj);
Keys_t* GetPressedKeys();
bool IsKeyDown(Keys_t key);
bool IsKeyUp(Keys_t key);
/**
* Returns the state of a particular key.
*
* @param key
* Enumerated value representing the key to query.
*/
const KeyState_t operator[](const Keys_t key) const;
private:
Keys_t* pressedKeys;
};
/**
* Allows retrieval of keystrokes from a keyboard input device.
*/
class Keyboard
{
private:
Keyboard(); //Private constructor to prevent instantiation.
public:
static KeyboardState GetState();
};
}
}
#endif //_XFX_INPUT_KEYBOARD_