orx  stable
Portable Game Engine
OrxEvent

Data Structures

struct  orxEVENT
 

Macros

#define orxEVENT_INIT(EVENT, TYPE, ID, SENDER, RECIPIENT, PAYLOAD)
 
#define orxEVENT_SEND(TYPE, ID, SENDER, RECIPIENT, PAYLOAD)
 

Typedefs

typedef orxSTATUS(orxFASTCALL * orxEVENT_HANDLER) (const orxEVENT *_pstEvent)
 

Enumerations

enum  orxEVENT_TYPE {
  orxEVENT_TYPE_ANIM = 0, orxEVENT_TYPE_CLOCK, orxEVENT_TYPE_CONFIG, orxEVENT_TYPE_DISPLAY,
  orxEVENT_TYPE_FX, orxEVENT_TYPE_INPUT, orxEVENT_TYPE_LOCALE, orxEVENT_TYPE_OBJECT,
  orxEVENT_TYPE_RENDER, orxEVENT_TYPE_PHYSICS, orxEVENT_TYPE_RESOURCE, orxEVENT_TYPE_SHADER,
  orxEVENT_TYPE_SOUND, orxEVENT_TYPE_SPAWNER, orxEVENT_TYPE_SYSTEM, orxEVENT_TYPE_TEXTURE,
  orxEVENT_TYPE_TIMELINE, orxEVENT_TYPE_VIEWPORT, orxEVENT_TYPE_CORE_NUMBER, orxEVENT_TYPE_FIRST_RESERVED = orxEVENT_TYPE_CORE_NUMBER,
  orxEVENT_TYPE_LAST_RESERVED = 255, orxEVENT_TYPE_USER_DEFINED, orxEVENT_TYPE_NONE = orxENUM_NONE
}
 

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxEvent_AddHandler (orxEVENT_TYPE _eEventType, orxEVENT_HANDLER _pfnEventHandler)
 
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_AddHandlerWithContext (orxEVENT_TYPE _eEventType, orxEVENT_HANDLER _pfnEventHandler, void *_pContext)
 
orxDLLAPI void orxFASTCALL orxEvent_Exit ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_Init ()
 
orxDLLAPI orxBOOL orxFASTCALL orxEvent_IsSending ()
 
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_RemoveHandler (orxEVENT_TYPE _eEventType, orxEVENT_HANDLER _pfnEventHandler)
 
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_RemoveHandlerWithContext (orxEVENT_TYPE _eEventType, orxEVENT_HANDLER _pfnEventHandler, void *_pContext)
 
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_Send (orxEVENT *_pstEvent)
 
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_SendShort (orxEVENT_TYPE _eEventType, orxENUM _eEventID)
 
orxDLLAPI void orxFASTCALL orxEvent_Setup ()
 

Detailed Description

Event module Module that handles internal events

Macro Definition Documentation

#define orxEVENT_INIT (   EVENT,
  TYPE,
  ID,
  SENDER,
  RECIPIENT,
  PAYLOAD 
)
Value:
do \
{ \
EVENT.eType = (orxEVENT_TYPE)(TYPE); \
EVENT.eID = (orxENUM)(ID); \
EVENT.hSender = (orxHANDLE)(SENDER); \
EVENT.hRecipient = (orxHANDLE)(RECIPIENT); \
EVENT.pstPayload = (void *)(PAYLOAD); \
} while(orxFALSE)
#define orxFALSE
Definition: orxType.h:185
orxEVENT_TYPE
Definition: orxEvent.h:71

Helper defines

Definition at line 50 of file orxEvent.h.

#define orxEVENT_SEND (   TYPE,
  ID,
  SENDER,
  RECIPIENT,
  PAYLOAD 
)
Value:
do \
{ \
orxEVENT stEvent; \
orxEVENT_INIT(stEvent, TYPE, ID, SENDER, RECIPIENT, PAYLOAD); \
orxEvent_Send(&stEvent); \
} while(orxFALSE)
#define orxEVENT_INIT(EVENT, TYPE, ID, SENDER, RECIPIENT, PAYLOAD)
Definition: orxEvent.h:50
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_Send(orxEVENT *_pstEvent)
#define orxFALSE
Definition: orxType.h:185

