2.0.1
Coherent GT
A modern user interface library for games
Coherent::UIGT::SystemSettings Struct Reference

Global settings for the UI system. More...

#include <Coherent/Coherent/UIGT/UISystem.h>

Public Attributes

int DebuggerPort
 Sets the port where the Debugger can connect to inspect the active Views. Set it to <= 0 to disable debugging.
 
const char * InspectorResourcesFolder
 The folder where the Inspector JS resources reside for debugging Can be an absolute path or a path relative to the working folder of the application.
 
ProxySettingsProxyData
 Eventual proxy data. Set to nullptr if no proxy server is available.
 
DiskCacheSettingsDiskCache
 Eventual disk cache settings. If set - the disk cache will be used for data loaded from the network.
 
MemoryManagementGT::IAllocator * MemoryAllocator
 Optional memory allocator. All allocations will go through this object. If no memory allocator is specified, the library will use malloc/free/realloc.
 
LocalizationManagerLocalizationManagerInstance
 Optional localization manager. This object MUST outlive the UISystem. Any HTML element created with the data-l10n-id attribute will get its text content replaced by the value returned from this object's LocalizationManager::Translate method.
 
bool EnableWebSecurity
 Enables cross-origin checks. When enabled cross-origin requests will not work for the coui protocol and require server support for http/https.
 
bool AllowPerformanceWarnings
 If the option is set to 'false', there will be no performance warnings whatsoever, even if a certain View requests performance warnings. If it is set to false, the decision if to emit warnings will depend upon the value set in the ViewInfo::EmitPerformanceWarnings field. More...
 
bool RunAsynchronous
 Starts the system in an asynchronous mode which can greatly enhance performance by running Coherent GT in a separate thread. More...
 
bool ControlTime
 Specifies whether a user callback is executed whenever the current timestamp is required by the UI system. The callback should return the time in seconds since an arbitrary point in time. The returned time is required to be monotonically increasing - in case it isn't, the last known timestamp is used. More...
 
bool EnableVerboseNetworkLogging
 Specifies whether VerboseNetworkLogging should be used and as a result the produced log will contain verbose networking information about operations on every socket handle that is created with that option turned on. Verbose Network logging contains useful information that can help debugging of networking issues. More...
 
bool IgnoreSSLCertificateErrors
 Specifies whether SSL certificate errors are ignored. When the option is set to false, two types of checks are performed: More...
 
const unsigned char * CertificateAuthorities
 The data of a certificate authorities bundle in PEM format. This allows for specifying custom certificate authorities for verifying the peer's certificate when using a SSL connection. More...
 
unsigned int CertificateAuthoritiesLength
 The length in bytes of the data pointed to by CertificateAuthoritiesBytes. More...
 
float AnimationUpdateDefer
 Sets the minimal frame time between animation updates in seconds. Decreasing the number will update animations more often but will consume more CPU. A good figure is around half the frame-rate of the application.
 
bool AllowMultipleRenderingThreads
 Allows usage of UISystemRenderer/ViewRenderer calls from different threads. If not enabled, using rendering methods from different threads produces an error message. More...
 
const char * CookiesResource
 Sets the resource file that will be used for storing cookies. Can be a relative or absolute path to a file. The folder path where the file should be output must be valid. If not set, the default "cookies.dat" name will be used. More...
 
const char * LocalStorageFolder
 Sets the local storage folder. If not set, data is persisted in-memory. More...
 
bool SetRenderingResourcesDebugNames
 Will set debug names on rendering resources. The actual use of these names depends on the rendering backend implementation. Use this for debugging purposes only as it incurs a slight performance penalty.
 
bool LoadSystemFonts
 Enable/disable caching of all font files info from the system folder. Enabled by default.
 
int TestDriverPort
 Sets the port where the TestDriver can connect to automate the active Views. Set it to <= 0 to disable TestDriver. More...
 
const char * TestDriverResourcesFolder
 Sets the folder that contains the "test_driver" folder with resources.
 
const char * SharedLibraryLocation
 Sets where to look for the other shared libraries (CoherentGTCore, CoherentGTJS, etc.) Currently only usable on PS4. More...
 
class FileManipulatorFileManipulatorInstance
 Sets which FileManipulator is to be used. If it's nullptr a default FileManipulator will be used. More...
 
FeatureList EnabledFeatures
 Enable/disable certain system features.
 

Detailed Description

Global settings for the UI system.

Member Data Documentation

◆ AllowMultipleRenderingThreads

bool Coherent::UIGT::SystemSettings::AllowMultipleRenderingThreads

Allows usage of UISystemRenderer/ViewRenderer calls from different threads. If not enabled, using rendering methods from different threads produces an error message.

Note
This option is useful when, for example, the client rendering backend records commands on different threads, that are later executed on a dedicated rendering thread.
In the general use case where the rendering methods are called directly on the client's rendering thread this should be set to false, to warn when incorrect usage is detected.

◆ AllowPerformanceWarnings

bool Coherent::UIGT::SystemSettings::AllowPerformanceWarnings

If the option is set to 'false', there will be no performance warnings whatsoever, even if a certain View requests performance warnings. If it is set to false, the decision if to emit warnings will depend upon the value set in the ViewInfo::EmitPerformanceWarnings field.

Note
It is highly recommended to enable warnings during development, but to disable them in shipped applications.

◆ CertificateAuthorities

const unsigned char* Coherent::UIGT::SystemSettings::CertificateAuthorities

The data of a certificate authorities bundle in PEM format. This allows for specifying custom certificate authorities for verifying the peer's certificate when using a SSL connection.

Note
if the data is non-null, a non-zero value is required for CertificateAuthoritiesLength. If that is not satisfied, this field is ignored.
See http://curl.haxx.se/docs/caextract.html for sample data.
IgnoreSSLCertificateErrors must be disabled, otherwise setting the CA bundle will have no effect, as all SSL connections will be allowed.
the memory block is copied after the UISystem is initialized and can be safely freed.
Warning
This feature is not supported on Xbox One.
See also
CertificateAuthoritiesLength
IgnoreSSLCertificateErrors

◆ CertificateAuthoritiesLength

unsigned int Coherent::UIGT::SystemSettings::CertificateAuthoritiesLength

The length in bytes of the data pointed to by CertificateAuthoritiesBytes.

Note
if the length is non-zero, a non-null pointer is required for CertificateAuthoritiesBytes. If that is not satisfied, this field is ignored.
See also
CertificateAuthorities
IgnoreSSLCertificateErrors

◆ ControlTime

bool Coherent::UIGT::SystemSettings::ControlTime

Specifies whether a user callback is executed whenever the current timestamp is required by the UI system. The callback should return the time in seconds since an arbitrary point in time. The returned time is required to be monotonically increasing - in case it isn't, the last known timestamp is used.

See also
Coherent::UIGT::UISystemListener::GetMonotonicallyIncreasingTime

◆ CookiesResource

const char* Coherent::UIGT::SystemSettings::CookiesResource

Sets the resource file that will be used for storing cookies. Can be a relative or absolute path to a file. The folder path where the file should be output must be valid. If not set, the default "cookies.dat" name will be used.

Note
Only ASCII paths are valid
Warning
No error is reported in case the path is invalid or the resource cannot be used.

◆ EnableVerboseNetworkLogging

bool Coherent::UIGT::SystemSettings::EnableVerboseNetworkLogging

Specifies whether VerboseNetworkLogging should be used and as a result the produced log will contain verbose networking information about operations on every socket handle that is created with that option turned on. Verbose Network logging contains useful information that can help debugging of networking issues.

Warning
using Verbose Network Logging will generate lots of logging information and should not be used in production.
This feature is not supported on Xbox One.

◆ FileManipulatorInstance

class FileManipulator* Coherent::UIGT::SystemSettings::FileManipulatorInstance

Sets which FileManipulator is to be used. If it's nullptr a default FileManipulator will be used.

Note
The file manipulator instance is used when loading fonts. Implementing your custom file manipulator allows you to control font streaming.

◆ IgnoreSSLCertificateErrors

bool Coherent::UIGT::SystemSettings::IgnoreSSLCertificateErrors

Specifies whether SSL certificate errors are ignored. When the option is set to false, two types of checks are performed:

  • First, it's verified that the certificate was issued to the entity you want to connect to, hasn't expired, isn't self signed, etc.
  • Second, it's verified that the entity you want to connect is issued a certificate from a trusted certificate authority (CA), and that it's genuine. This check is done using the client provided CA bundle - if none is provided the check will fail. When the option is set to true, both checks are skipped.
    Warning
    you must set a certificate authorities bundle if you do not ignore SSL errors, otherwise every SSL connection will fail, because there would be nothing to verify it against.
    See also
    CertificateAuthorities
    CertificateAuthoritiesLength

◆ LocalStorageFolder

const char* Coherent::UIGT::SystemSettings::LocalStorageFolder

Sets the local storage folder. If not set, data is persisted in-memory.

Note
the whole path chain will be created automatically, if needed.

◆ RunAsynchronous

bool Coherent::UIGT::SystemSettings::RunAsynchronous

Starts the system in an asynchronous mode which can greatly enhance performance by running Coherent GT in a separate thread.

Note
If this is enabled scripting also becomes asynchronous.
See also
The Detailed Guides/AsyncMode section of the documentation.
Warning
Enabling async mode disables synchronous AJAX requests.

◆ SharedLibraryLocation

const char* Coherent::UIGT::SystemSettings::SharedLibraryLocation

Sets where to look for the other shared libraries (CoherentGTCore, CoherentGTJS, etc.) Currently only usable on PS4.

Warning
Must end with a trailing slash.

◆ TestDriverPort

int Coherent::UIGT::SystemSettings::TestDriverPort

Sets the port where the TestDriver can connect to automate the active Views. Set it to <= 0 to disable TestDriver.

Warning
TestDriver works only in synchronous mode.