Event naming and name relations. More...
#include "cssysdef.h"
#include "csextern.h"
#include "csutil/scf_implementation.h"
#include "iutil/eventnames.h"
#include "iutil/objreg.h"
#include "csutil/hash.h"
#include "csutil/strset.h"
#include "csutil/csstring.h"
Go to the source code of this file.
Classes | |
class | csEventNameRegistry |
The csEventNameRegistry transforms textual event names (e.g., "crystalspace.input.joystick.3.button") into easier-to-manage csEventIDs (which, in non-debug builds, are really just csStringIDs). More... | |
Defines | |
#define | CS_DECLARE_EVENT_SHORTCUTS |
Shortcut to declare class properties SystemOpen, SystemClose, Frame, PreProcess, Process, PostProcess, FinalProcess. | |
#define | CS_INITIALIZE_EVENT_SHORTCUTS(object_reg) |
Shortcut to initialize the properties declared by CS_DECLARE_EVENT_SHORTCUTS. | |
Common system events | |
These are the names of some of the most commonly-used system-generated events. Some events are "umbrella events", that is, subscribing to them means that all events of a certain kind are received (e.g. csevMouse for mouse events), but the "umbrella events" themselves are not sent to event handlers! In the mouse events examples, you would have to check for the names of "leaf events" in the event handler, such as csevMouseDown, csevMouseMove etc. For information on event names see the user manual, section "Event Names". Third-party applications can define their own event names. You should avoid using the "crystalspace." prefix (which is reserved for internally-generated events). | |
#define | csevAllEvents(reg) (csEventNameRegistry::GetID((reg), "")) |
Root event. | |
#define | csevFrame(reg) (csEventNameRegistry::GetID((reg), "crystalspace.frame")) |
Frame event. | |
#define | csevInput(reg) (csEventNameRegistry::GetID((reg), "crystalspace.input")) |
Generic input event. | |
#define | csevKeyboardEvent(reg) (csEventNameRegistry::GetID((reg), "crystalspace.input.keyboard")) |
Generic keyboard event. | |
#define | csevKeyboardDown(reg) (csEventNameRegistry::GetID((reg), "crystalspace.input.keyboard.down")) |
Keyboard key down event. | |
#define | csevKeyboardUp(reg) (csEventNameRegistry::GetID((reg), "crystalspace.input.keyboard.up")) |
Keyboard key up event. | |
#define | csevMouseEvent(reg) (csEventNameRegistry::GetID((reg), "crystalspace.input.mouse")) |
Generic mouse event. | |
#define | csevMouseButton(reg, x) csevMouseOp ((reg), (x), "button") |
Generic button event from mouse x. | |
#define | csevMouseDown(reg, x) csevMouseOp ((reg), (x), "button.down") |
Button down event from mouse x. | |
#define | csevMouseUp(reg, x) csevMouseOp ((reg), (x), "button.up") |
Button up event from mouse x. | |
#define | csevMouseClick(reg, x) csevMouseOp ((reg), (x), "button.click") |
Click event from mouse x. | |
#define | csevMouseDoubleClick(reg, x) csevMouseOp((reg), (x), "button.doubleclick") |
Double-click event from mouse x. | |
#define | csevMouseMove(reg, x) csevMouseOp((reg), (x), "move") |
Move event from mouse x. | |
#define | csevJoystickEvent(reg) (csEventNameRegistry::GetID((reg), "crystalspace.input.joystick")) |
Generic joystick event. | |
#define | csevJoystickButton(reg, x) csevJoystickOp((reg),(x),"button") |
Generic joystick button event from joystick x. | |
#define | csevJoystickDown(reg, x) csevJoystickOp((reg),(x),"button.down") |
Button down event from joystick x. The first system joystick is 0. | |
#define | csevJoystickUp(reg, x) csevJoystickOp((reg),(x),"button.up") |
Button up event from joystick x. The first system joystick is 0. | |
#define | csevJoystickMove(reg, x) csevJoystickOp((reg),(x),"move") |
Move event from joystick x. The first system joystick is 0. | |
#define | CS_IS_KEYBOARD_EVENT(reg, e) csEventNameRegistry::IsKindOf((reg), ((e).Name), csevKeyboardEvent(reg)) |
Check if an event is a keyboard event. | |
#define | CS_IS_MOUSE_EVENT(reg, e) csEventNameRegistry::IsKindOf((reg), ((e).Name), csevMouseEvent(reg)) |
Check if an event is a mouse event. | |
#define | CS_IS_MOUSE_BUTTON_EVENT(reg, e, n) csEventNameRegistry::IsKindOf((reg), ((e).Name), csevMouseButton((reg),n)) |
Check if an event is a button event from mouse n (basis 0). | |
#define | CS_IS_MOUSE_MOVE_EVENT(reg, e, n) csEventNameRegistry::IsKindOf((reg), ((e).Name), csevMouseMove((reg),n)) |
Check if an event is a move event from mouse n (basis 0). | |
#define | CS_IS_JOYSTICK_EVENT(reg, e) csEventNameRegistry::IsKindOf((reg), ((e).Name), csevJoystickEvent(reg)) |
Check if an event is a joystick event. | |
#define | CS_IS_JOYSTICK_BUTTON_EVENT(reg, e, n) csEventNameRegistry::IsKindOf((reg), ((e).Name), csevJoystickButton((reg),n)) |
Check if an event is a button event from mouse n (basis 0). | |
#define | CS_IS_JOYSTICK_MOVE_EVENT(reg, e, n) csEventNameRegistry::IsKindOf((reg), ((e).Name), csevJoystickMove((reg),n)) |
Check if an event is a move event from mouse n (basis 0). | |
#define | CS_IS_INPUT_EVENT(reg, e) csEventNameRegistry::IsKindOf((reg), ((e).Name), csevInput(reg)) |
Check if an event is any input event. | |
#define | csevQuit(reg) (csEventNameRegistry::GetID((reg), "crystalspace.application.quit")) |
This event causes system driver to quit the event loop, even if the event loop has been entered multiple times. | |
#define | csevFocusChanged(reg) (csEventNameRegistry::GetID((reg), "crystalspace.application.focus")) |
Children of this event are generated whenever application (as a whole) receives or loses focus. | |
#define | csevFocusGained(reg) (csEventNameRegistry::GetID((reg), "crystalspace.application.focus.gained")) |
This event is generated whenever user application (as a whole) receives system focus. | |
#define | csevFocusLost(reg) (csEventNameRegistry::GetID((reg), "crystalspace.application.focus.lost")) |
This event is generated whenever user application (as a whole) loses system focus. | |
#define | csevSystemOpen(reg) (csEventNameRegistry::GetID((reg), "crystalspace.application.open")) |
This event is broadcasted to all event listeners just after all modules have been initialized. | |
#define | csevSystemClose(reg) (csEventNameRegistry::GetID((reg), "crystalspace.application.close")) |
This event is broadcasted to all event listeners just before modules are about to be shutdown and unloaded (that is, the system is shutting down). | |
#define | csevCanvasResize(reg, g2d) csevCanvasOp((reg), (g2d), "resize") |
This event is generated when user resizes the application window corresponding with context x (where x is an iGraphics2D pointer). | |
#define | csevCanvasClose(reg, g2d) csevCanvasOp((reg), (g2d), "close") |
This event is sent when a graphics context x is being destroyed (where x is an iGraphics2D pointer). | |
#define | csevCanvasHidden(reg, g2d) csevCanvasOp((reg), (g2d), "hidden") |
Broadcast indicating that the canvas x is not currently visible to the user, such as being iconified (where x is an iGraphics2D pointer). | |
#define | csevCanvasExposed(reg, g2d) csevCanvasOp((reg), (g2d), "exposed") |
Broadcast indicating that the display canvas has just become visible, such as being uniconified (where x is an iGraphics2D pointer). | |
#define | csevCommandLineHelp(reg) (csEventNameRegistry::GetID((reg), "crystalspace.application.commandlinehelp")) |
This event is broadcasted when system driver displays the help text for all supported command-line switches. | |
static csEventID | csevMouse (iEventNameRegistry *name_reg, uint x) |
Root event. | |
static csEventID | csevMouse (iObjectRegistry *object_reg, uint x) |
Root event. | |
static csEventID | csevMouseOp (iEventNameRegistry *name_reg, uint x, const csString &y) |
Root event. | |
static csEventID | csevMouseOp (iObjectRegistry *object_reg, uint x, const csString &y) |
Root event. | |
static csEventID | csevJoystick (iEventNameRegistry *name_reg, uint x) |
Root event. | |
static csEventID | csevJoystick (iObjectRegistry *object_reg, uint x) |
Root event. | |
static csEventID | csevJoystickOp (iEventNameRegistry *name_reg, uint x, const csString &y) |
Root event. | |
static csEventID | csevJoystickOp (iObjectRegistry *object_reg, uint x, const csString &y) |
Root event. | |
csEventID | csevCanvasOp (csRef< iEventNameRegistry > ®, const iGraphics2D *g2d, const csString &y) |
Root event. | |
static csEventID | csevCanvasOp (iObjectRegistry *object_reg, const iGraphics2D *g2d, const csString &y) |
Root event. | |
csEventID | csevPreProcess (iObjectRegistry *reg) |
Broadcasted before csevProcess on every frame. | |
csEventID | csevPreProcess (iEventNameRegistry *reg) |
Root event. | |
csEventID | csevProcess (iObjectRegistry *reg) |
Broadcasted every frame. | |
csEventID | csevProcess (iEventNameRegistry *reg) |
Root event. | |
csEventID | csevPostProcess (iObjectRegistry *reg) |
Broadcasted after csevProcess on every frame. | |
csEventID | csevPostProcess (iEventNameRegistry *reg) |
Root event. | |
csEventID | csevFinalProcess (iObjectRegistry *reg) |
Broadcasted after csevPostProcess on every frame. | |
csEventID | csevFinalProcess (iEventNameRegistry *reg) |
Root event. |
Detailed Description
Event naming and name relations.
Definition in file eventnames.h.
Generated for Crystal Space 1.4.1 by doxygen 1.7.1