Definition at line 60 of file orxEvent.h.

Typedef Documentation

typedef orxSTATUS(orxFASTCALL * orxEVENT_HANDLER) (const orxEVENT *_pstEvent)

Event handler type / return orxSTATUS_FAILURE if events processing should be stopped for the current event, orxSTATUS_FAILURE otherwise

Definition at line 121 of file orxEvent.h.

Enumeration Type Documentation

Event type enum

Enumerator
orxEVENT_TYPE_ANIM 
orxEVENT_TYPE_CLOCK 
orxEVENT_TYPE_CONFIG 
orxEVENT_TYPE_DISPLAY 
orxEVENT_TYPE_FX 
orxEVENT_TYPE_INPUT 
orxEVENT_TYPE_LOCALE 
orxEVENT_TYPE_OBJECT 
orxEVENT_TYPE_RENDER 
orxEVENT_TYPE_PHYSICS 
orxEVENT_TYPE_RESOURCE 
orxEVENT_TYPE_SHADER 
orxEVENT_TYPE_SOUND 
orxEVENT_TYPE_SPAWNER 
orxEVENT_TYPE_SYSTEM 
orxEVENT_TYPE_TEXTURE 
orxEVENT_TYPE_TIMELINE 
orxEVENT_TYPE_VIEWPORT 
orxEVENT_TYPE_CORE_NUMBER 
orxEVENT_TYPE_FIRST_RESERVED 
orxEVENT_TYPE_LAST_RESERVED 
orxEVENT_TYPE_USER_DEFINED 
orxEVENT_TYPE_NONE 

Definition at line 71 of file orxEvent.h.

Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxEvent_AddHandler ( orxEVENT_TYPE  _eEventType,
orxEVENT_HANDLER  _pfnEventHandler 
)

Adds an event handler

Parameters
[in]_eEventTypeConcerned type of event
[in]_pfnEventHandlerEvent handler to add
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_AddHandlerWithContext ( orxEVENT_TYPE  _eEventType,
orxEVENT_HANDLER  _pfnEventHandler,
void _pContext 
)

Adds an event handler with user-defined context

Parameters
[in]_eEventTypeConcerned type of event
[in]_pfnEventHandlerEvent handler to add
[in]_pContextContext that will be stored in events sent to this handler return orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxEvent_Exit ( )

Exits from the event Module

orxDLLAPI orxSTATUS orxFASTCALL orxEvent_Init ( )

Initializes the event Module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBOOL orxFASTCALL orxEvent_IsSending ( )

Is currently sending an event?

Returns
orxTRUE / orxFALSE
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_RemoveHandler ( orxEVENT_TYPE  _eEventType,
orxEVENT_HANDLER  _pfnEventHandler 
)

Removes an event handler

Parameters
[in]_eEventTypeConcerned type of event
[in]_pfnEventHandlerEvent handler to remove return orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_RemoveHandlerWithContext ( orxEVENT_TYPE  _eEventType,
orxEVENT_HANDLER  _pfnEventHandler,
void _pContext 
)

Removes an event handler which matches given context

Parameters
[in]_eEventTypeConcerned type of event
[in]_pfnEventHandlerEvent handler to remove
[in]_pContextContext of the handler to remove, orxNULL for removing all occurrences regardless of their context return orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_Send ( orxEVENT _pstEvent)

Sends an event

Parameters
[in]_pstEventEvent to send
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_SendShort ( orxEVENT_TYPE  _eEventType,
orxENUM  _eEventID 
)

Sends a simple event

Parameters
[in]_eEventTypeEvent type
[in]_eEventIDEvent ID
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxEvent_Setup ( )

Event module setup


Generated for orx by doxygen 1.5.6