docs
Loading...
Searching...
No Matches
Rendererabstract

#include <Ultralight/Renderer.h>

Overview

Core renderer singleton for the library, coordinates all library functions.

The Renderer class is responsible for creating and painting Views, managing Sessions, as well as coordinating network requests, events, JavaScript execution, and more.

Creating the Renderer

Note
A Renderer is created for you when you call App::Create() (access it with App::renderer()).
Note
App::Create() is part of the AppCore API and automatically manages window creation, run loop, input, painting, and most platform-specific functionality. (Available on desktop platforms only)

Defining Platform Handlers

Before creating the Renderer, you should define your platform handlers via the Platform singleton. This can be used to customize file loading, font loading, clipboard access, and other functionality typically provided by the OS.

Default implementations for most platform handlers ship as Zlib-licensed source in the SDK's platform folder. You can use these stock implementations by copying the code into your project, or you can write your own.

At a minimum, you must provide a FileSystem and a FontLoader. Without them, the library exits the process with an error when it first needs them.

Setting Up the Config

You can configure various library options by creating a Config object and passing it to Platform::instance().set_config().

Creating the Renderer

Once you've set up the Platform handlers and Config, you can create the Renderer by calling Renderer::Create(). You should store the result in a RefPtr to keep it alive.

Example creation code
// Get the Platform singleton (maintains global library state)
auto& platform = Platform::instance();
// Setup config
Config my_config;
platform.set_config(my_config);
// Create platform handlers (these are the minimum required)
// (This is pseudo-code, you will need to define your own)
MyFileSystem* file_system = new MyFileSystem();
MyFontLoader* font_loader = new MyFontLoader();
// Setup platform handlers
platform.set_file_system(file_system);
platform.set_font_loader(font_loader);
// Create the Renderer
// Create Views here
static Platform & instance()
Get the Platform singleton.
A nullable smart pointer.
Definition RefPtr.h:126
static RefPtr< Renderer > Create()
Create the core renderer singleton for the library.
Core configuration for the renderer.
Definition Config.h:296

Updating Renderer Logic

You should call Renderer::Update() from your main update loop as often as possible to give the library an opportunity to dispatch events and timers:

Example update code
void mainLoop()
{
while(true)
{
// Update program logic here
renderer->Update();
}
}

Rendering Each Frame

