#include <kanzi/example_application.hpp>
Public Member Functions | |
void | onConfigure (ApplicationProperties &configuration) override |
Callback for configuring the application properties. More... | |
void | onKeyInputEvent (const KeyEvent &keyEvent) override |
Callback for handling input events from keyboard. More... | |
void | registerMetadataOverride (ObjectFactory &) override |
Register the rest of module metadata, such as loaders for types in module. More... | |
Public Member Functions inherited from kanzi::Application | |
Application () | |
Constructs the application object. More... | |
void | initialize (const SystemProperties &systemProperties) |
Initializes the application to a consistent state. More... | |
void | initializeGL () |
Initializes the graphics language subsystem. More... | |
void | main (const SystemProperties &systemProperties) |
Application entry point. More... | |
void | resumeGL () |
Resumes the graphics language subsystem. More... | |
void | suspendGL () |
Suspends the graphics language subsystem. More... | |
void | uninitialize () |
Uninitializes the application. More... | |
void | uninitializeGL () |
Uninitializes the graphics language subsystem. More... | |
~Application () override | |
Destructs the application object. More... | |
void | pause () |
Puts the application from the Running state to the Paused state. More... | |
void | resume () |
Resumes the application from the Paused state to the Running state. More... | |
void | quit () |
Quits the application. More... | |
void | patchProject (uintmax_t byteCount, const byte *bytes) |
Applies a Kanzi Studio Preview patch. More... | |
Domain * | getDomain () const |
Access domain. More... | |
Renderer3D * | getRenderer3D () const |
Access the renderer. More... | |
Node2DSharedPtr | getRoot () const |
Access the root node. More... | |
ScreenSharedPtr | getScreen () const |
Access the Screen node. More... | |
void | setScreen (ScreenSharedPtr screen) |
Sets the Screen node. More... | |
const MainLoopScheduler & | getMainLoopScheduler () const |
Access the associated MainLoopScheduler. More... | |
MainLoopScheduler & | getMainLoopScheduler () |
Access the associated MainLoopScheduler. More... | |
ResourceManager * | getResourceManager () const |
Access resource manager. More... | |
InputManager * | getInputManager () const |
Access input manager. More... | |
detail::MessageDispatcher * | getMessageDispatcher () const |
Access message dispatcher. More... | |
float | getFramesPerSecond () const |
Access framerate information. More... | |
size_t | getGraphicsOutputCount () const |
Access graphics output count. More... | |
GraphicsOutputSharedPtr | getGraphicsOutput (size_t index=0) const |
Access graphics outputs. More... | |
template<typename Interface > | |
shared_ptr< Interface > | getGraphicsOutput (size_t index) const |
Query graphics output interfaces. More... | |
void | appendGraphicsOutput (GraphicsOutputSharedPtr graphicsOutput) |
Attach graphics output. More... | |
void | removeGraphicsOutput (size_t index=0) |
Remove graphics output. More... | |
size_t | getEventSourceCount () const |
Access event source count. More... | |
EventSourceSharedPtr | getEventSource (size_t index=0) const |
Access event sources. More... | |
void | appendEventSource (EventSourceSharedPtr eventSource) |
Attach event source to domain and register its event handle with main loop scheduler. More... | |
void | removeEventSource (size_t index=0) |
Remove event source. More... | |
MainLoopState | getState () const |
Access application state. More... | |
ApplicationProperties | getApplicationProperties () const |
Access application properties. More... | |
ApplicationProperties::PerformanceInfoLevel | getPerformanceInfoLevel () const |
Gets the Performance HUD information level. More... | |
void | setPerformanceInfoLevel (ApplicationProperties::PerformanceInfoLevel level) |
Sets the Performance HUD information level. More... | |
void | loadFontEngine (ApplicationProperties::FontEngine fontEngine) |
Loads the font engine for the font manager. More... | |
void | setAllowIndefiniteSleep (bool enabled) |
Sets or resets the flag that allows indefinite sleep. More... | |
Public Member Functions inherited from kanzi::Module | |
virtual void | destroy () |
virtual MetaclassContainer | getMetaclassesOverride () |
Module () | |
virtual void | registerDebugRenderingFunctions (DebugRenderRegistry &) |
Register the module debug rendering functions. More... | |
void | setDomain (Domain *domain) |
Set the domain. More... | |
Additional Inherited Members | |
Public Types inherited from kanzi::Module | |
typedef vector< const Metaclass * > | MetaclassContainer |
typedef MetaclassContainer::iterator | MetaclassIterator |
Protected Member Functions inherited from kanzi::Application | |
virtual void | initializeProperties (const SystemProperties &systemProperties) |
Loads the application properties, based on configuration file and command-line arguments. More... | |
virtual void | initializeSystem () |
Initializes profiling, event sources, and graphics output. More... | |
virtual void | initializeDomain () |
Initializes Kanzi Domain and loads a kzb file. More... | |
virtual void | initializeMainLoopTasks () |
Attaches the default tasks to the main loop scheduler. More... | |
void | applyMainLoopConfigs () |
Applies the frame limit and idle-suspension configurations from the application properties to the main loop scheduler, and attaches event handles and preconditions. More... | |
void | clearEventQueue () |
Clears the event queue. More... | |
void | gatherEvents () |
Gathers all input events into the event queue. More... | |
void | handleApplicationEvents () |
Executes the application-defined event handler on all events in the event queue. More... | |
virtual void | handleEvents (EventQueue &eventQueue) |
Executes the application-defined event handler on all events in the event queue. More... | |
void | handleGraphicsEvents () |
Executes the graphics subsystem event handler. More... | |
void | handleInputManagerEvents () |
Executes the input subsystem event handler. More... | |
void | loadStartupKzb () |
Loads the kzb file that is specified by KzuEngine::m_newBinaryName. More... | |
void | progressDeploymentQueue () |
Processes the deployment queue for asynchronous loading tasks. More... | |
void | updateRenderer (chrono::nanoseconds deltaTime) |
Advances renderer clock with time delta, and attaches active graphics output to it. More... | |
void | adjustRenderingArea () |
Sets the rendering area on the graphics output based on the size, orientation, and metrics. More... | |
void | layout () |
Lays out the node tree. More... | |
void | extract () |
Extracts the node tree. More... | |
void | tickAnimations (chrono::nanoseconds deltaTime) |
Ticks all the active animations. More... | |
virtual void | render () |
Renders the node tree. More... | |
void | renderPerformanceInfo () |
Renders the Performance HUD. More... | |
void | clearAllRenderBuffers (ColorRGBA clearColor) |
Clears all render buffers. More... | |
void | present () |
Updates the graphics output buffer with the rendered node tree. More... | |
virtual void | onStartup () |
Callback for the startup logic. More... | |
virtual void | onShutdown () |
Callback for the shutdown logic. More... | |
virtual void | onProjectLoaded () |
Callback for initializations that use data from a kzb file. More... | |
virtual void | onUpdate (chrono::nanoseconds deltaTime) |
Callback for the update logic. More... | |
virtual void | onPointerInputEvent (const PointerEvent &pointerEvent) |
Callback for handling of input events from a pointing device, such as a mouse or touch screen. More... | |
virtual optional< chrono::nanoseconds > | onSuspend (chrono::nanoseconds remainingFrameAllotment) |
Callback for determining the duration of suspension in a main loop frame. More... | |
virtual void | onPause () |
Kanzi calls this callback when the application main loop enters the Paused state. More... | |
virtual void | onResume () |
Kanzi calls this callback when the application main loop returns from the Paused to the Running state. More... | |
virtual void | onResumeCheck () |
Kanzi calls this callback for the event handling logic when the application main loop is in the Paused state. More... | |
virtual void | mainOverride (const SystemProperties &systemProperties) |
Override function for main(). More... | |
virtual void | initializeOverride (const SystemProperties &systemProperties) |
Override function for initialize(). More... | |
virtual void | uninitializeOverride () |
Override function for uninitialize(). More... | |
virtual void | initializeGLOverride () |
Override function for initializeGL(). More... | |
virtual void | uninitializeGLOverride () |
Override function for uninitializeGL(). More... | |
virtual void | suspendGLOverride () |
Override function for suspendGL(). More... | |
virtual void | resumeGLOverride () |
Override function for resumeGL(). More... | |
virtual void | progressDeploymentQueueOverride () |
Override function for progressDeploymentQueue(). More... | |
void | logStartupProfilingData () const |
Logs startup profiling data. More... | |
StartupProfilerRegistry & | getStartupProfilerRegistry () const |
Gets the startup profiler registry. More... | |
virtual bool | isToolPresent () const |
Indicates whether application is running in the Kanzi Studio Preview. More... | |
void | logGraphicsInformation () |
Log graphics information based on application properties. More... | |
KzuEngine * | getEngine () const |
Access Kanzi Engine. More... | |
PerformanceInfo & | acquirePerformanceInfo () |
Acquire performance information object. More... | |
Protected Member Functions inherited from kanzi::Module | |
virtual | ~Module ()=default |
Destructor. More... | |
Protected Attributes inherited from kanzi::Application | |
ApplicationProperties | m_applicationProperties |
Application properties. More... | |
KzuEngine * | m_engine |
Kanzi Engine instance. More... | |
EventQueue | m_eventQueue |
The event queue for user input and window events. More... | |
MainLoopScheduler | m_mainLoopScheduler |
Main loop scheduler. More... | |
unique_ptr< PerformanceInfo > | m_performanceInfo |
Performance HUD information. More... | |
bool | m_projectLoaded |
Flag to be set when project has been loaded. More... | |
SystemProperties | m_systemProperties |
Container of command line parameters of the program. More... | |
Protected Attributes inherited from kanzi::Module | |
Domain * | m_domain |
The domain this module is registered to. More... | |
|
inlineoverridevirtual |
Callback for configuring the application properties.
Kanzi calls this callback before it reads the application.cfg and before it initializes the graphics subsystem.
configuration | Allows modification of the application properties. |
Reimplemented from kanzi::Application.
|
inlineoverridevirtual |
Register the rest of module metadata, such as loaders for types in module.
When registering a module, a domain calls this function.
Reimplemented from kanzi::Module.
|
inlineoverridevirtual |
Callback for handling input events from keyboard.
Kanzi calls this function inside the Input stage of the main loop.
keyEvent | Reference to the event. |
Reimplemented from kanzi::Application.