2.9.16
Coherent GT
A modern user interface library for games
Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary Struct Reference

Global settings for the UI system. More...

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

+ Inheritance diagram for Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary:

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. More...
 
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.
 
bool EnableInternalAllocator
 The internal memory allocator efficiently reuses already allocated memory, which enhances performance at the cost of some memory overhead Enabled by default. More...
 
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.
 
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 LoadSystemFonts
 Enable/disable caching of all font files info from the system folder. Enabled by default.
 
bool EnableAntialiasingForShapesWithFractionalCoordinates
 Enables generation of antialiasing borders for geometry that doesn't have integer coordinates. Jagged edges are eliminated at the cost of drawing more triangles on the GPU.
 
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...
 
FeatureList EnabledFeatures
 Enable/disable certain system features.
 
ThreadWrapperFunction ThreadWrapper
 Sets a wrapper which will be called instead of a thread's function. If it is a nullptr it will be ignored. In the wrapper function at some point you should call the received function with the received argument, i.e. you should call the thread's function. Mainly used in order to do some setup before/after the calling of the thread's function, e.g. to guard it in some "try-catch" block. More...
 
unsigned JSCHeapSize
 Sets the JSC's recommended heap size (in bytes). Be very careful with that option and customize it for your UI if the default value is not suitable. More...
 
bool UseLegacyFontMetrics
 Changes how font metrics are calculated The new font metrics fix vertical misaligned text with some fonts Enable this option if you have already aligned fonts explicitly Disabled by default.
 
void * DeveloperOptions
 Reserved property for internal usage. Do not use it.
 

Detailed Description

Global settings for the UI system.

Member Data Documentation

◆ AllowPerformanceWarnings

bool Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary::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::SystemSettingsWithExternalRenderingLibrary::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::SystemSettingsWithExternalRenderingLibrary::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::SystemSettingsWithExternalRenderingLibrary::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::SystemSettingsWithExternalRenderingLibrary::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.

◆ EnableInternalAllocator

bool Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary::EnableInternalAllocator

The internal memory allocator efficiently reuses already allocated memory, which enhances performance at the cost of some memory overhead Enabled by default.

Note
By disabling the internal allocator Coherent GT will free any unused memory to the client immediatelly, which will reduce the overall memory footprint.

◆ EnableVerboseNetworkLogging

bool Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary::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.

◆ IgnoreSSLCertificateErrors

bool Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary::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

◆ InspectorResourcesFolder

const char* Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary::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.

Warning
This is no longer used as inspector resources are now embedded!

◆ JSCHeapSize

unsigned Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary::JSCHeapSize

Sets the JSC's recommended heap size (in bytes). Be very careful with that option and customize it for your UI if the default value is not suitable.

Note
The heap size is recommended but not mandatory.
If the value is 0 JSC will use it's default heuristics for the heap size.

◆ LocalStorageFolder

const char* Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary::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::SystemSettingsWithExternalRenderingLibrary::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::SystemSettingsWithExternalRenderingLibrary::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::SystemSettingsWithExternalRenderingLibrary::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.

◆ ThreadWrapper

ThreadWrapperFunction Coherent::UIGT::SystemSettingsWithExternalRenderingLibrary::ThreadWrapper

Sets a wrapper which will be called instead of a thread's function. If it is a nullptr it will be ignored. In the wrapper function at some point you should call the received function with the received argument, i.e. you should call the thread's function. Mainly used in order to do some setup before/after the calling of the thread's function, e.g. to guard it in some "try-catch" block.

Warning
The wrapper function must be thread safe.
You must not lock the calling of the thread's function, i.e. you should not lock a mutex before the calling of the thread's function and unlock it when the thread's function finishes.
Note
The wrapping function must be the same for all system settings.
The lifetime of some thread's functions might be very long, e.g. till the end of the program.