Ultralight  1.0.0
A fast, lightweight, HTML UI engine for native apps.
ultralight::Platform Class Referenceabstract

Platform singleton to configure Ultralight and provide user-defined implementations for various platform operations. More...

#include <Platform.h>

Public Member Functions

virtual void set_config (const Config &config)=0
 Set the Config.
 
virtual const Configconfig () const =0
 Get the Config.
 
virtual void set_gpu_driver (GPUDriver *gpu_driver)=0
 Set the GPU Driver (will handle all rendering) More...
 
virtual GPUDrivergpu_driver () const =0
 Get the GPU Driver.
 
virtual void set_font_loader (FontLoader *font_loader)=0
 Set the Font Loader (will be used to map font families to actual fonts) More...
 
virtual FontLoaderfont_loader () const =0
 Get the Font Loader.
 
virtual void set_file_system (FileSystem *file_system)=0
 Set the File System (will be used for all file system operations) More...
 
virtual FileSystemfile_system () const =0
 Get the File System.
 

Static Public Member Functions

static Platforminstance ()
 Get the Platform singleton.
 

Detailed Description

Platform singleton to configure Ultralight and provide user-defined implementations for various platform operations.

Note
All of these settings and user-defined interfaces should be set BEFORE creating the Renderer.

A default GPUDriver and FontLoader are provided, you must provide your own FileSystem interface if you want to load local files.

For more info about the defaults

See also
DefaultGPUDriver and
DefaultFontLoader.

Definition at line 37 of file Platform.h.

Member Function Documentation

◆ set_file_system()

virtual void ultralight::Platform::set_file_system ( FileSystem file_system)
pure virtual

Set the File System (will be used for all file system operations)

Parameters
file_systemA user-defined FileSystem implementation, ownership remains with the caller.

◆ set_font_loader()

virtual void ultralight::Platform::set_font_loader ( FontLoader font_loader)
pure virtual

Set the Font Loader (will be used to map font families to actual fonts)

Parameters
font_loaderA user-defined FontLoader implementation, ownership remains with the caller.
Note
If you never call this, the default font loader will be used instead.
See also
DefaultFontLoader

◆ set_gpu_driver()

virtual void ultralight::Platform::set_gpu_driver ( GPUDriver gpu_driver)
pure virtual

Set the GPU Driver (will handle all rendering)

Parameters
gpu_driverA user-defined GPUDriver implementation, ownership remains with the caller.
Note
If you never call this, the default driver will be used instead.
See also
DefaultGPUDriver

The documentation for this class was generated from the following file: