Ultralight  1.0.0
A fast, lightweight, HTML UI engine for native apps.
Platform.h
Go to the documentation of this file.
1 #pragma once
15 #include <Ultralight/Defines.h>
16 
17 namespace ultralight {
18 
19 struct Config;
20 class GPUDriver;
21 class FontLoader;
22 class FileSystem;
23 
37 class UExport Platform {
38  public:
42  static Platform& instance();
43 
44  virtual ~Platform();
45 
49  virtual void set_config(const Config& config) = 0;
50 
54  virtual const Config& config() const = 0;
55 
65  virtual void set_gpu_driver(GPUDriver* gpu_driver) = 0;
66 
70  virtual GPUDriver* gpu_driver() const = 0;
71 
81  virtual void set_font_loader(FontLoader* font_loader) = 0;
82 
86  virtual FontLoader* font_loader() const = 0;
87 
94  virtual void set_file_system(FileSystem* file_system) = 0;
95 
99  virtual FileSystem* file_system() const = 0;
100 };
101 
106 UExport GPUDriver* DefaultGPUDriver();
107 
114 UExport FontLoader* DefaultFontLoader();
115 
116 } // namespace ultralight
UExport GPUDriver * DefaultGPUDriver()
The default GPU driver is an OpenGL driver that paints each View to an offscreen bitmap (.
This is a set of common JavaScriptCore Helper functions to simplify sample code.
Definition: App.h:19
FileSystem interface, used for all file system operations.
Definition: FileSystem.h:73
Configurations settings for Ultralight.
Definition: Config.h:48
GPUDriver interface, dispatches GPU calls to the native driver.
Definition: GPUDriver.h:166
UExport FontLoader * DefaultFontLoader()
The default Font Loader uses the native font loader API for the platform.
Platform singleton to configure Ultralight and provide user-defined implementations for various platf...
Definition: Platform.h:37
Font Loader interface, used for all font lookup operations.
Definition: FontLoader.h:34