#include <allegroinput.hpp>
Inheritance diagram for gcn::AllegroInput:
Definition at line 73 of file allegroinput.hpp.
Public Member Functions | |
AllegroInput () | |
Constructor. | |
virtual | ~AllegroInput () |
Destructor. | |
virtual bool | isKeyQueueEmpty () |
Checks whether the key queue is empty or not. | |
virtual KeyInput | dequeueKeyInput () |
Dequeues the key input queue. | |
virtual bool | isMouseQueueEmpty () |
Checks whether the mouse queue is empyt or not. | |
virtual MouseInput | dequeueMouseInput () |
Dequeues the mouse input queue. | |
virtual void | _pollInput () |
Polls all exsisting input. | |
Protected Member Functions | |
virtual void | pollMouseInput () |
Handles the mouse input called by _pollInput. | |
virtual void | pollKeyInput () |
Handles the key input called by _pollInput. | |
virtual Key | convertToKey (int scancode, int unicode) |
Converts scancode and unicode to Key object. | |
Protected Attributes | |
std::map< int, Key > | mPressedKeys |
std::queue< KeyInput > | mKeyQueue |
std::queue< MouseInput > | mMouseQueue |
bool | mMouseButton1 |
bool | mMouseButton2 |
bool | mMouseButton3 |
int | mLastMouseX |
int | mLastMouseY |
int | mLastMouseZ |
void gcn::AllegroInput::_pollInput | ( | ) | [virtual] |
Polls all exsisting input.
It exists for Input implementation compatibility. It is used internally by the library.
Implements gcn::Input.
Definition at line 113 of file allegroinput.cpp.
References pollKeyInput(), and pollMouseInput().
KeyInput gcn::AllegroInput::dequeueKeyInput | ( | ) | [virtual] |
Dequeues the key input queue.
Implements gcn::Input.
Definition at line 82 of file allegroinput.cpp.
References isKeyQueueEmpty(), and mKeyQueue.
MouseInput gcn::AllegroInput::dequeueMouseInput | ( | ) | [virtual] |
Dequeues the mouse input queue.
Implements gcn::Input.
Definition at line 100 of file allegroinput.cpp.
References isMouseQueueEmpty(), and mMouseQueue.
bool gcn::AllegroInput::isKeyQueueEmpty | ( | ) | [virtual] |
Checks whether the key queue is empty or not.
Implements gcn::Input.
Definition at line 77 of file allegroinput.cpp.
References mKeyQueue.
Referenced by dequeueKeyInput().
bool gcn::AllegroInput::isMouseQueueEmpty | ( | ) | [virtual] |
Checks whether the mouse queue is empyt or not.
Implements gcn::Input.
Definition at line 95 of file allegroinput.cpp.
References mMouseQueue.
Referenced by dequeueMouseInput().