Built-in event identifiers and payloads published through the generic extension
event transport in `
| Namespace: | dmEngine |
| Include: | #include <dmsdk/engine/engine_event_gen.hpp> |
| CONSTANTS | |
|---|---|
| ENGINE_EVENT_INPUT_ACTIONS | input actions have been resolved |
| ENGINE_STATE_EVENT | engine state notification |
| ENGINE_WINDOW_EVENT | engine window notification |
| EVENT_INPUT_ACTIONS | input actions have been resolved |
| EVENT_STATE | engine state notification |
| EVENT_WINDOW | engine window notification |
| ENUMS | |
|---|---|
| EngineState | engine state notification kind |
| EngineWindowEventType | window notification kind |
| State | engine state notification kind |
| WindowEventType | window notification kind |
| STRUCTS | |
|---|---|
| struct EngineInputActionsEvent | resolved input actions |
| struct EngineStateEvent | engine state event payload |
| struct EngineWindowEvent | engine window event payload |
| struct InputActionsEvent | resolved input actions |
| struct StateEvent | engine state event payload |
| struct WindowEvent | engine window event payload |
| MACROS | |
|---|---|
| ENGINE_WINDOW_EVENT_INITIALIZER () | initialize a window event |
| ENGINE_WINDOW_EVENT_RESIZED_INITIALIZER () | initialize a window resize event |
TYPE
struct EngineInputActionsEventPublished once per completed input update after application bindings are resolved, coordinates converted and text/marked-text ordered last, before focused game-object dispatch. Empty updates are published; skipped input updates are not. This is independent of extension Update and rendered-frame count. Input events use the generic handler's application lifetime. Iterate the current resolved batch through InputIterateActions and the iterator getters. The batch belongs to input and remains valid until the next binding update starts or the context is destroyed. Iteration cannot consume input or change focused dispatch. Obtain the source engine from the extension context registry using ENGINE_CONTEXT_NAME. Focused gameplay should use native component input/update callbacks.
MEMBERS
HInputContext |
m_Input |
valid borrowed input context, including empty updates |
TYPE
struct EngineStateEventPayload for ENGINE_STATE_EVENT with data_size equal to sizeof(EngineStateEvent). Obtain the source engine from the extension context registry using ENGINE_CONTEXT_NAME.
MEMBERS
EngineState |
m_State |
notification being delivered |
TYPE
struct EngineWindowEventPayload for ENGINE_WINDOW_EVENT with data_size equal to sizeof(EngineWindowEvent). m_Type selects the valid union member. Only ENGINE_WINDOW_EVENT_RESIZED has event-specific data: m_Data.m_Resized contains the physical framebuffer dimensions. Do not read that member for other notification types. Resize delivery follows the existing window state updates and notifications, once per native resize callback with no initial-size replay. Window events may arrive before engine Initialize; m_Window can be null during early startup. Obtain the source engine from the extension context registry using ENGINE_CONTEXT_NAME.
MEMBERS
HWindow |
m_Window |
borrowed source window, or null if not yet available |
EngineWindowEventType |
m_Type |
notification selecting the valid payload |
uint32_t |
m_Data.m_Resized.m_Width |
physical framebuffer width; valid only for ENGINE_WINDOW_EVENT_RESIZED |
uint32_t |
m_Data.m_Resized.m_Height |
physical framebuffer height; valid only for ENGINE_WINDOW_EVENT_RESIZED |
TYPE
struct InputActionsEventPublished once per completed input update after application bindings are resolved, coordinates converted and text/marked-text ordered last, before focused game-object dispatch. Empty updates are published; skipped input updates are not. This is independent of extension Update and rendered-frame count. Input events use the generic handler's application lifetime. Iterate the current resolved batch through dmInput::IterateActions and the iterator getters. The batch belongs to input and remains valid until the next binding update starts or the context is destroyed. Iteration cannot consume input or change focused dispatch. Obtain the source engine from the extension context registry using ENGINE_CONTEXT_NAME. Focused gameplay should use native component input/update callbacks.
MEMBERS
dmInput::HContext |
m_Input |
valid borrowed input context, including empty updates |
TYPE
struct StateEventPayload for EVENT_STATE with data_size equal to sizeof(StateEvent). Obtain the source engine from the extension context registry using ENGINE_CONTEXT_NAME.
MEMBERS
State |
m_State |
notification being delivered |
TYPE
struct WindowEventPayload for EVENT_WINDOW with data_size equal to sizeof(WindowEvent). m_Type selects the valid union member. Only WINDOW_EVENT_RESIZED has event-specific data: m_Data.m_Resized contains the physical framebuffer dimensions. Do not read that member for other notification types. Resize delivery follows the existing window state updates and notifications, once per native resize callback with no initial-size replay. Window events may arrive before engine Initialize; m_Window can be null during early startup. Obtain the source engine from the extension context registry using ENGINE_CONTEXT_NAME.
MEMBERS
HWindow |
m_Window |
borrowed source window, or null if not yet available |
WindowEventType |
m_Type |
notification selecting the valid payload |
uint32_t |
m_Data.m_Resized.m_Width |
physical framebuffer width; valid only for WINDOW_EVENT_RESIZED |
uint32_t |
m_Data.m_Resized.m_Height |
physical framebuffer height; valid only for WINDOW_EVENT_RESIZED |
Identifies the initialization or deletion notification in EngineStateEvent.
ENGINE_STATE_INITIALIZED |
Successful engine initialization has completed. |
ENGINE_STATE_DELETE_BEGIN |
Engine deletion begins, before collections and systems are torn down. Also delivered after initialization failure if AppInitialize succeeded. |
Identifies the active payload in EngineWindowEvent.
ENGINE_WINDOW_EVENT_RESIZED |
Resize notification. Read physical dimensions from m_Data.m_Resized. |
ENGINE_WINDOW_EVENT_MINIMIZED |
The window was minimized; not a hide notification. |
ENGINE_WINDOW_EVENT_RESTORED |
The window was restored from minimization; not a show notification. |
ENGINE_WINDOW_EVENT_FOCUS_GAINED |
The window or app screen gained focus. |
ENGINE_WINDOW_EVENT_FOCUS_LOST |
The window or app screen lost focus. |
Identifies the initialization or deletion notification in StateEvent.
STATE_INITIALIZED |
Successful engine initialization has completed. |
STATE_DELETE_BEGIN |
Engine deletion begins, before collections and systems are torn down. Also delivered after initialization failure if AppInitialize succeeded. |
Identifies the active payload in WindowEvent.
WINDOW_EVENT_RESIZED |
Resize notification. Read physical dimensions from m_Data.m_Resized. |
WINDOW_EVENT_MINIMIZED |
The window was minimized; not a hide notification. |
WINDOW_EVENT_RESTORED |
The window was restored from minimization; not a show notification. |
WINDOW_EVENT_FOCUS_GAINED |
The window or app screen gained focus. |
WINDOW_EVENT_FOCUS_LOST |
The window or app screen lost focus. |
Brace initializer for an EngineWindowEvent declaration, with zeroed event data. Each argument is evaluated once. Available with the same name in C and C++.
EXAMPLES
EngineWindowEvent event = ENGINE_WINDOW_EVENT_INITIALIZER(window, ENGINE_WINDOW_EVENT_FOCUS_GAINED);
Brace initializer for an EngineWindowEvent declaration with type ENGINE_WINDOW_EVENT_RESIZED. Each argument is evaluated once. Available with the same name in C and C++.
EXAMPLES
EngineWindowEvent event = ENGINE_WINDOW_EVENT_RESIZED_INITIALIZER(window, 800, 600);