CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csKeyboardDriver Class Reference

Generic Keyboard Driver. More...

#include <csinput.h>

Inheritance diagram for csKeyboardDriver:

csInputDriver iKeyboardDriver iBase List of all members.

Public Methods

 csKeyboardDriver (iObjectRegistry *)
 Initialize keyboard interface. More...

virtual ~csKeyboardDriver ()
 Destructor. More...

virtual void Reset ()
 Call to release all key down flags. More...

virtual void DoKey (int iKey, int iChar, bool iDown)
 Call this routine to add a key down/up event to queue. More...

virtual bool GetKeyState (int iKey)
 Query the state of a key. More...

virtual void LostFocus ()
 Application lost focus. More...


Public Attributes

csKeyboardDriver::eiEventHandler scfiEventHandler
 iEventHandler implementation. More...


Protected Methods

virtual void SetKeyState (int iKey, bool iDown)
 Set key state. More...


Protected Attributes

csBitSet KeyState
 Key state array. More...


Detailed Description

Generic Keyboard Driver.

Keyboard driver should generate events and put them into an event queue. Also it tracks the current state of all keys.

Definition at line 64 of file csutil/csinput.h.


Constructor & Destructor Documentation

csKeyboardDriver::csKeyboardDriver iObjectRegistry  
 

Initialize keyboard interface.

virtual csKeyboardDriver::~csKeyboardDriver   [virtual]
 

Destructor.


Member Function Documentation

virtual void csKeyboardDriver::DoKey int    iKey,
int    iChar,
bool    iDown
[virtual]
 

Call this routine to add a key down/up event to queue.

Implements iKeyboardDriver.

virtual bool csKeyboardDriver::GetKeyState int    iKey [virtual]
 

Query the state of a key.

All key codes in range 0..255, CSKEY_FIRST..CSKEY_LAST are supported. Returns true if the key is pressed, false if not.

Implements iKeyboardDriver.

virtual void csKeyboardDriver::LostFocus   [inline, virtual]
 

Application lost focus.

Implements csInputDriver.

Definition at line 98 of file csutil/csinput.h.

References Reset.

virtual void csKeyboardDriver::Reset   [virtual]
 

Call to release all key down flags.

Implements iKeyboardDriver.

Referenced by LostFocus.

virtual void csKeyboardDriver::SetKeyState int    iKey,
bool    iDown
[protected, virtual]
 

Set key state.

For example SetKey (CSKEY_UP, true). Called automatically by do_press and do_release.


Member Data Documentation

csBitSet csKeyboardDriver::KeyState [protected]
 

Key state array.

Definition at line 68 of file csutil/csinput.h.

csKeyboardDriver::eiEventHandler csKeyboardDriver::scfiEventHandler
 

iEventHandler implementation.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14