duncan
Mom and Dad were wrong!
Public Member Functions | Public Attributes | Static Public Attributes
client::Input Class Reference

#include <input.h>

List of all members.

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")

Detailed Description

Get input (key presses and releases) from X, and notify an InputListener object when such events occur.

Author:
Harry Slatyer

see LICENSE


Constructor & Destructor Documentation

Input::Input ( std::tr1::shared_ptr< InputListener l = std::tr1::shared_ptr<InputListener>())

Set the listener, open the X display and grab the keyboard.

Parameters:
lpointer to listener object
Exceptions:
std::runtime_errorif initialisation fails
Input::~Input ( )

Ungrab the keyboard and close the X display.


Member Function Documentation

void Input::set_listener ( std::tr1::shared_ptr< InputListener l)

Set the listener.

Parameters:
lpointer to the listener object
void Input::update ( )

Handle any key press/release events.


Member Data Documentation

unsigned int Input::kLeft = XStringToKeysym("Left") [static]

X keysyms for common special keys


The documentation for this class was generated from the following files:
All Classes Namespaces Functions Variables Typedefs Enumerations