OSDL::Events Namespace Reference


Detailed Description

Deals with all events of interest for a multimedia engine.


Classes

class  ClassicalJoystick
 Models a classical joystick, with simplified access to the two main axes, commonly used to indicate the joystick current direction, with customizable deadzone support and two buttons directly managed. More...
class  EventsModule
 Handles the asynchronous event-based interaction model, general input handling, and basic time management, including the logic and rendering frequencies. More...
class  InputDevice
 Models an actual OSDL input device, instead of an abstract Ceylan input device. More...
class  InputDeviceHandlerException
 Mother class for all keyboard exceptions. More...
class  InputDeviceHandler
 Handler for all kinds of input devices. More...
class  Joystick
 Models a basic joystick, including relevant axes, hats, balls and buttons. More...
class  JoystickException
 Mother class for all joystick exceptions. More...
class  JoystickHandler
 Handler for all detected joysticks. More...
class  KeyboardException
 Mother class for all keyboard exceptions. More...
class  KeyboardHandler
 Handler for keyboard. More...
class  Mouse
 Models a basic mouse, including relevant buttons and wheels. More...
class  MouseException
 Mother class for all mouse exceptions. More...
class  MouseHandler
 Handler for mice connected to the system, if any. More...

Typedefs

typedef Ceylan::Uint32 Tick
 A tick is the most precise time unit that can be measured by the system.
typedef Tick EngineTick
 Engine tick is the most fine unit of time managed by the scheduler.
typedef Tick SimulationTick
 Simulation tick is the most fine unit of time between two simulation steps.
typedef Tick RenderingTick
 Rendering tick is the most fine unit of time between two rendering steps.
typedef Tick InputTick
 Rendering ticks is the most fine unit of time between two input pollings.
typedef Ceylan::Uint32 Hertz
 Unit for frequencies (Hz).
typedef EngineTick Period
 Allows to count how many engine ticks should be waited by the scheduler until a new periodic event is triggered.
typedef Ceylan::Uint8 BasicEventType
typedef Ceylan::Uint8 UserEventType
typedef SDL_Joystick RawJoystick
 Low level joystick object.
typedef Ceylan::Uint32 JoystickNumber
 Number (index) of a joystick, or joystick count.
typedef Ceylan::Uint32 JoystickAxesCount
 Number of joystick axis.
typedef Ceylan::Uint32 JoystickTrackballsCount
 Number of joystick trackballs.
typedef Ceylan::Uint32 JoystickHatsCount
 Number of joystick hats.
typedef Ceylan::Uint32 JoystickButtonsCount
 Number of joystick buttons.
typedef Ceylan::Sint16 AxisPosition
 Axis position, which ranges from -32768 to 32767.
typedef Ceylan::Uint8 HatPosition
 Position of a hat, can be combined (OR'd) to make the eight possible directions.
typedef Ceylan::Sint32 BallMotion
 Relative trackball motion.
typedef void(*) KeyboardEventHandler (const KeyboardEvent &keyboardEvent)
 Pointer to functions managing specific keyboard events, i.e.
typedef Ceylan::Uint8 MouseNumber
 Number (index) of a mouse, or mice count.
typedef Ceylan::Uint8 MouseButtonNumber
 Number (index) of a mouse button, or buttons count.
typedef Ceylan::Uint8 MouseWheelNumber
 Number (index) of a mouse wheel, or wheels count.
typedef Ceylan::Uint8 MouseButtonMask
 Button mask, each bit tells whether the associated button is pressed.

Enumerations

enum  KeyboardMode { rawInput, textInput }
 Describes what is the current mode used to handle key presses and key releases. More...

Variables

const HatPosition Centered
 State of a joystick hat.
const HatPosition Up
 State of a joystick hat.
const HatPosition Right
 State of a joystick hat.
const HatPosition Down
 State of a joystick hat.
const HatPosition Left
 State of a joystick hat.
const HatPosition RightUp
 State of a joystick hat.
const HatPosition RightDown
 State of a joystick hat.
const HatPosition LeftUp
 State of a joystick hat.
const HatPosition LeftDown
 State of a joystick hat.
OSDL_DLL const MouseNumber DefaultMouse
 Identifies the default mouse (the first one).
OSDL_DLL const MouseButtonNumber LeftButton
 Identifies the left button of a mouse.
OSDL_DLL const MouseButtonNumber MiddleButton
 Identifies the middle button of a mouse.
OSDL_DLL const MouseButtonNumber RightButton
 Identifies the right button of a mouse.
OSDL_DLL const MouseButtonNumber WheelUp
 Identifies the virtual button of a mouse corresponding to its wheel being up.
OSDL_DLL const MouseButtonNumber WheelDown
 Identifies the virtual button of a mouse corresponding to its wheel being down.


Typedef Documentation

typedef Ceylan::Sint16 OSDL::Events::AxisPosition

Axis position, which ranges from -32768 to 32767.

Definition at line 45 of file OSDLJoystickCommon.h.

typedef Ceylan::Sint32 OSDL::Events::BallMotion

Relative trackball motion.

Definition at line 88 of file OSDLJoystickCommon.h.

typedef Ceylan::Uint8 OSDL::Events::BasicEventType

Definition at line 134 of file OSDLEvents.h.

typedef Tick OSDL::Events::EngineTick

Engine tick is the most fine unit of time managed by the scheduler.

Note:
Their duration is typically one or more microseconds.

Definition at line 69 of file OSDLEvents.h.

typedef Ceylan::Uint8 OSDL::Events::HatPosition

Position of a hat, can be combined (OR'd) to make the eight possible directions.

Definition at line 53 of file OSDLJoystickCommon.h.

typedef Ceylan::Uint32 OSDL::Events::Hertz

Unit for frequencies (Hz).

For example, a periodical event whose frequency is 100 Hz would happen once on each period P = 1/100 s = 10 ms.

Note:
For our needs, it is an integer type.

Definition at line 114 of file OSDLEvents.h.

typedef Tick OSDL::Events::InputTick

Rendering ticks is the most fine unit of time between two input pollings.

Note:
Their duration is an integer multiple of the duration of the engine ticks.

Definition at line 102 of file OSDLEvents.h.

typedef Ceylan::Uint32 OSDL::Events::JoystickAxesCount

Number of joystick axis.

Definition at line 28 of file OSDLJoystickCommon.h.

typedef Ceylan::Uint32 OSDL::Events::JoystickButtonsCount

Number of joystick buttons.

Definition at line 37 of file OSDLJoystickCommon.h.

typedef Ceylan::Uint32 OSDL::Events::JoystickHatsCount

Number of joystick hats.

Definition at line 34 of file OSDLJoystickCommon.h.

typedef Ceylan::Uint32 OSDL::Events::JoystickNumber

Number (index) of a joystick, or joystick count.

Definition at line 24 of file OSDLJoystickCommon.h.

typedef Ceylan::Uint32 OSDL::Events::JoystickTrackballsCount

Number of joystick trackballs.

Definition at line 31 of file OSDLJoystickCommon.h.

typedef void(* ) OSDL::Events::KeyboardEventHandler(const KeyboardEvent &keyboardEvent)

Pointer to functions managing specific keyboard events, i.e.

a specific set of keys that may be pressed or released.

See also:
for instance doNothingKeyHandler and smarterKeyHandler in OSDLKeyboardHandler.cc.
Note:
The compiler refuses to force exception specification in typedef thanks to a 'throw()' : "error: OSDL::Events::KeyboardEventHandler declared with an exception specification."

Definition at line 51 of file OSDLKeyboardHandler.h.

typedef Ceylan::Uint8 OSDL::Events::MouseButtonMask

Button mask, each bit tells whether the associated button is pressed.

Definition at line 42 of file OSDLMouseCommon.h.

typedef Ceylan::Uint8 OSDL::Events::MouseButtonNumber

Number (index) of a mouse button, or buttons count.

Definition at line 31 of file OSDLMouseCommon.h.

typedef Ceylan::Uint8 OSDL::Events::MouseNumber

Number (index) of a mouse, or mice count.

Definition at line 24 of file OSDLMouseCommon.h.

typedef Ceylan::Uint8 OSDL::Events::MouseWheelNumber

Number (index) of a mouse wheel, or wheels count.

Definition at line 34 of file OSDLMouseCommon.h.

typedef EngineTick OSDL::Events::Period

Allows to count how many engine ticks should be waited by the scheduler until a new periodic event is triggered.

Period is a specialization of engine ticks in the case of periodic events.

Definition at line 125 of file OSDLEvents.h.

typedef SDL_Joystick OSDL::Events::RawJoystick

Low level joystick object.

Definition at line 25 of file OSDLJoystick.h.

typedef Tick OSDL::Events::RenderingTick

Rendering tick is the most fine unit of time between two rendering steps.

Note:
Their duration is an integer multiple of the duration of the engine ticks.

Definition at line 91 of file OSDLEvents.h.

typedef Tick OSDL::Events::SimulationTick

Simulation tick is the most fine unit of time between two simulation steps.

Note:
Their duration is an integer multiple of the duration of the engine ticks.

Definition at line 80 of file OSDLEvents.h.

typedef Ceylan::Uint32 OSDL::Events::Tick

A tick is the most precise time unit that can be measured by the system.

Note:
Ticks are usually one millisecond long.

Definition at line 49 of file OSDLEvents.h.

typedef Ceylan::Uint8 OSDL::Events::UserEventType

Definition at line 143 of file OSDLEvents.h.


Enumeration Type Documentation

enum OSDL::Events::KeyboardMode

Describes what is the current mode used to handle key presses and key releases.

Note:
None of these modes can be totally satisfactory, since many keyboard layouts exist and any locale can be mapped onto it. The most reliable solution is doing like commercial games, which uses a settings screen allowing the user to specify key-action associations.

Keyboard starts in raw input mode.

Enumerator:
rawInput 
textInput 

Definition at line 88 of file OSDLKeyboardHandler.h.


Variable Documentation

const HatPosition OSDL::Events::Centered

State of a joystick hat.

Definition at line 13 of file OSDLJoystickCommon.cc.

const MouseNumber OSDL::Events::DefaultMouse

Identifies the default mouse (the first one).

Definition at line 12 of file OSDLMouseCommon.cc.

Referenced by OSDL::Events::MouseHandler::focusGained(), OSDL::Events::Mouse::focusGained(), OSDL::Events::MouseHandler::focusLost(), OSDL::Events::Mouse::focusLost(), OSDL::Events::MouseHandler::linkToController(), and OSDL::Events::Mouse::mouseMoved().

const HatPosition OSDL::Events::Down

State of a joystick hat.

Definition at line 16 of file OSDLJoystickCommon.cc.

const HatPosition OSDL::Events::Left

State of a joystick hat.

Definition at line 17 of file OSDLJoystickCommon.cc.

const MouseButtonNumber OSDL::Events::LeftButton

Identifies the left button of a mouse.

Definition at line 17 of file OSDLMouseCommon.cc.

const HatPosition OSDL::Events::LeftDown

State of a joystick hat.

Definition at line 21 of file OSDLJoystickCommon.cc.

const HatPosition OSDL::Events::LeftUp

State of a joystick hat.

Definition at line 20 of file OSDLJoystickCommon.cc.

const MouseButtonNumber OSDL::Events::MiddleButton

Identifies the middle button of a mouse.

Definition at line 18 of file OSDLMouseCommon.cc.

const HatPosition OSDL::Events::Right

State of a joystick hat.

Definition at line 15 of file OSDLJoystickCommon.cc.

const MouseButtonNumber OSDL::Events::RightButton

Identifies the right button of a mouse.

Definition at line 19 of file OSDLMouseCommon.cc.

const HatPosition OSDL::Events::RightDown

State of a joystick hat.

Definition at line 19 of file OSDLJoystickCommon.cc.

const HatPosition OSDL::Events::RightUp

State of a joystick hat.

Definition at line 18 of file OSDLJoystickCommon.cc.

const HatPosition OSDL::Events::Up

State of a joystick hat.

Definition at line 14 of file OSDLJoystickCommon.cc.

const MouseButtonNumber OSDL::Events::WheelDown

Identifies the virtual button of a mouse corresponding to its wheel being down.

Definition at line 22 of file OSDLMouseCommon.cc.

const MouseButtonNumber OSDL::Events::WheelUp

Identifies the virtual button of a mouse corresponding to its wheel being up.

Definition at line 21 of file OSDLMouseCommon.cc.


Generated on Fri Mar 30 14:47:26 2007 for OSDL by  doxygen 1.5.1