When your program is ready to display a new frame (usually in sync with the monitor's refresh rate), you should call Renderer::RefreshDisplay() and Renderer::Render() so the library can render all active Views as needed.

Animations and smooth scrolling advance with each RefreshDisplay() call. Call it once per frame you present (once per display refresh for a vsynced loop, or once per rendered frame for a vsync-off or variable-refresh game loop).

Example per-frame render code
void displayFrame()
{
// Notify the renderer that the main display has refreshed. This updates animations,
// smooth scrolling, and window.requestAnimationFrame() for all Views on that display.
renderer->RefreshDisplay(0);
// Render all Views as needed
renderer->Render();
// Each View renders to a
// - Pixel-Buffer Surface (View::surface())
// or
// - GPU texture (View::render_target())
// based on whether CPU or GPU rendering is used.
//
// You will need to display the image data here as needed.
}
Inheritance diagram for Renderer:
RefCounted

Static Public Member Functions

static RefPtr< Renderer > Create ()
 Create the core renderer singleton for the library.

Public Member Functions

virtual RefPtr< Session > CreateSession (bool is_persistent, const String &name)=0
 Create a unique, named Session to store browsing data in (cookies, local storage, application cache, indexed db, etc).
virtual RefPtr< Session > default_session ()=0
 Get the default Session.
virtual RefPtr< View > CreateView (uint32_t width, uint32_t height, const ViewConfig &config, RefPtr< Session > session)=0
 Create a new View to load and display web pages in.
virtual void Update ()=0
 Update timers and dispatch callbacks.
virtual void RefreshDisplay (uint32_t display_id)=0
 Notify the renderer that a display has refreshed.
virtual void RefreshDisplay (uint32_t display_id, double target_timestamp)=0
 Notify the renderer that a display has refreshed, and when the resulting frame will be shown.
virtual void PostTask (void(*task)(void *user_data), void *user_data, void(*destroy_user_data)(void *user_data)=nullptr)=0
 Post a task to run on the Renderer's thread during a future call to Update().
virtual void PostDelayedTask (double delay_ms, void(*task)(void *user_data), void *user_data, void(*destroy_user_data)(void *user_data)=nullptr)=0
 Post a task to run on the Renderer's thread once a delay has elapsed.
template<typename F, typename = std::enable_if_t<std::is_invocable_v<std::decay_t<F>&>>>
void PostTask (F &&callback)
 Post a callable to run on the Renderer's thread during a future call to Update().
template<typename F, typename = std::enable_if_t<std::is_invocable_v<std::decay_t<F>&>>>
void PostDelayedTask (double delay_ms, F &&callback)
 Post a callable to run on the Renderer's thread once a delay has elapsed.
virtual void Render ()=0
 Render all active views to their respective render-targets/surfaces.
virtual void RenderOnly (View **view_array, size_t view_array_len)=0
 Render a subset of views to their respective surfaces and render targets.
virtual void Recycle (RecycleMode mode=RecycleMode::Lightweight)=0
 Recycle internal caches and reclaim memory.
virtual void Recycle (RecycleMode mode, CodeDropMode code)=0
 Reclaim memory, choosing how much compiled code to discard.
virtual void CollectNow (CodeDropMode code, bool sync=true)=0
 Collect the JavaScript heap now, leaving rendering and GPU caches intact.
virtual void PurgeMemory ()=0
 Attempt to release as much memory as possible.
virtual void LogMemoryUsage ()=0
 Print detailed memory usage statistics to the log.
virtual String GetMemoryUsage ()=0
 Get formatted memory usage statistics as a string.
virtual void set_system_color_scheme (ColorScheme scheme)=0
 Set the system color scheme that Views report to pages via the prefers-color-scheme CSS media feature.
virtual ColorScheme system_color_scheme () const =0
 The current system color scheme.
virtual bool StartRemoteInspectorServer (const char *address, uint16_t port)=0
 Start the remote inspector server.
virtual void SetGamepadDetails (uint32_t index, const String &id, uint32_t axis_count, uint32_t button_count)=0
 Describe the details of a gamepad, to be used with FireGamepadEvent and related events below.
virtual void FireGamepadEvent (const GamepadEvent &evt)=0
 Fire a gamepad event (connection / disconnection).
virtual void FireGamepadAxisEvent (const GamepadAxisEvent &evt)=0
 Fire a gamepad axis event (to be called when an axis value is changed).
virtual void FireGamepadButtonEvent (const GamepadButtonEvent &evt)=0
 Fire a gamepad button event (to be called when a button value is changed).
virtual bool BeginRenderTrace (const char *output_path, bool verbose=true)=0
 Begin recording a render trace to the specified file path.
virtual void EndRenderTrace ()=0
 End the current render trace.
virtual bool is_render_trace_active () const =0
 Whether or not a render trace is currently being recorded.
virtual void set_gc_listener (GCListener *listener)=0
 Set a GCListener to observe and control the Renderer's JavaScript garbage collections.
virtual GCListener * gc_listener () const =0
 Get the attached GCListener, if any.
virtual GCInfo gc_status () const =0
 Get a snapshot of the current JS-heap reclamation state.
virtual void SetDisplayRefreshRate (uint32_t display_id, double refresh_rate)=0
 Declare a display's refresh rate.
virtual double display_refresh_rate (uint32_t display_id) const =0
 Get the refresh rate declared for a display.
virtual void SetDisplayUsesCustomClock (uint32_t display_id, bool uses_custom_clock)=0
 Declare that a display's refresh timestamps are on your own timeline rather than the system clock.
virtual bool display_uses_custom_clock (uint32_t display_id) const =0
 Get whether a display was declared to use a custom clock.
Public Member Functions inherited from RefCounted
virtual void AddRef () const =0
 Increment the reference count (thread-safe).
virtual void Release () const =0
 Decrement the reference count (thread-safe).
virtual int ref_count () const =0
 Get the current reference count.
virtual WeakControlBlock * weak_control_block () const
 Get the control block used to track weak references to this object.

Protected Member Functions

virtual ~Renderer ()
Protected Member Functions inherited from RefCounted
virtual ~RefCounted ()

Constructor & Destructor Documentation

◆ ~Renderer()

virtual ~Renderer ( )
protectedvirtual

Member Function Documentation

◆ BeginRenderTrace()

virtual bool BeginRenderTrace ( const char * output_path,
bool verbose = true )
pure virtual

Begin recording a render trace to the specified file path.

The trace file captures detailed rendering pipeline diagnostics in Perfetto format, viewable at https://ui.perfetto.dev. This operates independently of the Profiler– both can be active simultaneously.

Parameters
output_pathPath to the output .perfetto-trace file.
verboseIf true, captures detailed annotations in addition to scope timing.
Returns
Returns whether or not the trace started (false if a trace is already active or the trace file can't be opened).
Precondition
Requires the Enterprise edition or higher.

◆ CollectNow()

virtual void CollectNow ( CodeDropMode code,
bool sync = true )
pure virtual

Collect the JavaScript heap now, leaving rendering and GPU caches intact.

Unlike Recycle(), this reclaims only the JavaScript heap. It runs a garbage collection (optionally discarding compiled code, see CodeDropMode) and returns the freed memory to the system. Rendering and GPU caches are left alone, so rendering stays fast.

You can call this from GCListener::OnRequestGC() or at any moment when a short pause won't be noticed (eg, a quiet point in your update loop).

Parameters
codeHow aggressively to discard compiled code (see CodeDropMode).
syncIf true (the default), collect synchronously before returning, briefly blocking the calling thread. If false, start a collection that completes in the background.
Note
If you call this while JavaScript is running (eg, from a JS callback), the collection waits until the script returns, even with sync set to true.
Note
GCListener::OnCollectComplete() fires only for a synchronous collection.
Precondition
Requires the Pro edition or higher.
See also
Recycle(), PurgeMemory(), GCListener::OnRequestGC()

◆ Create()

RefPtr< Renderer > Create ( )
static

Create the core renderer singleton for the library.

You should set up the Platform singleton before calling this function.

Returns
Returns a ref-pointer to a new Renderer instance, or nullptr on failure. Store it in a RefPtr to keep it alive.
Note
You do not need to call this if you're using the App class from AppCore.
Warning
You must define a FontLoader and a FileSystem in the Platform singleton. Without them, the library exits the process with an error when it first needs them.
Warning
You should only create one Renderer during the lifetime of your program.

◆ CreateSession()

virtual RefPtr< Session > CreateSession ( bool is_persistent,
const String & name )
pure virtual

Create a unique, named Session to store browsing data in (cookies, local storage, application cache, indexed db, etc).

Parameters
is_persistentWhether or not to store the session on disk. Persistent sessions are stored in a subfolder of Config::cache_path with this session's name.
nameA unique name for this session.
Returns
Returns a ref-pointer to a new Session instance.
Note
A default, persistent Session is already created for you. You only need to call this if you want a private, in-memory session or a separate session for each View.
Note
The library doesn't check that names are unique: two persistent sessions with the same name share one folder.

◆ CreateView()

virtual RefPtr< View > CreateView ( uint32_t width,
uint32_t height,
const ViewConfig & config,
RefPtr< Session > session )
pure virtual

Create a new View to load and display web pages in.

Views are similar to a tab in a browser. They have certain dimensions but are rendered to an offscreen surface and must be forwarded all input events.

Parameters
widthThe initial width, in pixels.
heightThe initial height, in pixels.
configConfiguration details for the View.
sessionThe session to store local data in. Pass a nullptr to use the default session.
Returns
Returns a ref-pointer to a new View instance.

◆ default_session()

virtual RefPtr< Session > default_session ( )
pure virtual

Get the default Session.

This session is persistent (backed to disk) and has the name "default".

◆ display_refresh_rate()

virtual double display_refresh_rate ( uint32_t display_id) const
pure virtual

Get the refresh rate declared for a display.

Parameters
display_idThe id of the display.
Returns
Returns the display's declared refresh rate (in Hz), or 0 if SetDisplayRefreshRate() was never called for it.

◆ display_uses_custom_clock()

virtual bool display_uses_custom_clock ( uint32_t display_id) const
pure virtual

Get whether a display was declared to use a custom clock.

Parameters
display_idThe id of the display.
Returns
Returns the value last passed to SetDisplayUsesCustomClock() for the display, or false if it was never called.

◆ EndRenderTrace()

virtual void EndRenderTrace ( )
pure virtual

End the current render trace.

The trace file is finished and closed shortly after this returns (on the next Update()).

Precondition
Requires the Enterprise edition or higher.

◆ FireGamepadAxisEvent()

virtual void FireGamepadAxisEvent ( const GamepadAxisEvent & evt)
pure virtual

Fire a gamepad axis event (to be called when an axis value is changed).

Note
The gamepad should be connected via a previous call to FireGamepadEvent.
See also
https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/axes

◆ FireGamepadButtonEvent()

virtual void FireGamepadButtonEvent ( const GamepadButtonEvent & evt)
pure virtual

Fire a gamepad button event (to be called when a button value is changed).

Note
The gamepad should be connected via a previous call to FireGamepadEvent.
See also
https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/buttons

◆ FireGamepadEvent()

virtual void FireGamepadEvent ( const GamepadEvent & evt)
pure virtual

Fire a gamepad event (connection / disconnection).

Note
The gamepad should first be described via SetGamepadDetails before calling this function.
See also
https://developer.mozilla.org/en-US/docs/Web/API/Gamepad

◆ gc_listener()

virtual GCListener * gc_listener ( ) const
pure virtual

Get the attached GCListener, if any.

Returns
Returns the attached listener, or nullptr if none is set.
Precondition
Requires the Pro edition or higher.

◆ gc_status()

virtual GCInfo gc_status ( ) const
pure virtual

Get a snapshot of the current JS-heap reclamation state.

Returns
Returns the current reclamation state (see GCInfo).
Precondition
Requires the Pro edition or higher.

◆ GetMemoryUsage()

virtual String GetMemoryUsage ( )
pure virtual

Get formatted memory usage statistics as a string.

Returns
Returns the same information as LogMemoryUsage(), as a String you can display in a debug overlay or capture programmatically.

◆ is_render_trace_active()

virtual bool is_render_trace_active ( ) const
pure virtual

Whether or not a render trace is currently being recorded.

Precondition
Requires the Enterprise edition or higher.

◆ LogMemoryUsage()

virtual void LogMemoryUsage ( )
pure virtual

Print detailed memory usage statistics to the log.

See also
Platform::set_logger()

◆ PostDelayedTask() [1/2]

template<typename F, typename = std::enable_if_t<std::is_invocable_v<std::decay_t<F>&>>>
void PostDelayedTask ( double delay_ms,
F && callback )
inline

Post a callable to run on the Renderer's thread once a delay has elapsed.

Convenience overload of PostDelayedTask(). See PostTask() for the callable's lifetime.

Parameters
delay_msMinimum delay before the callable may run, in milliseconds.
callbackThe callable to invoke on the Renderer's thread.
Note
Safe to call from any thread.

◆ PostDelayedTask() [2/2]

virtual void PostDelayedTask ( double delay_ms,
void(* task )(void *user_data),
void * user_data,
void(* destroy_user_data )(void *user_data) = nullptr )
pure virtual

Post a task to run on the Renderer's thread once a delay has elapsed.

The clock is the Update() cadence, not a background timer. The task runs during the first Update() at or after the deadline, so delivery waits while Update() is not being called (eg, a paused application).

Tasks whose deadlines fall in the same Update() run in posting order.

Parameters
delay_msMinimum delay before the task may run, in milliseconds.
taskInvoked once on the Renderer's thread with user_data.
user_dataPointer passed through to task (can be nullptr).
destroy_user_dataInvoked exactly once after task runs, or without task running if the Renderer is destroyed first (can be nullptr).
Note
Safe to call from any thread.
See also
PostTask()

◆ PostTask() [1/2]

template<typename F, typename = std::enable_if_t<std::is_invocable_v<std::decay_t<F>&>>>
void PostTask ( F && callback)
inline

Post a callable to run on the Renderer's thread during a future call to Update().

Convenience overload of PostTask(). The callable is invoked once on the Renderer's thread, then destroyed (destroyed without being invoked if the Renderer is destroyed first).

Captures are the natural way to hand data across threads. You should capture by value.

worker_thread.OnFinished([renderer, result] {
renderer->PostTask([result] { ApplyResult(result); });
});
Parameters
callbackThe callable to invoke on the Renderer's thread.
Note
Safe to call from any thread.

◆ PostTask() [2/2]

virtual void PostTask ( void(* task )(void *user_data),
void * user_data,
void(* destroy_user_data )(void *user_data) = nullptr )
pure virtual

Post a task to run on the Renderer's thread during a future call to Update().

You can use this to hand work from your other threads to the thread that drives the Renderer (the only thread that may touch Views and the DOM API).

Tasks run in posting order during the next Update() after they are posted. A task posted while Update() is draining tasks runs at the following Update().

Parameters
taskInvoked once on the Renderer's thread with user_data.
user_dataPointer passed through to task (can be nullptr).
destroy_user_dataInvoked exactly once after task runs, or without task running if the Renderer is destroyed first (can be nullptr).
Note
Safe to call from any thread.
Note
With AppCore, App::PostTask() posts to this same queue and also wakes the app's loop, so prefer it there.

◆ PurgeMemory()

virtual void PurgeMemory ( )
pure virtual

Attempt to release as much memory as possible.

This also discards all compiled JavaScript code, so pages run slower for a while as it's recompiled.

Warning
Don't call this while the Renderer is rendering (eg, from a GPUDriver callback): the rendering caches can't be released then, and are skipped with a warning.

◆ Recycle() [1/2]

virtual void Recycle ( RecycleMode mode,
CodeDropMode code )
pure virtual

Reclaim memory, choosing how much compiled code to discard.

Like Recycle(), but code sets how much compiled code a Full recycle discards. Discarding more frees more memory, but pages run slower for a while as their code is compiled again.

You can use this to shrink the JavaScript footprint at a moment you choose (eg, a loading screen or level transition).

Parameters
modeSee Recycle().
codeHow aggressively to discard compiled code (see CodeDropMode).
Note
With RecycleMode::Lightweight the code parameter has no effect (no collection runs).
Precondition
Requires the Pro edition or higher.
See also
Recycle(), PurgeMemory()

◆ Recycle() [2/2]

virtual void Recycle ( RecycleMode mode = RecycleMode::Lightweight)
pure virtual

Recycle internal caches and reclaim memory.

Note
You normally do not need to call this. The library recycles automatically on a timer (see Config::recycle_delay), and letting it drive recycling is recommended for best performance. Call Recycle() yourself only when you want to control when reclamation happens, for example to force a thorough reclaim during a loading screen or scene transition.
Parameters
modeHow aggressively to reclaim memory:
  • Lightweight: cheap enough to call every frame. This is the same work the automatic recycler performs.
  • Full: a thorough, heavier reclaim best reserved for idle periods or transitions. It can take noticeably longer on a busy page.
See also
PurgeMemory()

◆ RefreshDisplay() [1/2]

virtual void RefreshDisplay ( uint32_t display_id)
pure virtual

Notify the renderer that a display has refreshed.

Call this once per frame you present, for each display (usually right after vsync). It advances animations, smooth scrolling, and window.requestAnimationFrame() for the Views on that display, so they can repaint during the next Render().

Parameters
display_idThe id of the display that refreshed (see ViewConfig::display_id).
Note
Keep calling this even while View::needs_paint() returns false: animations only request a repaint from this call.
Note
Call this on the thread the Renderer was created on.

◆ RefreshDisplay() [2/2]

virtual void RefreshDisplay ( uint32_t display_id,
double target_timestamp )
pure virtual

Notify the renderer that a display has refreshed, and when the resulting frame will be shown.

This works like RefreshDisplay(display_id), but animation time follows your timestamps instead of the wall clock, so animations are timed for the moment the frame reaches the screen.

Parameters
display_idThe id of the display that refreshed.
target_timestampWhen this frame will be shown, in seconds. Use the system's monotonic clock (eg, the target time your display link reports), or your own timeline after calling SetDisplayUsesCustomClock(). Timestamps must never decrease.
Note
performance.now() stays on the wall clock, so pages that compare it to window.requestAnimationFrame() timestamps will see the difference.
See also
SetDisplayRefreshRate(), SetDisplayUsesCustomClock()

◆ Render()

virtual void Render ( )
pure virtual

Render all active views to their respective render-targets/surfaces.

Note
Views are only repainted if they actually need painting.

◆ RenderOnly()

virtual void RenderOnly ( View ** view_array,
size_t view_array_len )
pure virtual

Render a subset of views to their respective surfaces and render targets.

Parameters
view_arrayA C-array containing a list of View pointers.
view_array_lenThe length of the C-array.
Deprecated
Use Render() instead. To stop a View from painting, pause it with View::set_visible(false) (Render() skips hidden Views).
Deprecated
Use Render() instead.

◆ set_gc_listener()

virtual void set_gc_listener ( GCListener * listener)
pure virtual

Set a GCListener to observe and control the Renderer's JavaScript garbage collections.

Parameters
listenerA user-defined GCListener implementation, ownership remains with the caller. Pass a nullptr to detach the current listener.
Note
The listener must outlive the Renderer, or be cleared before the Renderer is destroyed.
Precondition
Requires the Pro edition or higher.
See also
GCListener

◆ set_system_color_scheme()

virtual void set_system_color_scheme ( ColorScheme scheme)
pure virtual

Set the system color scheme that Views report to pages via the prefers-color-scheme CSS media feature.

The library never reads the OS setting itself; the scheme remains Light until this is called. A change re-evaluates prefers-color-scheme media queries in every View whose ViewConfig::preferred_color_scheme is ColorScheme::Auto; Views pinned Light or Dark are unaffected.

Parameters
schemeColorScheme::Light or ColorScheme::Dark. Passing ColorScheme::Auto is invalid here (a warning is logged and the value is ignored).
Note
This is automatically managed for you when App::Create() is used (the OS setting is fed at startup and tracked as it changes).
See also
View::set_preferred_color_scheme()

◆ SetDisplayRefreshRate()

virtual void SetDisplayRefreshRate ( uint32_t display_id,
double refresh_rate )
pure virtual

Declare a display's refresh rate.

Pages see the declared rate through window.requestAnimationFrame() scheduling. Call this when the display's mode changes (eg, a variable-rate display switching between 120 Hz and 48 Hz). Small changes are absorbed, and a change reaches pages at most once a second.

Parameters
display_idThe id of the display.
refresh_rateThe display mode's nominal refresh rate in Hz (eg, 60.0, 59.94, 120.0), or 0 to clear it (the library then measures how often RefreshDisplay() is called).
Note
Call this on the thread the Renderer was created on.
See also
RefreshDisplay()

◆ SetDisplayUsesCustomClock()

virtual void SetDisplayUsesCustomClock ( uint32_t display_id,
bool uses_custom_clock )
pure virtual

Declare that a display's refresh timestamps are on your own timeline rather than the system clock.

By default, the timestamps you pass to RefreshDisplay(display_id, target_timestamp) are treated as readings of the system's monotonic clock. Declare a custom clock when they're on a timeline of your own (eg, a media timeline for offline rendering, or simulation time): animation then follows your timestamps exactly.

Parameters
display_idThe id of the display.
uses_custom_clockTrue if timestamps for this display are on your own timeline.
Precondition
Call this before the display's first timed refresh.
Note
Call this on the thread the Renderer was created on.
See also
RefreshDisplay()

◆ SetGamepadDetails()

virtual void SetGamepadDetails ( uint32_t index,
const String & id,
uint32_t axis_count,
uint32_t button_count )
pure virtual

Describe the details of a gamepad, to be used with FireGamepadEvent and related events below.

This can be called multiple times with the same index if the details change.

Parameters
indexThe gamepad's connection slot, and the array position the page sees: a gamepad described at index 1 arrives as navigator.getGamepads()[1] with gamepad.index 1, leaving slot 0 null. Number your controllers from 0.
idA string ID representing the device, this will be made available in JavaScript as gamepad.id
axis_countThe number of axes on the device.
button_countThe number of buttons on the device.

◆ StartRemoteInspectorServer()

virtual bool StartRemoteInspectorServer ( const char * address,
uint16_t port )
pure virtual

Start the remote inspector server.

While it runs, another Ultralight app (on the same machine or over the network) can inspect this renderer's Views by loading this URL in a View:

inspector://<ADDRESS>:<PORT>
Parameters
addressThe address for the server to listen on (eg, "127.0.0.1")
portThe port for the server to listen on (eg, 9222)
Returns
Returns whether the server started successfully or not.
Precondition
Not available in the Free edition (always returns false there).

◆ system_color_scheme()

virtual ColorScheme system_color_scheme ( ) const
pure virtual

The current system color scheme.

(Default: ColorScheme::Light)

See also
set_system_color_scheme()

◆ Update()

virtual void Update ( )
pure virtual

Update timers and dispatch callbacks.

You should call this as often as you can from your application's run loop.


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