Keyboard event object. More...
#include <Keyboard.hpp>
Public Types | |
enum | Sub { Down = Type * 0x10000000 + 1, Repeat = Type * 0x10000000 + 2, Up = Type * 0x10000000 + 3 } |
Event subtypes. More... | |
Public Member Functions | |
unsigned int | SubType () const |
Returns the subtype ID of the event. | |
Event (const Event_Source *source_, Sub subtype_, ALLEGRO_DISPLAY *display_, Keyboard::Key::KeyCode keycode_, Keyboard::Modifier::KeyMod modifier_, unsigned int unichar_) | |
Creates a Keyboard event. | |
unsigned int | Type () const |
Returns the Type ID of the event Returns 0 (User_Type) for all user events. | |
operator ALLEGRO_EVENT * () const | |
Returns a pointer to the Allegro event. | |
Public Attributes | |
ALLEGRO_DISPLAY * | display |
Display the keyboard is using. | |
Keyboard::Key::KeyCode | keycode |
Key code. | |
Keyboard::Modifier::KeyMod | modifier |
Modifier key. | |
unsigned int | unichar |
Character representation (mapped). | |
ALLEGRO_EVENT * | raw |
const Event_Source * | source |
Pointer to the Event_Source that emitted the event. | |
Static Public Attributes | |
static const unsigned int | Type = 0x00000003 |
static const unsigned int | User_Type = 0x00000000 |
Keyboard event object.
Event subtypes.
a5::Keyboard::Event::Event | ( | const Event_Source * | source_, | |
Sub | subtype_, | |||
ALLEGRO_DISPLAY * | display_, | |||
Keyboard::Key::KeyCode | keycode_, | |||
Keyboard::Modifier::KeyMod | modifier_, | |||
unsigned int | unichar_ | |||
) |
Creates a Keyboard event.
unsigned int a5::Keyboard::Event::SubType | ( | ) | const [virtual] |
Returns the subtype ID of the event.
Reimplemented from a5::Event.
unsigned int a5::Event::Type | ( | ) | const [inherited] |
Returns the Type ID of the event Returns 0 (User_Type) for all user events.
a5::Event::operator ALLEGRO_EVENT * | ( | ) | const [inherited] |
Returns a pointer to the Allegro event.
ALLEGRO_DISPLAY* a5::Keyboard::Event::display |
Display the keyboard is using.
Keyboard::Key::KeyCode a5::Keyboard::Event::keycode |
Key code.
Keyboard::Modifier::KeyMod a5::Keyboard::Event::modifier |
Modifier key.
unsigned int a5::Keyboard::Event::unichar |
Character representation (mapped).
const Event_Source* a5::Event::source [inherited] |
Pointer to the Event_Source that emitted the event.