MochiEngine
Loading...
Searching...
No Matches
Mochi::Input::IKeyboardProvider Class Referenceabstract

#include <IKeyboardProvider.h>

Inheritance diagram for Mochi::Input::IKeyboardProvider:
Mochi::Input::DummyKeyboardProvider Mochi::Input::SDLKeyboardProvider

Public Member Functions

virtual const bool * GetState () const =0
 Gets an array of boolean values defining if each keyboard key is being pressed this frame or not. Key mapping is responsability of each implementation, but currently should follow the SDL keycode definitions.
virtual size_t GetMaxKeys () const =0
 Gets the maximum amount of keys, which is the size of the GetState array of bools.

Detailed Description

Interface used to get per-frame data of the connected keyboard.

Member Function Documentation

◆ GetMaxKeys()

virtual size_t Mochi::Input::IKeyboardProvider::GetMaxKeys ( ) const
pure virtual

Gets the maximum amount of keys, which is the size of the GetState array of bools.

Returns
The amount of keys the keyboard has.

Implemented in Mochi::Input::DummyKeyboardProvider, and Mochi::Input::SDLKeyboardProvider.

◆ GetState()

virtual const bool * Mochi::Input::IKeyboardProvider::GetState ( ) const
pure virtual

Gets an array of boolean values defining if each keyboard key is being pressed this frame or not. Key mapping is responsability of each implementation, but currently should follow the SDL keycode definitions.

Returns
A pointer to a bool array.

Implemented in Mochi::Input::DummyKeyboardProvider, and Mochi::Input::SDLKeyboardProvider.


The documentation for this class was generated from the following file: