OSDL::Events Namespace Reference

Deals with all events of interest for a multimedia engine. More...

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  EventsException
 Mother class for all event-related exceptions. 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 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 union SDL_Event BasicEvent
 Encapsulated basic event, encapsulates all basic events.
typedef struct SDL_ActiveEvent FocusEvent
 Application losed or gained visibility.
typedef struct SDL_KeyboardEvent KeyboardEvent
 Key pressed or released.
typedef struct SDL_MouseMotionEvent MouseMotionEvent
 Mouse moved.
typedef struct SDL_MouseButtonEvent MouseButtonEvent
 Mouse button pressed or released.
typedef struct SDL_JoyAxisEvent JoystickAxisEvent
 Joystick axis moved.
typedef struct SDL_JoyBallEvent JoystickTrackballEvent
 Joystick trackball moved.
typedef struct SDL_JoyHatEvent JoystickHatEvent
 Joystick hat position changed.
typedef struct SDL_JoyButtonEvent JoystickButtonEvent
 Joystick button pressed or released.
typedef struct SDL_QuitEvent UserRequestedQuitEvent
 Quit is requested.
typedef struct SDL_SysWMEvent SystemSpecificWindowManagerEvent
 A system specific window manager event has been received.
typedef struct SDL_ResizeEvent WindowResizedEvent
 Window resized, application is responsible for setting a new video mode with the new width and height.
typedef struct SDL_ExposeEvent ScreenExposedEvent
 Screen has to be redrawn.
typedef struct SDL_UserEvent UserEvent
 User-defined event.
typedef ::SDL_Joystick LowLevelJoystick
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 = 0x00
 State of a joystick hat.
const HatPosition Up = 0x01
 State of a joystick hat.
const HatPosition Right = 0x02
 State of a joystick hat.
const HatPosition Down = 0x04
 State of a joystick hat.
const HatPosition Left = 0x08
 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 = 0
 Identifies the default mouse (the first one).
OSDL_DLL const MouseButtonNumber LeftButton = 1
 Identifies the left button of a mouse.
OSDL_DLL const MouseButtonNumber MiddleButton = 2
 Identifies the middle button of a mouse.
OSDL_DLL const MouseButtonNumber RightButton = 3
 Identifies the right button of a mouse.
OSDL_DLL const MouseButtonNumber WheelUp = 4
 Identifies the virtual button of a mouse corresponding to its wheel being up.
OSDL_DLL const MouseButtonNumber WheelDown = 5
 Identifies the virtual button of a mouse corresponding to its wheel being down.

Detailed Description

Deals with all events of interest for a multimedia engine.


Typedef Documentation

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

Axis position, which ranges from -32768 to 32767.

Definition at line 77 of file OSDLJoystickCommon.h.

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

Relative trackball motion.

Definition at line 131 of file OSDLJoystickCommon.h.

typedef union SDL_Event OSDL::Events::BasicEvent

Encapsulated basic event, encapsulates all basic events.

Definition at line 66 of file OSDLEventsCommon.h.

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

Definition at line 160 of file OSDLEvents.h.

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 102 of file OSDLEvents.h.

typedef struct SDL_ActiveEvent OSDL::Events::FocusEvent

Application losed or gained visibility.

Definition at line 70 of file OSDLEventsCommon.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 86 of file OSDLJoystickCommon.h.

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 138 of file OSDLEvents.h.

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

Number of joystick axis.

Definition at line 57 of file OSDLJoystickCommon.h.

typedef struct SDL_JoyAxisEvent OSDL::Events::JoystickAxisEvent

Joystick axis moved.

Definition at line 86 of file OSDLEventsCommon.h.

typedef struct SDL_JoyButtonEvent OSDL::Events::JoystickButtonEvent

Joystick button pressed or released.

Definition at line 98 of file OSDLEventsCommon.h.

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

Number of joystick buttons.

Definition at line 69 of file OSDLJoystickCommon.h.

typedef struct SDL_JoyHatEvent OSDL::Events::JoystickHatEvent

Joystick hat position changed.

Definition at line 94 of file OSDLEventsCommon.h.

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

Number of joystick hats.

Definition at line 65 of file OSDLJoystickCommon.h.

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

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

Definition at line 53 of file OSDLJoystickCommon.h.

typedef struct SDL_JoyBallEvent OSDL::Events::JoystickTrackballEvent

Joystick trackball moved.

Definition at line 90 of file OSDLEventsCommon.h.

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

Number of joystick trackballs.

Definition at line 61 of file OSDLJoystickCommon.h.

typedef struct SDL_KeyboardEvent OSDL::Events::KeyboardEvent

Key pressed or released.

Definition at line 74 of file OSDLEventsCommon.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 92 of file OSDLKeyboardHandler.h.

typedef ::SDL_Joystick OSDL::Events::LowLevelJoystick

Definition at line 65 of file OSDLJoystick.h.

typedef struct SDL_MouseButtonEvent OSDL::Events::MouseButtonEvent

Mouse button pressed or released.

Definition at line 82 of file OSDLEventsCommon.h.

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

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

Definition at line 75 of file OSDLMouseCommon.h.

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

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

Definition at line 62 of file OSDLMouseCommon.h.

typedef struct SDL_MouseMotionEvent OSDL::Events::MouseMotionEvent

Mouse moved.

Definition at line 78 of file OSDLEventsCommon.h.

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

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

Definition at line 53 of file OSDLMouseCommon.h.

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

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

Definition at line 66 of file OSDLMouseCommon.h.

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 150 of file OSDLEvents.h.

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 126 of file OSDLEvents.h.

typedef struct SDL_ExposeEvent OSDL::Events::ScreenExposedEvent

Screen has to be redrawn.

Definition at line 120 of file OSDLEventsCommon.h.

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 114 of file OSDLEvents.h.

typedef struct SDL_SysWMEvent OSDL::Events::SystemSpecificWindowManagerEvent

A system specific window manager event has been received.

Definition at line 106 of file OSDLEventsCommon.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 81 of file OSDLEvents.h.

typedef struct SDL_UserEvent OSDL::Events::UserEvent

User-defined event.

Definition at line 125 of file OSDLEventsCommon.h.

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

Definition at line 170 of file OSDLEvents.h.

typedef struct SDL_QuitEvent OSDL::Events::UserRequestedQuitEvent

Quit is requested.

Definition at line 102 of file OSDLEventsCommon.h.

typedef struct SDL_ResizeEvent OSDL::Events::WindowResizedEvent

Window resized, application is responsible for setting a new video mode with the new width and height.

Definition at line 115 of file OSDLEventsCommon.h.


Enumeration Type Documentation

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

  • 'rawInput' uses basically scancodes to track only keys being hit or released, as if the keyboard was a big game pad with numerous buttons
  • 'textInput' is used for text input with unicode support, scan codes are converted according to keyboard layout so that actual characters are returned.
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 131 of file OSDLKeyboardHandler.h.


Variable Documentation

State of a joystick hat.

Definition at line 68 of file OSDLJoystickCommon.cc.

State of a joystick hat.

Definition at line 71 of file OSDLJoystickCommon.cc.

State of a joystick hat.

Definition at line 72 of file OSDLJoystickCommon.cc.

Identifies the left button of a mouse.

Definition at line 61 of file OSDLMouseCommon.cc.

Initial value:

State of a joystick hat.

Definition at line 83 of file OSDLJoystickCommon.cc.

Initial value:

State of a joystick hat.

Definition at line 80 of file OSDLJoystickCommon.cc.

Identifies the middle button of a mouse.

Definition at line 62 of file OSDLMouseCommon.cc.

State of a joystick hat.

Definition at line 70 of file OSDLJoystickCommon.cc.

Identifies the right button of a mouse.

Definition at line 63 of file OSDLMouseCommon.cc.

Initial value:

State of a joystick hat.

Definition at line 77 of file OSDLJoystickCommon.cc.

Initial value:

State of a joystick hat.

Definition at line 74 of file OSDLJoystickCommon.cc.

State of a joystick hat.

Definition at line 69 of file OSDLJoystickCommon.cc.

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

Definition at line 66 of file OSDLMouseCommon.cc.

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

Definition at line 65 of file OSDLMouseCommon.cc.

Generated on Mon Nov 29 14:05:46 2010 for OSDL by  doxygen 1.6.3