![]() |
Murl Engine API
Version 2018.3
|
The engine control class. More...
#include <murl_platform_engine_control.h>
The engine control class.
The engine control class implements methods for creating an instance of the engine, attaching an application and controlling the engine.
A typical sequence for creating an engine instance is:
After successfully initialization the engine can be controlled by:
The rendering context provided by the video interface is controlled by:
To update custom ICustomControlable objects:
A typical sequence for destroying an engine instance is:
Public Member Functions | |
EngineControl () | |
The default constructor. | |
virtual | ~EngineControl () |
The destructor. | |
Bool | Init (IPlatform *platform) |
Initialize the engine control. More... | |
Bool | DeInit () |
Deinitialize the engine control. More... | |
Bool | CreateEngine (IApp *application, IFileInterface *fileInterface) |
Create the engine instance. More... | |
Bool | DestroyEngine () |
Destroy the engine instance. More... | |
Bool | InitEngine () |
Initialize the engine instance. More... | |
Bool | StartEngine () |
Start the engine. More... | |
Bool | IsStarted () const |
Check if the engine is started. More... | |
Bool | StopEngine () |
Stop the engine. More... | |
Bool | PauseEngine () |
Pause the engine. More... | |
Bool | IsPaused () const |
Check if the engine is paused. More... | |
Bool | ContinueEngine () |
Continue the engine. More... | |
Bool | SuspendEngine () |
Suspend the engine. More... | |
Bool | IsSuspended () const |
Check if the engine is suspended. More... | |
Bool | ResumeEngine () |
Resume the engine. More... | |
Bool | Activate () |
Activate the engine. More... | |
Bool | DeActivate () |
Deactivate the engine. More... | |
Bool | BeginFrame () |
Begin rendering a frame. More... | |
Bool | EndFrame () |
End rendering a frame. More... | |
Bool | Invoke (const IMethodCall *call, Bool waitForMore) |
Invoke a method in the render thread context. More... | |
virtual Bool | AppFinishLaunching (void *launchOptions) |
Execute AppFinishLaunching() method for all custom ICustomControlable objects. More... | |
Bool | AppOpenURL (String url, String sourceApplication, void *annotation) |
Execute AppOpenURL() method for all custom ICustomControlable objects. More... | |
Bool | AppOpenURL (String url, void *options) |
Execute AppOpenURL() method for all custom ICustomControlable objects. More... | |
void | AppReceiveNotification (void *notification) |
Execute AppReceiveNotification() method for all custom ICustomControlable objects. More... | |
void | AppRegisterForRemoteNotification (const ConstData &deviceToken, void *error) |
Execute AppRegisterForRemoteNotification() method for all custom ICustomControlable objects. More... | |
void | AppRegisterUserNotificationSettings (void *notificationSettings) |
Execute AppRegisterUserNotificationSettings() method for all custom ICustomControlable objects. More... | |
void | AppHandleActionWithIdentifier (const String &identifier, void *notification, void *userInfo) |
Execute AppHandleActionWithIdentifier() method for all custom ICustomControlable objects. More... | |
ICustomControlable::FetchResult | AppReceiveRemoteNotification (void *userInfo) |
Execute AppReceiveRemoteNotification() method for all custom ICustomControlable objects. More... | |
ICustomControlable::FetchResult | AppPerformBackgroundFetch () |
Execute AppPerformBackgroundFetch() method for all custom ICustomControlable objects. More... | |
void | AppHandleEventsForBackgroundURLSession (const String &identifier) |
Execute AppHandleEventsForBackgroundURLSession() method for all custom ICustomControlable objects. More... | |
void | AppWillTerminate () |
Execute AppWillTerminate() method for all custom ICustomControlable objects. More... | |
void | FrameUpdate () |
Execute FrameUpdate() method for all custom ICustomControlable objects. More... | |
IPlatformConfiguration * | GetPlatformConfiguration () const |
Get the platform configuration object. More... | |
IEngineConfiguration * | GetEngineConfiguration () const |
Get the engine configuration object. More... | |
IAppConfiguration * | GetAppConfiguration () const |
Get the application configuration object. More... | |
IDeviceHandler * | GetDeviceHandler () |
Get the device handler object. More... | |
Bool Murl::Platform::EngineControl::Init | ( | IPlatform * | platform | ) |
Initialize the engine control.
Creates the platform, engine and application configuration and the device handler.
platform | The platform. |
Bool Murl::Platform::EngineControl::DeInit | ( | ) |
Deinitialize the engine control.
Destroys the platform, engine and application configuration and the device handler.
Bool Murl::Platform::EngineControl::CreateEngine | ( | IApp * | application, |
IFileInterface * | fileInterface | ||
) |
Create the engine instance.
Creates the engine and calls IApp::Configure().
application | The application to configure. |
fileInterface | The file interface for application setup. |
Bool Murl::Platform::EngineControl::DestroyEngine | ( | ) |
Destroy the engine instance.
Calls IEngine::DeInit() and destroys the engine instance.
Bool Murl::Platform::EngineControl::InitEngine | ( | ) |
Bool Murl::Platform::EngineControl::StartEngine | ( | ) |
Bool Murl::Platform::EngineControl::IsStarted | ( | ) | const |
Check if the engine is started.
Bool Murl::Platform::EngineControl::StopEngine | ( | ) |
Bool Murl::Platform::EngineControl::PauseEngine | ( | ) |
Pause the engine.
Has to be called if the application will resign active. Calls IEngine::Pause().
Bool Murl::Platform::EngineControl::IsPaused | ( | ) | const |
Check if the engine is paused.
Bool Murl::Platform::EngineControl::ContinueEngine | ( | ) |
Continue the engine.
Has to be called if the application did become active. Calls IEngine::Continue().
Bool Murl::Platform::EngineControl::SuspendEngine | ( | ) |
Suspend the engine.
Has to be called if the application did enter background. Calls IEngine::Suspend().
Bool Murl::Platform::EngineControl::IsSuspended | ( | ) | const |
Check if the engine is suspended.
Bool Murl::Platform::EngineControl::ResumeEngine | ( | ) |
Resume the engine.
Has to be called if the application did enter fourceground. Calls IEngine::Resume().
Bool Murl::Platform::EngineControl::Activate | ( | ) |
Activate the engine.
Calls ContinueEngine() or ResumeEngine() if the engine is paused or suspended.
Bool Murl::Platform::EngineControl::DeActivate | ( | ) |
Deactivate the engine.
Performes depending on IEngineConfiguration::GetDeactivatedAppRunState():
Bool Murl::Platform::EngineControl::BeginFrame | ( | ) |
Bool Murl::Platform::EngineControl::EndFrame | ( | ) |
Bool Murl::Platform::EngineControl::Invoke | ( | const IMethodCall * | call, |
Bool | waitForMore | ||
) |
Invoke a method in the render thread context.
The render thread context is the context of the EndFrame() caller. The invoke call is waiting until the method was processed. This method is intend for internal use only.
call | The method call object. |
waitForMore | If true, the engine continues processing the message loop for a given maximum amount of time, in order to e.g. speed up initialization of multiple render objects in a sequence. The maximum time can be set via IEngineConfiguration::SetSyncLoadingTimeout(). |
|
virtual |
Execute AppFinishLaunching() method for all custom ICustomControlable objects.
Has to be called if the application did finish launching.
launchOptions | The launch options dictionary (NSDictionary*). |
Bool Murl::Platform::EngineControl::AppOpenURL | ( | String | url, |
String | sourceApplication, | ||
void * | annotation | ||
) |
Execute AppOpenURL() method for all custom ICustomControlable objects.
Has to be called if the application is opened by an url.
url | The url string. |
sourceApplication | The source application string. |
annotation | A property-list object supplied by the source application. |
Execute AppOpenURL() method for all custom ICustomControlable objects.
Has to be called if the application is opened by an url with options.
url | The url string. |
options | A dictionary of launch options. |
void Murl::Platform::EngineControl::AppReceiveNotification | ( | void * | notification | ) |
Execute AppReceiveNotification() method for all custom ICustomControlable objects.
notification | Encapsulates details about the notification (UILocalNotification*). |
void Murl::Platform::EngineControl::AppRegisterForRemoteNotification | ( | const ConstData & | deviceToken, |
void * | error | ||
) |
Execute AppRegisterForRemoteNotification() method for all custom ICustomControlable objects.
deviceToken | The device token. |
error | An optional error (NSError*) or null. |
void Murl::Platform::EngineControl::AppRegisterUserNotificationSettings | ( | void * | notificationSettings | ) |
Execute AppRegisterUserNotificationSettings() method for all custom ICustomControlable objects.
notificationSettings | The user notification settings (UIUserNotificationSettings*). |
void Murl::Platform::EngineControl::AppHandleActionWithIdentifier | ( | const String & | identifier, |
void * | notification, | ||
void * | userInfo | ||
) |
Execute AppHandleActionWithIdentifier() method for all custom ICustomControlable objects.
identifier | The identifier string associated with the action. |
notification | The local notification object that was triggered (UILocalNotification*). |
userInfo | Dictionary containing information related to the remote notification (NSDictionary*). |
ICustomControlable::FetchResult Murl::Platform::EngineControl::AppReceiveRemoteNotification | ( | void * | userInfo | ) |
Execute AppReceiveRemoteNotification() method for all custom ICustomControlable objects.
userInfo | Encapsulates details about the notification (NSDictionary*). |
ICustomControlable::FetchResult Murl::Platform::EngineControl::AppPerformBackgroundFetch | ( | ) |
Execute AppPerformBackgroundFetch() method for all custom ICustomControlable objects.
void Murl::Platform::EngineControl::AppHandleEventsForBackgroundURLSession | ( | const String & | identifier | ) |
Execute AppHandleEventsForBackgroundURLSession() method for all custom ICustomControlable objects.
identifier | The identifier of the URL session requiring attention. |
void Murl::Platform::EngineControl::AppWillTerminate | ( | ) |
Execute AppWillTerminate() method for all custom ICustomControlable objects.
Has to be called if the application will terminate.
void Murl::Platform::EngineControl::FrameUpdate | ( | ) |
Execute FrameUpdate() method for all custom ICustomControlable objects.
Has to be executed in the platform thread context each frame tick.
IPlatformConfiguration* Murl::Platform::EngineControl::GetPlatformConfiguration | ( | ) | const |
Get the platform configuration object.
The platform configuration object is available after calling Init().
IEngineConfiguration* Murl::Platform::EngineControl::GetEngineConfiguration | ( | ) | const |
Get the engine configuration object.
The engine configuration object is available after calling Init().
IAppConfiguration* Murl::Platform::EngineControl::GetAppConfiguration | ( | ) | const |
Get the application configuration object.
The application configuration object is available after calling Init().
IDeviceHandler* Murl::Platform::EngineControl::GetDeviceHandler | ( | ) |
Get the device handler object.
The device handler object is available after calling Init().