|
duncan
Mom and Dad were wrong!
|
#include <input.h>
Public Member Functions | |
| Input (std::tr1::shared_ptr< InputListener > l=std::tr1::shared_ptr< InputListener >()) | |
| ~Input () | |
| void | set_listener (std::tr1::shared_ptr< InputListener >) |
| void | update () |
Public Attributes | |
| static unsigned int | kRight = XStringToKeysym("Right") |
| static unsigned int | kUp = XStringToKeysym("Up") |
| static unsigned int | kDown = XStringToKeysym("Down") |
| static unsigned int | kEnter = XStringToKeysym("Return") |
| static unsigned int | kSpace = XStringToKeysym("space") |
| static unsigned int | kBackspace = XStringToKeysym("BackSpace") |
| static unsigned int | kCaps = XStringToKeysym("Caps_Lock") |
| static unsigned int | kLShift = XStringToKeysym("Shift_L") |
| static unsigned int | kRShift = XStringToKeysym("Shift_R") |
| static unsigned int | kEscape = XStringToKeysym("Escape") |
| static unsigned int | kF1 = XStringToKeysym("F1") |
Static Public Attributes | |
| static unsigned int | kLeft = XStringToKeysym("Left") |
Get input (key presses and releases) from X, and notify an InputListener object when such events occur.
see LICENSE
| Input::Input | ( | std::tr1::shared_ptr< InputListener > | l = std::tr1::shared_ptr<InputListener>() | ) |
Set the listener, open the X display and grab the keyboard.
| l | pointer to listener object |
| std::runtime_error | if initialisation fails |
| Input::~Input | ( | ) |
Ungrab the keyboard and close the X display.
| void Input::set_listener | ( | std::tr1::shared_ptr< InputListener > | l | ) |
Set the listener.
| l | pointer to the listener object |
| void Input::update | ( | ) |
Handle any key press/release events.
unsigned int Input::kLeft = XStringToKeysym("Left") [static] |
X keysyms for common special keys
1.7.4