App Events#

Variables#

const carb::events::EventType omni::kit::kEventAppReady

Legacy version of kGlobalEventAppReady .

const carb::events::EventType omni::kit::kEventAppStarted

Legacy version of kGlobalEventAppStarted .

const auto omni::kit::kGlobalEventAppReady

An event that is dispatched when the application becomes ready.

const auto omni::kit::kGlobalEventAppStarted

An event that is dispatched at app startup time.

const auto omni::kit::kGlobalEventErrorLog

An event that is dispatched for each error log emitted.

const auto omni::kit::kGlobalEventErrorLogImmediate

An event that is dispatched for each error log emitted (immediate).

const auto omni::kit::kGlobalEventPostQuit

A shutdown event that is dispatched during the next update after postQuit is called.

const auto omni::kit::kGlobalEventPostUpdate

The final update event that is dispatched during the main RunLoop frame.

const auto omni::kit::kGlobalEventPreShutdown

A shutdown event that is dispatched to indicate the start of shutdown.

const auto omni::kit::kGlobalEventPreUpdate

The first early event that is dispatched at the beginning of the main RunLoop frame.

const auto omni::kit::kGlobalEventScriptingCommand

An event that is dispatched when a scripting command is issued (update).

const auto omni::kit::kGlobalEventScriptingCommandImmediate

An event that is dispatched when a scripting command is issued (immediate).

const auto omni::kit::kGlobalEventScriptingStdErr

An event that is dispatched when python prints to stderr (update).

const auto omni::kit::kGlobalEventScriptingStdErrImmediate

An event that is dispatched when python prints to stderr (immediate).

const auto omni::kit::kGlobalEventScriptingStdOut

An event that is dispatched when python prints to stdout (update).

const auto omni::kit::kGlobalEventScriptingStdOutImmediate

An event that is dispatched when python prints to stdout (immediate).

const auto omni::kit::kGlobalEventUpdate

The main update event that is dispatched during the main RunLoop frame.

constexpr carb::events::EventType omni::kit::kPostQuitEventType

Legacy version of kGlobalEventPostQuit .

constexpr carb::events::EventType omni::kit::kPreShutdownEventType

Legacy version of kGlobalEventPreShutdown .

const carb::events::EventType omni::kit::kScriptingEventCommand

Legacy version of kGlobalEventScriptingCommand .

const carb::events::EventType omni::kit::kScriptingEventStdErr

Legacy version of kGlobalEventScriptingCommand .

const carb::events::EventType omni::kit::kScriptingEventStdOut

Legacy version of kGlobalEventScriptingCommand .

Variables#

const carb::events::EventType omni::kit::kEventAppReady = std::integral_constant<uint64_t, carb::fnv1aHash("APP_READY")>::value#

Legacy version of kGlobalEventAppReady.

For backwards compatibility, this event is dispatched to the local legacy event stream obtainable with IApp::getStartupEventStream().

Event Arguments

  • None

const carb::events::EventType omni::kit::kEventAppStarted = std::integral_constant<uint64_t, carb::fnv1aHash("APP_STARTED")>::value#

Legacy version of kGlobalEventAppStarted.

For backwards compatibility, this event is dispatched to the local legacy event stream obtainable with IApp::getStartupEventStream().

Event Arguments

  • None

const auto omni::kit::kGlobalEventAppReady = carb::RString("omni.kit.app:ready")#

An event that is dispatched when the application becomes ready.

After application startup (see kGlobalEventAppStarted), every call to IApp::update() after the first call will check for readiness. Readiness can be delayed with IApp::delayAppReady() which must be called during each main run loop iteration to prevent readiness. Once a run loop completes with no calls to IApp::delayAppReady() the application is considered “ready” and this event is dispatched via carb::eventdispatcher::IEventDispatcher.

Event Arguments

  • None

const auto omni::kit::kGlobalEventAppStarted = carb::RString("omni.kit.app:started")#

An event that is dispatched at app startup time.

This event is dispatched globally via carb::eventdispatcher::IEventDispatcher immediately before IApp::startup() returns. This event is dispatched before kGlobalEventAppReady.

Event Arguments

  • None

const auto omni::kit::kGlobalEventErrorLog = carb::RString("omni.kit.app:error_log")#

An event that is dispatched for each error log emitted.

Event Arguments

  • ”source” - The plugin or log channel emitting the error log (string).

  • ”level” - The log level, which will be carb::logging::kLevelError or higher (integer).

  • ”filename” - (Optional) The source filename that emitted the error log (string).

  • ”functionName” - (Optional) The function name that emitted the error log (string).

  • ”lineNumber” - (Optional) The line number in the source file that emitted the error log (integer).

  • ”message” - The log message (string).

Note

This event is dispatched during IApp::update; to receive the event immediately when it happens, observe kGlobalEventErrorLogImmediate.

const auto omni::kit::kGlobalEventErrorLogImmediate = carb::RString("omni.kit.app:error_log:immediate")#

An event that is dispatched for each error log emitted (immediate).

Event Arguments

  • ”source” - The plugin or log channel emitting the error log (string).

  • ”level” - The log level, which will be carb::logging::kLevelError or higher (integer).

  • ”filename” - (Optional) The source filename that emitted the error log (string).

  • ”functionName” - (Optional) The function name that emitted the error log (string).

  • ”lineNumber” - (Optional) The line number in the source file that emitted the error log (integer).

  • ”message” - The log message (string).

Note

This event is dispatched immediately as it happens; to receive the event during the next IApp::update, observe kGlobalEventErrorLog.

const auto omni::kit::kGlobalEventPostQuit = carb::RString("omni.kit.app:post_quit")#

