This class encapsulates the global Cohtml library. More...
Public Member Functions | |
virtual | ~Library () |
virtual System * | CreateSystem (const SystemSettings &settings)=0 |
Create a Cohtml System that can hold multiple Views. More... | |
virtual void | StopWorkers ()=0 |
Stops all work happening on auxiliary threads. The developer should call this to break the loops in ExecuteResourceWork and ExecuteLayoutWork and then eventually join the threads doing the HB work. More... | |
virtual void | Uninitialize (bool freeGlobalSdkMemory=false)=0 |
Uninitializes the Cohtml library. More... | |
virtual void * | GetFeatureInterface (unsigned featureID)=0 |
Used for acquiring specific feature objects. More... | |
virtual void | ExecuteWork (WorkType type, WorkExecutionMode mode, TaskFamilyId family=COHTML_ANY_TASK_FAMILY_ID)=0 |
Executes Cohtml tasks. Some work in Cohtml has to happen asynchronously which improves performance and the scalability of the solution. The type of work is either Resources (loading, parsing, GC) or Layout. When new work is available, the user is notified through the OnWorkAvailable callback and should make sure that at some point that work is executed. The mode parameter is important to decide if you'll only do some tasks (WEM_UntilQueueEmpty) or use it with a dedicated thread until the Library lives. Using a dedicated thread (WEM_UntilQuit) is simpler, but offers less control. This method can be called on any thread. More... | |
virtual void * | ReservedMethod (void *command, void *data)=0 |
Reserved method for internal usage. Do not use. More... | |
Static Public Member Functions | |
static Library * | Initialize (const char *licenseKey, const LibraryParams ¶ms) |
Initializes the library. More... | |
static Library * | InitializeWithRenderingLibrary (const char *licenseKey, const LibraryParamsWithExternalRenderingLibrary ¶ms, renoir::IRenderingLibrary *renderingLibrary) |
Initializes the library with an externally initialized rendering library. More... | |
static const char * | GetDefaultUserAgent () |
Get default User Agent string which can be used to reset view UA. More... | |
static void | HintThreadUsage (WorkType type) |
This hints Cohtml that the calling thread will be used for certain work. The call is optional and used for profiling purposes only. It is not necessary to call it in a final shipping environment. More... | |
static void | DecodeURLString (const char *url, unsigned urlLen, char *decoded, unsigned *decodedSize) |
Decodes a URL string substituting any URL-encoded characters (%20, %21 etc.) with their ASCII counterparts i.e. 'my%20url.html' -> 'my url.html'. More... | |
This class encapsulates the global Cohtml library.
|
virtual |
|
pure virtual |
Create a Cohtml System that can hold multiple Views.
settings | the system creation parameters |
|
static |
Decodes a URL string substituting any URL-encoded characters (%20, %21 etc.) with their ASCII counterparts i.e. 'my%20url.html' -> 'my url.html'.
url | the url string to decode |
urlLen | the number of characters in the url |
decoded | pointer to the buffer where to copy the decoded string. Can be nullptr in order to query the size of the output |
decodedSize | the length of the decoded string, including the terminating null |
|
pure virtual |
Executes Cohtml tasks. Some work in Cohtml has to happen asynchronously which improves performance and the scalability of the solution. The type of work is either Resources (loading, parsing, GC) or Layout. When new work is available, the user is notified through the OnWorkAvailable callback and should make sure that at some point that work is executed. The mode parameter is important to decide if you'll only do some tasks (WEM_UntilQueueEmpty) or use it with a dedicated thread until the Library lives. Using a dedicated thread (WEM_UntilQuit) is simpler, but offers less control. This method can be called on any thread.
type | Sets the work type to schedule. Layout work shouldn't be executed if the UseDedicatedLayoutThread parameter is false. In that case the Layout will happen in the View::Advance calls. |
mode | Sets the mode to use in the Execution. Note that WEM_UntilQuit will not return until Cohtml itself is uninitialized. |
family | Sets the task family Layout work to execute. Each View has a task family (work only for that) that can be retrieved through View::GetTaskFamilyId. The parameter allows executing work for a specific View, you can also pass COHTML_ANY_TASK_FAMILY_ID, which will execute any Layout work available for all Views. |
|
static |
Get default User Agent string which can be used to reset view UA.
|
pure virtual |
Used for acquiring specific feature objects.
|
static |
This hints Cohtml that the calling thread will be used for certain work. The call is optional and used for profiling purposes only. It is not necessary to call it in a final shipping environment.
type | Sets the work type of this thread. |
|
static |
Initializes the library.
licenseKey | license key provided by Coherent Labs |
params | the initialization parameters of the library. |
|
static |
Initializes the library with an externally initialized rendering library.
licenseKey | license key provided by Coherent Labs |
params | the initialization parameters of the library. |
renderingLibrary | initialized Rendering library to use. |
|
pure virtual |
Reserved method for internal usage. Do not use.
|
pure virtual |
Stops all work happening on auxiliary threads. The developer should call this to break the loops in ExecuteResourceWork and ExecuteLayoutWork and then eventually join the threads doing the HB work.
|
pure virtual |
Uninitializes the Cohtml library.
freeGlobalSdkMemory | frees any global SDK memory |