mirror of
https://github.com/Halofreak1990/XFXFramework
synced 2024-12-26 13:49:34 +01:00
Now, the only thing keeping XFX from a full compile is my stupid attempt at Asynchronous IO. Will look at that, but most likely, I will comment it out and just get a new Demo out before New Year.
48 lines
1.0 KiB
C++
48 lines
1.0 KiB
C++
/********************************************************
|
|
* Keyboard.h *
|
|
* *
|
|
* XFX Keyboard definition file *
|
|
* Copyright © XFX Team. All Rights Reserved *
|
|
********************************************************/
|
|
#ifndef _XFX_INPUT_KEYBOARD_
|
|
#define _XFX_INPUT_KEYBOARD_
|
|
|
|
#include "Enums.h"
|
|
|
|
namespace XFX
|
|
{
|
|
namespace Input
|
|
{
|
|
/// <summary>
|
|
/// Represents a state of keystrokes recorded by a keyboard input device.
|
|
/// </summary>
|
|
struct KeyboardState
|
|
{
|
|
KeyboardState();
|
|
KeyboardState(Keys_t keys[]);
|
|
KeyboardState(const KeyboardState &obj);
|
|
|
|
Keys_t* GetPressedKeys();
|
|
bool IsKeyDown(Keys_t key);
|
|
bool IsKeyUp(Keys_t key);
|
|
|
|
private:
|
|
Keys_t* pressedKeys;
|
|
};
|
|
|
|
/// <summary>
|
|
/// Allows retrieval of keystrokes from a keyboard input device.
|
|
/// </summary>
|
|
class Keyboard
|
|
{
|
|
private:
|
|
Keyboard(); //Private constructor to prevent instantiation.
|
|
|
|
public:
|
|
static KeyboardState GetState();
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif //_XFX_INPUT_KEYBOARD_
|