A shutdown event that is dispatched during the next update after postQuit is called.

Once IApp::postQuit() is called, the next IApp::update() call will check for shutdown requests and start the shutdown sequence. The first step of this sequence is that this event (kGlobalEventPostQuit) is dispatched. During this event, any calls to IApp::tryCancelShutdown() will abort this process (unless the posted quit request is noncancellable). If no attempt to cancel the shutdown has been made, kGlobalEventPreShutdown will be dispatched.

Event Arguments

  • ”uncancellable” (bool) a true value indicates that the shutdown is not cancellable

const auto omni::kit::kGlobalEventPostUpdate = carb::RString("postUpdate")#

The final update event that is dispatched during the main RunLoop frame.

Event Arguments

  • dt (double) - Effectively the length of time (in seconds) of the previous frame. The first frame is 1.0/60.0.

  • SWHFrameNumber (int64) - The frame number beginning at 0.

const auto omni::kit::kGlobalEventPreShutdown = carb::RString("omni.kit.app:pre_shutdown")#

A shutdown event that is dispatched to indicate the start of shutdown.

Event Arguments

  • None

const auto omni::kit::kGlobalEventPreUpdate = carb::RString("preUpdate")#

The first early event that is dispatched at the beginning of the main RunLoop frame.

Event Arguments

  • dt (double) - Effectively the length of time (in seconds) of the previous frame. The first frame is 1.0/60.0.

  • SWHFrameNumber (int64) - The frame number beginning at 0.

const auto omni::kit::kGlobalEventScriptingCommand = carb::RString("omni.kit.app:script_command")#

An event that is dispatched when a scripting command is issued (update).

Event Arguments

  • ”text” - A human-readable text block (string)

Note

This event is dispatched during IApp::update; to receive the event immediately when it happens, observe kGlobalEventScriptingCommandImmediate.

const auto omni::kit::kGlobalEventScriptingCommandImmediate = carb::RString("omni.kit.app:script_command:immediate")#

An event that is dispatched when a scripting command is issued (immediate).

Event Arguments

  • ”text” - A human-readable text block (string)

Note

This event is dispatched immediately as it happens; to receive the event during the next IApp::update, observe kGlobalEventScriptingCommand.

const auto omni::kit::kGlobalEventScriptingStdErr = carb::RString("omni.kit.app:script_stderr")#

An event that is dispatched when python prints to stderr (update).

Event Arguments

  • ”text” - A human-readable text block (string)

Note

This event is dispatched during IApp::update; to receive the event immediately when it happens, observe kGlobalEventScriptingStdErrImmediate.

const auto omni::kit::kGlobalEventScriptingStdErrImmediate = carb::RString("omni.kit.app:script_stderr:immediate")#

An event that is dispatched when python prints to stderr (immediate).

Event Arguments

  • ”text” - A human-readable text block (string)

Note

This event is dispatched immediately as it happens; to receive the event during the next IApp::update, observe kGlobalEventScriptingStdErr.

const auto omni::kit::kGlobalEventScriptingStdOut = carb::RString("omni.kit.app:script_stdout")#

An event that is dispatched when python prints to stdout (update).

Event Arguments

  • ”text” - A human-readable text block (string)

Note

This event is dispatched during IApp::update; to receive the event immediately when it happens, observe kGlobalEventScriptingStdOutImmediate.

const auto omni::kit::kGlobalEventScriptingStdOutImmediate = carb::RString("omni.kit.app:script_stdout:immediate")#

An event that is dispatched when python prints to stdout (immediate).

Event Arguments

  • ”text” - A human-readable text block (string)

Note

This event is dispatched immediately as it happens; to receive the event during the next IApp::update, observe kGlobalEventScriptingStdOut.

const auto omni::kit::kGlobalEventUpdate = carb::RString("update")#

The main update event that is dispatched during the main RunLoop frame.

Event Arguments

  • dt (double) - Effectively the length of time (in seconds) of the previous frame. The first frame is 1.0/60.0.

  • SWHFrameNumber (int64) - The frame number beginning at 0.

constexpr carb::events::EventType omni::kit::kPostQuitEventType = 0#

Legacy version of kGlobalEventPostQuit.

For backwards compatibility, this event is dispatched to the local legacy event stream obtainable with IApp::getShutdownEventStream().

Event Arguments

  • ”uncancellable” (bool) a true value indicates that the shutdown is not cancellable

constexpr carb::events::EventType omni::kit::kPreShutdownEventType = 1#

Legacy version of kGlobalEventPreShutdown.

For backwards compatibility, this event is dispatched to the local legacy event stream obtainable with IApp::getShutdownEventStream().

Event Arguments

  • None

const carb::events::EventType omni::kit::kScriptingEventCommand = 0#

Legacy version of kGlobalEventScriptingCommand.

For backwards compatibility, this event is dispatched to the local legacy event stream obtainable with IAppScripting::getEventStream().

Arguments

  • ”text” (string) - A human-readable text block.

const carb::events::EventType omni::kit::kScriptingEventStdErr = 2#

Legacy version of kGlobalEventScriptingCommand.

For backwards compatibility, this event is dispatched to the local legacy event stream obtainable with IAppScripting::getEventStream()

.

Legacy version of

kGlobalEventScriptingStdErr.
Arguments

  • ”text” (string) - A human-readable text block.

const carb::events::EventType omni::kit::kScriptingEventStdOut = 1#

Legacy version of kGlobalEventScriptingCommand.

For backwards compatibility, this event is dispatched to the local legacy event stream obtainable with IAppScripting::getEventStream()

.

Legacy version of

kGlobalEventScriptingStdOut.
Arguments

  • ”text” (string) - A human-readable text block.