|
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
} |
|
|
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 orxSTATUS orxFASTCALL | orxEvent_SetHandlerIDFlags (orxEVENT_HANDLER _pfnEventHandler, orxEVENT_TYPE _eEventType, void *_pContext, orxU32 _u32AddIDFlags, orxU32 _u32RemoveIDFlags) |
|
orxDLLAPI void orxFASTCALL | orxEvent_Setup () |
|
Event module Module that handles internal events
#define orxEVENT_GET_FLAG |
( |
|
ID | ) |
((orxU32)(1U << (orxU32)(ID))) |
#define orxEVENT_INIT |
( |
|
EVENT, |
|
|
|
TYPE, |
|
|
|
ID, |
|
|
|
SENDER, |
|
|
|
RECIPIENT, |
|
|
|
PAYLOAD |
|
) |
| |
Value:do \
{ \
EVENT.eID = (orxENUM)(ID); \
EVENT.pstPayload = (void *)(PAYLOAD); \
Helper defines
Definition at line 50 of file orxEvent.h.
#define orxEVENT_KU32_FLAG_ID_NONE 0x00000000 |
#define orxEVENT_KU32_MASK_ID_ALL 0xFFFFFFFF |
#define orxEVENT_SEND |
( |
|
TYPE, |
|
|
|
ID, |
|
|
|
SENDER, |
|
|
|
RECIPIENT, |
|
|
|
PAYLOAD |
|
) |
| |
Value:do \
{ \
#define orxEVENT_INIT(EVENT, TYPE, ID, SENDER, RECIPIENT, PAYLOAD)
orxDLLAPI orxSTATUS orxFASTCALL orxEvent_Send(orxEVENT *_pstEvent)
Definition at line 60 of file orxEvent.h.
Event handler type / return orxSTATUS_FAILURE if events processing should be stopped for the current event, orxSTATUS_FAILURE otherwise
Definition at line 125 of file orxEvent.h.
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 75 of file orxEvent.h.
Adds an event handler
- Parameters
-
[in] | _eEventType | Concerned type of event |
[in] | _pfnEventHandler | Event handler to add |
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
Adds an event handler with user-defined context
- Parameters
-
[in] | _eEventType | Concerned type of event |
[in] | _pfnEventHandler | Event handler to add |
[in] | _pContext | Context that will be stored in events sent to this handler return orxSTATUS_SUCCESS / orxSTATUS_FAILURE |
Exits from the event Module
Initializes the event Module
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBOOL orxFASTCALL orxEvent_IsSending |
( |
| ) |
|
Is currently sending an event?
- Returns
- orxTRUE / orxFALSE
Removes an event handler
- Parameters
-
[in] | _eEventType | Concerned type of event |
[in] | _pfnEventHandler | Event handler to remove return orxSTATUS_SUCCESS / orxSTATUS_FAILURE |
Removes an event handler which matches given context
- Parameters
-
[in] | _eEventType | Concerned type of event |
[in] | _pfnEventHandler | Event handler to remove |
[in] | _pContext | Context of the handler to remove, orxNULL for removing all occurrences regardless of their context return orxSTATUS_SUCCESS / orxSTATUS_FAILURE |
Sends an event
- Parameters
-
[in] | _pstEvent | Event to send |
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
Sends a simple event
- Parameters
-
[in] | _eEventType | Event type |
[in] | _eEventID | Event ID |
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
Sets an event handler's ID flags (use orxEVENT_GET_FLAG(ID) in order to get the flag that matches an ID)
- Parameters
-
[in] | _pfnEventHandler | Concerned event handler, must have been previously added for the given type |
[in] | _eEventType | Concerned type of event |
[in] | _pContext | Context of the handler to update, orxNULL for updating all occurrences regardless of their context |
[in] | _u32AddIDFlags | ID flags to add |
[in] | _u32RemoveIDFlags | ID flags to remove |
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE