|
Ultralight C++ API 2.0.0
|
Root namespace for every public Ultralight type, function, and enumeration.
Namespaces | |
| namespace | dom |
| Direct C++ access to modify page elements and handle events. | |
| namespace | js |
| Type-checked JavaScript bridge between C++ and web pages. | |
| namespace | KeyCodes |
| Namespace containing all the key-code definitions for KeyboardEvent. | |
Classes | |
| class | Anchor |
| Placement of a floating panel in a window. More... | |
| class | App |
| Main application singleton (use this if you want to let the library manage window creation). More... | |
| class | AppListener |
| Interface for all App-related events. More... | |
| struct | AudioFormat |
| An audio sample format (channel count and sample rate). More... | |
| class | AudioOutput |
| User-defined audio output interface. More... | |
| struct | BackdropOptions |
| Optional settings for a backdrop material. More... | |
| class | Bitmap |
| A container for pixel data. More... | |
| struct | BitmapFormatInfo |
| Block geometry for a BitmapFormat. More... | |
| class | BitmapSurface |
| The default surface implementation, backed by a bitmap. More... | |
| class | Buffer |
| A fixed-size container for raw byte data. More... | |
| class | Clipboard |
| User-defined clipboard interface. More... | |
| class | ClipboardData |
| Clipboard contents, stored as multiple type representations of the same data. More... | |
| class | ClipboardValue |
| A single clipboard value: empty, UTF-8 text, or raw bytes. More... | |
| class | Color |
| An RGBA color value in a certain color space (with CSS parsing helpers). More... | |
| struct | Command |
| A command to execute on the GPU. More... | |
| struct | CommandList |
| List of commands to execute on the GPU. More... | |
| struct | CompositionRange |
| A range of characters within a composition's text (see CompositionSegment and Editor::SetComposition()). More... | |
| struct | CompositionSegment |
| Styling for one segment of a composition's text (see Editor::SetComposition()). More... | |
| struct | Config |
| Core configuration for the renderer. More... | |
| class | ConsoleMessage |
| Interface for console messages. More... | |
| class | Container |
| A layout node that organizes child nodes into a row or column. More... | |
| struct | ContainerOptions |
| Configuration options for a row or column container. More... | |
| struct | ContainerSpec |
| A container element inside a Build()/BuildLayout() expression. More... | |
| struct | CreateThreadResult |
| Result of creating a new thread. More... | |
| struct | DiagnosticsConfig |
| Diagnostics and logging options. More... | |
| struct | DividerStyle |
| Line thickness, colors, and grab width for draggable pane dividers. More... | |
| class | DownloadListener |
| User-defined interface to handle downloads for a View. More... | |
| struct | EditableState |
| The conditions that decide whether an input method should be active. More... | |
| class | Editor |
| Text-editing interface for a View. More... | |
| class | EditorListener |
| User-defined interface to handle editing events for a View. More... | |
| class | FileSystem |
| User-defined file system interface. More... | |
| class | Flex |
| A share of a container's free space distributed among siblings. More... | |
| class | FontFile |
| Represents a font file, either on-disk path or in-memory file contents. More... | |
| class | FontLoader |
| User-defined font loader interface. More... | |
| class | Foreground |
| Floating layer that displays panels above a window's layout. More... | |
| struct | ForegroundPanelOptions |
| Configuration options for a floating panel. More... | |
| class | GamepadAxisEvent |
| Event representing a change in gamepad axis state (eg, pressing a stick in a certain direction). More... | |
| class | GamepadButtonEvent |
| Event representing a change in gamepad button state (eg, pressing a button on a gamepad). More... | |
| class | GamepadEvent |
| Event representing a change in gamepad connection state. More... | |
| struct | GCInfo |
| A snapshot of the JavaScript heap's state (see Renderer::gc_status()). More... | |
| class | GCListener |
| User-defined interface to observe and control the Renderer's JavaScript garbage collections. More... | |
| struct | GPUDeviceCaps |
| Optional capabilities reported by a GPUDriver. More... | |
| class | GPUDriver |
| User-defined GPU driver interface. More... | |
| struct | GPUMemoryStats |
| GPU memory statistics reported by the App's GPU driver. More... | |
| struct | GPUState |
| The state of the GPU for a given draw command. More... | |
| struct | HitTestRegion |
| An area of a custom-chrome window and what it does. More... | |
| struct | HolderTraits |
| Traits template that lets the library hold objects through custom smart pointers. More... | |
| class | ImageSource |
| User-defined image source to display custom images on a web-page. More... | |
| class | ImageSourceListener |
| Listener for ImageSource events. More... | |
| class | ImageSourceProvider |
| Maps image sources to string identifiers. More... | |
| class | ImageSourceProviderListener |
| Listener for ImageSourceProvider events. More... | |
| struct | IndexBuffer |
| Index buffer description. More... | |
| struct | InsertPosition |
| Position relative to an existing sibling in a container. More... | |
| struct | IntRect |
| Integer Rectangle Helper. More... | |
| struct | is_string_type |
| Trait to check if a type is a supported string-like type. More... | |
| struct | is_string_type< const char * > |
| struct | is_string_type< std::string > |
| struct | is_string_type< std::string_view > |
| struct | is_string_type< String > |
| class | JSContext |
| This class wraps a JSContextRef (a JavaScript execution context for use with JavaScriptCore) and locks the context on the current thread for the duration of its lifetime. More... | |
| class | JSON |
| JSON document or value for structured data. More... | |
| class | JSONArray |
| A view of a JSON array. More... | |
| class | JSONObject |
| Typed view of a JSON object for checking keys and stepping through its members. More... | |
| class | KeyEvent |
| Keyboard event representing a change in keyboard state. More... | |
| class | LayoutCallback |
| Scoped handle that controls how long a layout callback stays registered. More... | |
| class | LayoutNode |
| Base class for Panels and Containers in a window layout tree. More... | |
| class | Length |
| A distance or size constraint in an AppCore layout. More... | |
| class | LoadListener |
| User-defined interface to handle load-related events for a View. More... | |
| class | Lock |
| Lightweight mutex optimized for short locking periods. More... | |
| class | LockedPixels |
| Forward declaration for the LockedPixels class. More... | |
| class | Logger |
| User-defined logging interface. More... | |
| struct | Matrix |
| Transformation Matrix helper. More... | |
| struct | Matrix4x4 |
| 4x4 Matrix Helper More... | |
| class | Monitor |
| A platform-specific monitor. More... | |
| class | MouseEvent |
| Mouse event representing a change in mouse state. More... | |
| class | NetworkListener |
| User-defined interface to handle network requests for a View. More... | |
| class | NetworkRequest |
| Interface for Network requests. More... | |
| class | OriginRules |
| A list of origin patterns that controls which pages get an attached API. More... | |
| class | Panel |
| A layout node that hosts a single web view. More... | |
| struct | PanelOptions |
| Configuration options for a panel in a row or column. More... | |
| struct | PanelSpec |
| A panel element inside a Build()/BuildLayout() expression. More... | |
| class | Platform |
| Global platform singleton, manages user-defined platform handlers and global config. More... | |
| class | Profiler |
| User-defined profiling interface. More... | |
| struct | Rect |
| Float Rectangle Helper. More... | |
| class | RefCounted |
| Interface for all ref-counted objects that will be managed using the RefPtr<> smart pointer. More... | |
| class | RefCountedImpl |
| class | RefPtr |
| A nullable smart pointer. More... | |
| struct | RenderBuffer |
| Render buffer description. More... | |
| class | Renderer |
| Core renderer singleton for the library, coordinates all library functions. More... | |
| struct | RenderTarget |
| Offscreen render target, used when rendering Views via the GPU renderer. More... | |
| struct | RoundedRect |
| Rounded Rectangle Helper. More... | |
| class | ScrollEvent |
| Scroll event representing a change in scroll state. More... | |
| class | Session |
| Storage for a browsing session (cookies, local storage, etc.). More... | |
| struct | Settings |
| App-specific settings. More... | |
| class | Size |
| Fixed, percentage, and flexible sizes for panels and containers. More... | |
| class | String |
| Unicode string container with conversions for UTF-8, UTF-16, and UTF-32. More... | |
| class | String16 |
| A null-terminated UTF-16 string container. More... | |
| class | String16Vector |
| A UTF-16 string vector. More... | |
| class | String32 |
| A null-terminated UTF-32 string container. More... | |
| class | String8 |
| A null-terminated UTF-8 string container. More... | |
| class | Surface |
| User-defined pixel buffer surface. More... | |
| class | SurfaceFactory |
| User-defined factory to provide your own surface implementation. More... | |
| class | ThreadFactory |
| User-defined factory for creating new threads. More... | |
| class | TimerHandle |
| Handle to a repeating timer created with App::SetInterval(). More... | |
| class | URL |
| Parsed web address. More... | |
| struct | vec2 |
| 2D Vector Helper More... | |
| struct | vec3 |
| 3D Vector Helper More... | |
| struct | vec4 |
| 4D Vector Helper More... | |
| class | Vector |
| A std::vector-like container with small buffer optimization and ABI-safe allocation. More... | |
| struct | Vertex_2f_2ui |
| Vertex layout for instance vertices. More... | |
| struct | Vertex_2f_4ub_2f |
| Vertex layout for path vertices. More... | |
| struct | Vertex_2f_4ub_2f_2f_28f |
| Vertex layout for quad vertices. More... | |
| struct | VertexBuffer |
| Vertex buffer description. More... | |
| class | View |
| Web-page container rendered to an offscreen surface. More... | |
| struct | ViewConfig |
| View-specific configuration settings. More... | |
| class | ViewListener |
| User-defined interface to handle general events for a View. More... | |
| class | WeakControlBlock |
| Internal bookkeeping object that tracks the liveness of a weakly-referenced object. | |
| class | WeakPtr |
| A weak (non-owning) smart pointer that observes a WeakRefCounted object. More... | |
| class | WeakRefCounted |
| Interface for ref-counted objects that can additionally be observed via the WeakPtr<> smart pointer. More... | |
| class | Window |
| A native OS window that displays web content. More... | |
| class | WindowListener |
| Interface for all Window-related events. More... | |
Concepts | |
| concept | BitmaskEnum |
| Whether or not a scoped enum has opted into the bitmask operators below by declaring consteval void ul_enable_bitmask_operators(E); beside its definition (found by argument-dependent lookup). | |
| concept | LayoutBuildable |
| A builder element (see <AppCore/layout/Builder.h>): anything that can append itself to a container. | |
Typedefs | |
| typedef void(*) | LayoutDestroyUserDataCallback(void *user_data) |
| Destroy hook for a callback registration's user data. | |
| typedef void(*) | LayoutNodeCallback(void *user_data, LayoutNode *node) |
| Callback fired for a layout node event. | |
| typedef void(*) | LayoutPanelCallback(void *user_data, Panel *panel) |
| Callback fired for a panel event. | |
| typedef void(*) | LayoutFocusCallback(void *user_data, Window *window, Panel *focused) |
| Callback fired when a window's focused panel changes. | |
| typedef void(*) | LayoutEditableStateCallback(void *user_data, Window *window, Panel *panel, const EditableState &state) |
| Callback fired when the focused panel's editable state changes. | |
| typedef void(*) | LayoutOverrideCallback(void *user_data, Container *container, Rect content_box) |
| Layout delegate, called to place a container's children yourself. | |
| typedef void(*) | DestroyBitmapCallback(void *user_data, void *data) |
| Function signature for a user-defined destruction callback to be optionally called when the Bitmap is destroyed. | |
| typedef void(*) | DestroyBufferCallback(void *user_data, void *data) |
| Function signature for a user-defined destruction callback to optionally be called when Buffer is destroyed. | |
| typedef vec2 | Point |
| Point is typedef'd to a 2D vector. | |
| typedef uint32_t | DownloadId |
| A unique ID for a download (see DownloadListener::NextDownloadId()). | |
| using | LockHolder = std::lock_guard<Lock> |
| using | AudioStreamFormat = AudioFormat |
| The format of a new audio stream (the same as AudioFormat). | |
| typedef uint32_t | IndexType |
| Vertex index type. | |
| typedef uint32_t | ThreadId |
| Unique id of the thread, used for referencing the created thread later. | |
| typedef uint64_t | ThreadHandle |
| Platform-specific handle. | |
| typedef void(*) | ThreadEntryPoint(void *) |
| Entry point for the thread, this function should be called by the thread once it is active and should be passed entry_point_data as the argument. | |
| typedef detail::selector< sizeof(wchar_t)>::Char16 | Char16 |
| We use wchar_t if size == 2, otherwise use char16_t. | |
Functions | |
| template<BitmaskEnum T> | |
| constexpr T | operator| (T a, T b) |
| template<BitmaskEnum T> | |
| constexpr T | operator& (T a, T b) |
| template<BitmaskEnum T> | |
| constexpr T | operator^ (T a, T b) |
| template<BitmaskEnum T> | |
| constexpr T | operator~ (T a) |
| template<BitmaskEnum T> | |
| constexpr T & | operator|= (T &a, T b) |
| template<BitmaskEnum T> | |
| constexpr T & | operator&= (T &a, T b) |
| template<BitmaskEnum T> | |
| constexpr T & | operator^= (T &a, T b) |
| template<BitmaskEnum T> | |
| constexpr bool | HasFlag (T flags, T bits) |
| Whether or not every bit in bits is set in flags. | |
| ButtonResult | ShowMessageBox (const String &title, const String &message, DialogIcon icon=DialogIcon::Info, ButtonType buttons=ButtonType::OK) |
| Show a modal message box with the specified title, message, icon, and buttons. | |
| PanelSpec | panel (PanelOptions options={}, RefPtr< Panel > *out=nullptr) |
| Describe a panel in a builder expression (see Builder.h for an example). | |
| template<typename... Children> requires (LayoutBuildable<Children> && ...) | |
| ContainerSpec< Children... > | row (ContainerOptions options, Children... children) |
| Describe a row container with child elements. | |
| template<typename... Children> requires (LayoutBuildable<Children> && ...) | |
| ContainerSpec< Children... > | row (ContainerOptions options, RefPtr< Container > *out, Children... children) |
| Describe a row container, capturing the created handle in out. | |
| template<typename... Children> requires (LayoutBuildable<Children> && ...) | |
| ContainerSpec< Children... > | column (ContainerOptions options, Children... children) |
| Describe a column container with child elements. | |
| template<typename... Children> requires (LayoutBuildable<Children> && ...) | |
| ContainerSpec< Children... > | column (ContainerOptions options, RefPtr< Container > *out, Children... children) |
| Describe a column container, capturing the created handle in out. | |
| InsertPosition | Before (RefPtr< LayoutNode > anchor) |
| Create an insertion position immediately before a sibling. | |
| InsertPosition | After (RefPtr< LayoutNode > anchor) |
| Create an insertion position immediately after a sibling. | |
| FontLoader * | GetPlatformFontLoader () |
| Get the native font loader for the current platform. | |
| FileSystem * | GetPlatformFileSystem (const String &baseDir) |
| Get the native file system for the current platform, creating it if it doesn't exist using the base directory provided. | |
| Logger * | GetDefaultLogger (const String &logPath) |
| Get the default logger (writes the log to a file on disk). | |
| BitmapFormatInfo | GetBitmapFormatInfo (BitmapFormat format) |
| Get the block geometry for a given BitmapFormat. | |
| bool | IsCompressedFormat (BitmapFormat format) |
| Whether or not a given BitmapFormat is block-compressed (a BCn format). | |
| void | GetKeyIdentifierFromVirtualKeyCode (int virtual_key_code, String &key_identifier_result) |
| Utility function for generating a key identifier string from a virtual key-code. | |
| void | GetKeyFromVirtualKeyCode (int virtual_key_code, bool shift, String &key_result) |
| Utility function for generating a key string from a virtual key-code. | |
| bool | operator== (const Matrix &a, const Matrix &b) |
| bool | operator!= (const Matrix &a, const Matrix &b) |
| bool | operator== (const Matrix4x4 &a, const Matrix4x4 &b) |
| bool | operator!= (const Matrix4x4 &a, const Matrix4x4 &b) |
| Profiler * | CreateProfilerPerfetto (const char *path) |
| Create a Profiler implementation that writes Perfetto binary traces (.perfetto-trace). | |
| void | DestroyProfilerPerfetto (Profiler *profiler) |
| Destroy a Profiler created by CreateProfilerPerfetto. | |
| SurfaceFactory * | GetBitmapSurfaceFactory () |
| Get the default Bitmap Surface Factory singleton. | |
| template<typename T> | |
| RefPtr< T > | AdoptRef (T &reference) |
| Helper for wrapping new objects with the RefPtr smart pointer. | |
| template<typename T, typename... Args> | |
| RefPtr< T > | MakeRefPtr (Args &&... args) |
| Construct a new object of type T and wrap it in a RefPtr. | |
| template<class T> | |
| void | swap (RefPtr< T > &a, RefPtr< T > &b) |
| template<class T> | |
| void | swap (WeakPtr< T > &a, WeakPtr< T > &b) |
| template<typename T, typename U> | |
| bool | operator== (const RefPtr< T > &a, const RefPtr< U > &b) |
| template<typename T, typename U> | |
| bool | operator== (const RefPtr< T > &a, const U *b) |
| template<typename T, typename U> | |
| bool | operator== (const T *a, const RefPtr< U > &b) |
| template<typename T, typename U> | |
| bool | operator!= (const RefPtr< T > &a, const RefPtr< U > &b) |
| template<typename T, typename U> | |
| bool | operator!= (const RefPtr< T > &a, const U *b) |
| template<typename T, typename U> | |
| bool | operator!= (const T *a, const RefPtr< U > &b) |
| template<typename To = void, typename From> | |
| auto | Convert (const From &from) |
| Convert between string types. | |
| template<typename T, size_t N> | |
| void | swap (Vector< T, N > &a, Vector< T, N > &b) |
| using AudioStreamFormat = AudioFormat |
The format of a new audio stream (the same as AudioFormat).
| typedef detail::selector<sizeof(wchar_t)>::Char16 Char16 |
We use wchar_t if size == 2, otherwise use char16_t.
| typedef void(*) DestroyBitmapCallback(void *user_data, void *data) |
Function signature for a user-defined destruction callback to be optionally called when the Bitmap is destroyed.
| user_data | Pointer to user-defined user-data (this will be the same value as what was passed to Bitmap::Create, if any) |
| data | Pointer to raw Bitmap pixel data. |
| typedef void(*) DestroyBufferCallback(void *user_data, void *data) |
Function signature for a user-defined destruction callback to optionally be called when Buffer is destroyed.
Users can use this to deallocate any data associated with the Buffer.
| user_data | Pointer to user-defined user-data (this will be the same value as what was passed to Buffer::Create, if any) |
| data | Pointer to raw Buffer data. |
| typedef uint32_t DownloadId |
A unique ID for a download (see DownloadListener::NextDownloadId()).
| typedef uint32_t IndexType |
Vertex index type.
| typedef void(*) LayoutDestroyUserDataCallback(void *user_data) |
Destroy hook for a callback registration's user data.
| user_data | The user data you passed to the registration method. |
| typedef void(*) LayoutEditableStateCallback(void *user_data, Window *window, Panel *panel, const EditableState &state) |
Callback fired when the focused panel's editable state changes.
| user_data | The user data you passed to the registration method. |
| window | The window the state belongs to. |
| panel | The panel the state describes (can be null when nothing holds panel focus). |
| state | The new editable state. |
Callback fired when a window's focused panel changes.
| user_data | The user data you passed to the registration method. |
| window | The window whose focus changed. |
| focused | The newly focused panel (can be null when nothing holds panel focus). |
| typedef void(*) LayoutNodeCallback(void *user_data, LayoutNode *node) |
Callback fired for a layout node event.
| user_data | The user data you passed to the registration method. |
| node | The node the event is for. |
Layout delegate, called to place a container's children yourself.
| user_data | The user data you passed to the registration method. |
| container | The container being laid out. |
| content_box | The container's content box, in container-local logical pixels. |
Callback fired for a panel event.
| user_data | The user data you passed to the registration method. |
| panel | The panel the event is for. |
| using LockHolder = std::lock_guard<Lock> |
| typedef void(*) ThreadEntryPoint(void *) |
Entry point for the thread, this function should be called by the thread once it is active and should be passed entry_point_data as the argument.
| typedef uint64_t ThreadHandle |
Platform-specific handle.
| typedef uint32_t ThreadId |
Unique id of the thread, used for referencing the created thread later.
|
strong |
Cross-axis alignment of a floating panel against its anchor rect.
| Enumerator | |
|---|---|
| Start | |
| Center | |
| End | |
|
strong |
|
strong |
Fit behavior when an anchored floating panel does not fit on its preferred side.
| Enumerator | |
|---|---|
| None | |
| Flip | |
|
strong |
The native backdrop materials a window can use.
Choose the material that matches what your window is (a main window, a menu, or an overlay). The OS decides how each one looks.
| Enumerator | |
|---|---|
| None | No material. |
| Window | For a main window. |
| Popup | For menus, dropdowns, and other flyouts. |
| Overlay | For heads-up panels and on-screen displays (eg, a volume indicator). |
|
strong |
The style of an opaque BackdropMaterial::Window.
Only Windows has more than one: most windows use the standard style, and Windows' own tabbed apps (eg, File Explorer) use a more colorful one. Other platforms ignore this.
| Enumerator | |
|---|---|
| Auto | The platform default (Standard). |
| Standard | The style most windows use. |
| Vivid | The more colorful style, with more of the wallpaper's color. |
|
strong |
Whether a backdrop material shows its active or inactive look.
| Enumerator | |
|---|---|
| FollowWindow | Match the window: the active look while the window is active. |
| Active | Always show the active look. |
| Inactive | Always show the inactive look. |
|
strong |
The light or dark look of a backdrop material.
| Enumerator | |
|---|---|
| Auto | Follow the OS theme. |
| Light | Always use the light look. |
| Dark | Always use the dark look. |
|
strong |
The look of a backdrop material.
| Enumerator | |
|---|---|
| Auto | The platform's usual look for the material. |
| Frosted | Translucent: a live blur of what's behind the window. |
| Matte | Opaque: tinted by the desktop wallpaper and theme. |
|
strong |
The various Bitmap formats.
| Enumerator | |
|---|---|
| A8_UNORM | Alpha channel only, 8-bits per pixel. Encoding: 8-bits per channel, unsigned normalized. Color-space: Linear (no gamma), alpha-coverage only. |
| BGRA8_UNORM_SRGB | Blue Green Red Alpha channels, 32-bits per pixel. Encoding: 8-bits per channel, unsigned normalized. Color-space: sRGB gamma with premultiplied linear alpha channel. |
| RG8_UNORM | Red Green channels, 16-bits per pixel. Encoding: 8-bits per channel, unsigned normalized. Color-space: Linear (no gamma). Not PNG-encodable. |
| BC1_UNORM | BC1 block-compressed color (4x4 blocks, 8 bytes/block). Optional 1-bit alpha. Color-space: sRGB gamma with optional alpha. |
| BC2_UNORM | BC2 block-compressed color (4x4 blocks, 16 bytes/block). Explicit 4-bit alpha. Color-space: sRGB gamma with premultiplied alpha. |
| BC3_UNORM | BC3 block-compressed color (4x4 blocks, 16 bytes/block). Interpolated alpha. Color-space: sRGB gamma with premultiplied alpha. |
| BC7_UNORM | BC7 block-compressed color (4x4 blocks, 16 bytes/block). High-quality RGB(A). Color-space: sRGB gamma with premultiplied alpha. |
| RGBA16F | Four half-precision float channels (16 bits per channel, 64 bits per pixel). This is a raw data format: GPUDriver should create these as sampleable textures without filtering or mipmaps and upload rows exactly as stored. |
| RGBA16UI | Four unsigned integer channels (16 bits per channel, 64 bits per pixel). This is a raw data format: GPUDriver should create these as sampleable textures without filtering or mipmaps and upload rows exactly as stored. |
| RGBA32F | Four float channels (32 bits per channel, 128 bits per pixel). This is a raw data format: GPUDriver should create these as sampleable textures without filtering or mipmaps and upload rows exactly as stored. |
|
strong |
Mathematical operations for combining source and destination colors during blending.
This defines how the GPU combines the weighted source and destination colors after they've been multiplied by their respective blend factors.
|
strong |
Blend factors that define how source and destination colors are weighted during blending.
These factors control how much the source color (from the pixel shader) and destination color (from the render buffer) contribute to the final blended result.
For each color channel, the blend equation combines colors as: Result = (SourceColor * SourceFactor) [op] (DestColor * DestFactor) where [op] is defined by BlendEquation.
|
strong |
|
strong |
|
strong |
|
strong |
How much compiled JavaScript code a collection discards.
Compiled code keeps some JavaScript objects alive, so discarding it lets a collection free more memory. Pages then run slower for a while as their code is compiled again.
|
strong |
A page color scheme, as reported to pages via the prefers-color-scheme CSS media feature.
| Enumerator | |
|---|---|
| Auto | Follow the system color scheme set on the Renderer. |
| Light | Always report a light color scheme. |
| Dark | Always report a dark color scheme. |
|
strong |
The types of commands.
This enumeration describes the type of command to execute on the GPU.
| Enumerator | |
|---|---|
| ClearRenderBuffer | Clear the specified render buffer. |
| DrawGeometry | Draw the specified geometry to the specified render buffer. |
| Flush | Submit pending GPU work before executing the next command. Emitted before the library draws into a render buffer whose texture was sampled by earlier draws in the same command list. What to do:
|
|
strong |
The window's corner style.
By default, framed windows, custom-chrome windows, and popups get rounded corners, and other transparent windows get square ones. Linux leaves corners to the window manager.
| Enumerator | |
|---|---|
| Default | The platform's usual corners for this kind of window. |
| Rounded | Rounded corners. |
| Square | Square corners. |
| enum Cursor |
The mouse cursor types (see ViewListener::OnChangeCursor()).
|
strong |
How much checking and warning the library does for mistakes made through one of its APIs.
Warnings go to the Logger at LogLevel::Warning, tagged with the API they came from (eg, [js], [dom], [data]), and to the page's console when a page is involved.
| Enumerator | |
|---|---|
| Off | No per-operation warnings (a mistake the library only finds once, like an invalid setup call, still warns). |
| Warn | Development warnings about each mistake as it happens. |
| Strict | Everything Warn reports, plus stricter checks (eg, a lossy argument conversion in a JavaScript binding becomes a TypeError, and every DOM call on an empty handle warns). |
| Auto | Warn when DiagnosticsConfig::developer_mode is on, Off when it's off. |
|
strong |
|
strong |
|
strong |
The kind of element that holds keyboard focus (see EditableState).
|
strong |
The editing commands you can run with Editor::Execute().
Most commands act on editable text (a text field or an editable region). Copy, SelectAll, and the selection commands (the AndModifySelection forms, SelectWord, SelectLine, SelectParagraph, and Unselect) also work on a selection in regular page content.
Every caret motion has an AndModifySelection form that extends the selection instead of moving the caret (the Shift-key behavior).
|
strong |
The quality level for rendering effects (CSS filters, shadows, blurs, etc.).
The level trades the fidelity of large blurs and shadows for speed: lower levels process them at more aggressively reduced resolutions and with a tighter blur falloff.
|
strong |
|
strong |
|
strong |
Keyboard focus policy for a floating panel.
| Enumerator | |
|---|---|
| Auto | Takes focus when clicked, like any panel. Showing the panel never takes focus. |
| Grab | Takes keyboard focus when created (unless hidden) and each time it is shown, even from inside a click handler (dropdowns, palettes, in-window dialogs). |
| None | Never takes keyboard focus. Calling Panel::Focus() on it is ignored with a warning (toasts, HUDs). |
|
strong |
How antialiased glyph edges are blended into the page.
|
strong |
The font hinting algorithm to use when rendering glyphs.
| Enumerator | |
|---|---|
| Smooth | Lighter hinting algorithm– glyphs are slightly fuzzier but better resemble their original shape. This is achieved by snapping glyphs to the pixel grid only vertically which better preserves inter-glyph spacing. |
| Normal | Let the font profile choose– Config::font_profile picks the hinting that suits its appearance, which for every profile but FontProfile::Light means no hinting (Light keeps light, vertical-only hinting). |
| Monochrome | Strongest hinting algorithm– outputs only black/white glyphs. The result is usually unpleasant if the underlying TTF does not contain hints for this type of rendering. |
| None | No hinting is performed– fonts may be blurry at smaller font sizes. |
|
strong |
The font-appearance preset that provides default values for the text rendering knobs (Config::font_blend_mode, Config::font_gamma, Config::font_contrast, Config::font_stem_darkening, Config::font_embolden, and the hinting behind FontHinting::Normal).
Knobs you set explicitly override the preset's values.
| enum GPUCompressedFormat : uint32_t |
Optional GPU compressed-texture format families.
Each value is a single bit within GPUDeviceCaps::compressed_formats. A driver sets a bit to advertise that it can accept a Bitmap in any of that family's formats in CreateTexture() and sample it directly (the GPU decompresses the blocks in hardware on read).
| Enumerator | |
|---|---|
| kGPUCompressedFormat_BC1_BC3 | BC1, BC2, and BC3 (also known as DXT1 / DXT3 / DXT5). |
| kGPUCompressedFormat_BC7 | BC7. |
| enum GPUTextureFlags : uint32_t |
Flags passed to GPUDriver::CreateTexture() that tell your driver how a texture will be used.
They are combined with bitwise OR; test the bits your driver supports.
| Enumerator | |
|---|---|
| kGPUTextureFlag_RenderTarget | The texture is a render target (the backing texture for a RenderBuffer). Create it so you can both render into and sample from it. The supplied bitmap is empty (dimensions and format only), so there's nothing to upload at texture creation. Most render targets are BGRA (BitmapFormat::BGRA8_UNORM_SRGB). A render target may also be single-channel (BitmapFormat::A8_UNORM): back it with a renderable one-channel format (R8 on modern graphics APIs) so that sampling it returns the stored value in the RED channel. Do not apply the alpha swizzle that sampled (non-render-target) A8 textures traditionally carry; the library's shaders read a single-channel render target's red channel directly. Single-channel render targets are only ever drawn with blending disabled and are never multisampled. |
| kGPUTextureFlag_Antialiased | The render target should be multisampled (antialiased), resolved to a single-sample texture when sampled. You will only receive this flag if your driver reports GPUDeviceCaps::supports_msaa from GetDeviceCaps(). |
| kGPUTextureFlag_Immutable | The texture is uploaded once and never changes. UpdateTexture() is never called on it, so you may use immutable/static storage and need not keep it CPU-writable. |
|
strong |
What a hit-test region does.
|
strong |
Whether a holder shares ownership of a bound-class instance or owns it alone.
| Enumerator | |
|---|---|
| Shared | Copies share ownership (eg, RefPtr), or the instance is never destroyed (js::Eternal). |
| Exclusive | One holder owns the instance and ownership moves (eg, std::unique_ptr). Returning one to JavaScript leaves it empty, and it can't be a bound parameter. |
|
strong |
|
strong |
The severity of a log message, from most to least severe.
| Enumerator | |
|---|---|
| Fatal | The application can't continue (eg, a failed device or startup, missing ICU data, or a required platform interface that wasn't set). |
| Error | A failure the library recovers from (eg, a resource that failed to load). |
| Warning | A problem or diagnostic that isn't a failure (eg, a misused API call). |
| Info | Status information. |
| Debug | Verbose detail (not sent unless you lower DiagnosticsConfig::min_log_level to Debug). |
|
strong |
Memory vs.
performance tuning for HTML5 <video> and <audio>.
Pick the profile that matches your target's resource envelope; the engine will tune internal media-pipeline sizing accordingly. The effect of each profile is described on the enumerator below.
The profile is read once when each media element starts loading. Changing Config::media_profile after a <video> or <audio> element is already loading does not affect that element; subsequent elements will pick up the new profile.
|
strong |
Memory vs.
performance tuning for the renderer's HTML / JavaScript engine heaps.
The profile governs how aggressively the library returns freed heap memory to the operating system, how it balances allocation speed against memory footprint, and how much backing-store memory the compositor keeps per View. The effect of each profile is described on the enumerator below.
The profile is read when the Renderer is created and again by each View at its creation; changing Config::memory_profile afterward affects only Views created later.
| enum MessageLevel |
MessageLevel types.
| Enumerator | |
|---|---|
| kMessageLevel_Log | |
| kMessageLevel_Warning | |
| kMessageLevel_Error | |
| kMessageLevel_Debug | |
| kMessageLevel_Info | |
| enum MessageSource |
MessageSource types.
| enum MessageType |
The type of console message (corresponds to the console API method that triggered it).
|
strong |
Controls how aggressively Renderer::Recycle() reclaims memory.
|
strong |
The edge or corner to resize a window from.
| Enumerator | |
|---|---|
| Left | |
| Top | |
| Right | |
| Bottom | |
| TopLeft | |
| TopRight | |
| BottomLeft | |
| BottomRight | |
|
strong |
Shader program types.
Each of these correspond to a vertex/pixel shader pair. Stock shaders for every program ship in the SDK's platform/shaders folder, in a compiled or generated form for each backend (DXBC, SPIR-V, MSL, and GLSL).
A conforming GPUDriver implements every program in this enumeration; the library does not query for per-program support.
| Enumerator | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Fill | Shader program for filling quad geometry. | ||||||||||||||||||||
| FillPath | Shader program for filling tessellated path geometry. | ||||||||||||||||||||
| FilterBasic | Shader program for basic CSS/SVG filters. | ||||||||||||||||||||
| FilterBlur | Shader program for blur CSS/SVG filters. | ||||||||||||||||||||
| FilterDropShadow | Shader program for drop-shadow CSS/SVG filters. | ||||||||||||||||||||
| FillPhoton | Shader program for analytic vector rendering (Photon). Uses the quad vertex layout. Photon draws carry data pages in the GPUState texture slots and read them with texel loads only. Bind each slot unfiltered, no mipmaps, at the register the shipped shader source declares:
The index page has its own slot and register because it needs an integer (uint4) texture view; it must never share a binding point with the float views other programs use. Every driver must support this program alongside the others; there is no capability query for it. | ||||||||||||||||||||
| FillPhotonGrid | Shader program for grid-based analytic vector rendering (Photon). Uses the Vertex_2f_2ui instance layout. Binds the same data pages, slots, and registers as FillPhoton, with one addition: the vertex shader also reads the texture slots, so bind them to both shader stages for this program. Every driver must support this program alongside the others. | ||||||||||||||||||||
|
strong |
|
strong |
Vertex buffer formats.
This enumeration describes the format of a vertex buffer.
| Enumerator | |
|---|---|
| _2f_4ub_2f | Vertex_2f_4ub_2f (used for path rendering). |
| _2f_4ub_2f_2f_28f | Vertex_2f_4ub_2f_2f_28f (used for quad rendering). |
| _2f_2ui | Vertex_2f_2ui (used for instanced cell rendering). |
|
strong |
The window actions available to the user (combine with |).
| Enumerator | |
|---|---|
| None | |
| Minimize | |
| Maximize | |
| Close | |
| All | |
|
strong |
Window creation flags (combine with |).
| Enumerator | |
|---|---|
| None | |
| Borderless | No frame or title bar. |
| Titled | A title bar. |
| Resizable | The user can resize the window by dragging its edges. |
| Maximizable | Minimize and maximize buttons. |
| Hidden | Start hidden (call Window::Show() to show it). |
| Transparent | Per-pixel transparency: anything the window leaves transparent shows what's behind it. You can only set this when you create the window. The View and the page need to be transparent too (pages draw on an opaque white background by default). See the Transparent Windows section in the Window class overview for the full setup.
|
| Popup | Marks a popup window. Window::CreatePopup() sets this for you (Window::Create() ignores it with a warning). Popups are always borderless and transparent, and ignore CustomChrome. |
| CustomChrome | Draw the title bar and caption buttons yourself, as page content. The window keeps every native frame behavior (resizing, snapping, the system shadow). See the Custom Chrome section in the Window class overview for the full setup. You don't need Titled with this. It's ignored (with a warning) together with Borderless, and on popup and fullscreen windows. Window::SetCaptionColor() has no effect, since there's no system title bar to color.
|
|
strong |
| RefPtr< T > AdoptRef | ( | T & | reference | ) |
Helper for wrapping new objects with the RefPtr smart pointer.
All ref-counted object are created with an initial ref-count of '1'. The AdoptRef() helper returns a RefPtr<T> without calling AddRef(). This is used for creating new objects, like so:
RefPtr<Object> ref = AdoptRef(*new ObjectImpl());
|
inline |
Create an insertion position immediately after a sibling.
| anchor | The sibling to insert after. |
|
inline |
Create an insertion position immediately before a sibling.
| anchor | The sibling to insert before. |
| ContainerSpec< Children... > column | ( | ContainerOptions | options, |
| Children... | children ) |
Describe a column container with child elements.
| options | The container's declared options. |
| children | The child elements to append, in order. |
| ContainerSpec< Children... > column | ( | ContainerOptions | options, |
| RefPtr< Container > * | out, | ||
| Children... | children ) |
Describe a column container, capturing the created handle in out.
| options | The container's declared options. |
| out | Receives the created container when the layout is built. |
| children | The child elements to append, in order. |
| auto Convert | ( | const From & | from | ) |
Convert between string types.
This function provides efficient conversion between different string types. It supports ultralight::String, std::string, std::string_view, and const char*.
The following type conversions are automatically deduced (no template argument needed):
For explicit conversion to std::string_view, use Convert<std::string_view>().
| To | The target string type (optional, deduced in common cases) |
| From | The source string type (optional) |
| from | The string to convert |
| Profiler * CreateProfilerPerfetto | ( | const char * | path | ) |
Create a Profiler implementation that writes Perfetto binary traces (.perfetto-trace).
The trace file is streamed to disk with bounded memory usage and is crash-safe (partial traces are always valid and loadable in https://ui.perfetto.dev).
| path | Output file path (e.g., "trace.perfetto-trace"). |
| void DestroyProfilerPerfetto | ( | Profiler * | profiler | ) |
Destroy a Profiler created by CreateProfilerPerfetto.
Safe to call with nullptr.
| BitmapFormatInfo GetBitmapFormatInfo | ( | BitmapFormat | format | ) |
Get the block geometry for a given BitmapFormat.
| format | The pixel format to query. |
| SurfaceFactory * GetBitmapSurfaceFactory | ( | ) |
Get the default logger (writes the log to a file on disk).
| logPath | A file path to write the log to. |
| void GetKeyFromVirtualKeyCode | ( | int | virtual_key_code, |
| bool | shift, | ||
| String & | key_result ) |
Utility function for generating a key string from a virtual key-code.
| virtual_key_code | The virtual key-code to generate the key string from. |
| shift | Whether or not the shift key is currently pressed. |
| key_result | The string to store the result in. |
| void GetKeyIdentifierFromVirtualKeyCode | ( | int | virtual_key_code, |
| String & | key_identifier_result ) |
Utility function for generating a key identifier string from a virtual key-code.
| virtual_key_code | The virtual key-code to generate the key identifier from. |
| key_identifier_result | The string to store the result in. |
| FileSystem * GetPlatformFileSystem | ( | const String & | baseDir | ) |
Get the native file system for the current platform, creating it if it doesn't exist using the base directory provided.
This is used to load data for file:/// URLs.
| baseDir | A base file path that will be used to resolve relative file paths. You can optionally specify "@resource_path" on macOS to use the app bundle's resource path. |
| FontLoader * GetPlatformFontLoader | ( | ) |
Get the native font loader for the current platform.
|
constexpr |
Whether or not every bit in bits is set in flags.
| bool IsCompressedFormat | ( | BitmapFormat | format | ) |
Whether or not a given BitmapFormat is block-compressed (a BCn format).
| format | The pixel format to query. |
| RefPtr< T > MakeRefPtr | ( | Args &&... | args | ) |
Construct a new object of type T and wrap it in a RefPtr.
Equivalent to AdoptRef(*new T(args...)).
| bool operator!= | ( | const RefPtr< T > & | a, |
| const U * | b ) |
| bool operator!= | ( | const T * | a, |
| const RefPtr< U > & | b ) |
|
constexpr |
|
constexpr |
| bool operator== | ( | const RefPtr< T > & | a, |
| const U * | b ) |
| bool operator== | ( | const T * | a, |
| const RefPtr< U > & | b ) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
inline |
Describe a panel in a builder expression (see Builder.h for an example).
| options | The panel's declared options. |
| out | Receives the created panel when the layout is built. Pass nullptr if you don't need the handle. |
| ContainerSpec< Children... > row | ( | ContainerOptions | options, |
| Children... | children ) |
Describe a row container with child elements.
| options | The container's declared options. |
| children | The child elements to append, in order. |
| ContainerSpec< Children... > row | ( | ContainerOptions | options, |
| RefPtr< Container > * | out, | ||
| Children... | children ) |
Describe a row container, capturing the created handle in out.
| options | The container's declared options. |
| out | Receives the created container when the layout is built. |
| children | The child elements to append, in order. |
| ButtonResult ShowMessageBox | ( | const String & | title, |
| const String & | message, | ||
| DialogIcon | icon = DialogIcon::Info, | ||
| ButtonType | buttons = ButtonType::OK ) |
Show a modal message box with the specified title, message, icon, and buttons.
| title | The title of the message box. |
| message | The message to display in the message box. |
| icon | The icon to display in the message box (default: DialogIcon::Info). |
| buttons | The button type to display in the message box (default: ButtonType::OK). |