wgpu
| Kind | ffi-c |
|---|---|
| Capabilities | ffi |
| Categories | graphics ffi |
| Keywords | wgpu webgpu gpu compute graphics |
Cross-platform GPU compute and rendering via WebGPU (wgpu-native)
Files
| File | Description |
|---|---|
.editorconfig | Editor formatting configuration |
.gitignore | Git ignore rules for build artifacts and dependencies |
.tool-versions | asdf tool versions (Zig, Kit) |
LICENSE | MIT license file |
README.md | This file |
c/kit_wgpu.c | C FFI wrapper |
c/kit_wgpu.h | C header for FFI wrapper |
examples/hello-compute.kit | Basic GPU compute example |
examples/texture-invert.kit | Texture color inversion example |
examples/image-sepia.kit | Image sepia tone via GPU compute |
kit.toml | Package manifest with metadata and dependencies |
src/main.kit | kit-wgpu: GPU compute and rendering via WebGPU |
src/buffer.kit | GPU buffer creation and float read/write |
src/compute.kit | WGSL shader compilation and compute dispatch |
src/context.kit | GPU context initialization and teardown |
src/sampler.kit | Texture sampler creation |
src/texture.kit | GPU texture creation, pixel access, and upload/download |
src/types.kit | GPUError type, buffer/texture/filter/address constants |
tests/compute.test.kit | Tests for compute pipeline |
tests/texture.test.kit | Tests for texture operations |
tests/image-bridge.test.kit | Tests for kit-image integration |
Dependencies
| Package | Description |
|---|---|
| kit-image | Image loading and manipulation (for bulk texture transfers) |
Installation
kit add gitlab.com/kit-lang/packages/kit-wgpu.gitSystem Requirements
wgpu-native must be installed on your system:
| Platform | Command |
|---|---|
| macOS | brew install wgpu-native |
| Ubuntu | sudo apt install libwgpu-native-dev |
| Fedora | sudo dnf install wgpu-native-devel |
Usage
import Kit.WGPU as GPU
main = fn(-env) =>
# Initialize GPU
ctx = GPU.init 0 |> Result.unwrap
println "GPU: ${GPU.adapter-name ctx}"
count = 8
storage = GPU.buffer-usage-storage
copy-src = GPU.buffer-usage-copy-src
copy-dst = GPU.buffer-usage-copy-dst
map-rd = GPU.buffer-usage-map-read
# Create input buffer (storage + copy-src), mapped for writing
input-buf = GPU.create-buffer ctx count (storage + copy-src) 1 |> Result.unwrap
# Write 8 float values: [1.0, 2.0, 3.0, ..., 8.0]
List.range 0 count |> List.map (fn(i) => GPU.set-float input-buf i (Int.to-float (i + 1)))
GPU.unmap input-buf
# Create output buffer (storage + copy-src) for compute shader output
output-buf = GPU.create-buffer ctx count (storage + copy-src) 0 |> Result.unwrap
# Create staging buffer (map-read + copy-dst) for CPU readback
staging-buf = GPU.create-buffer ctx count (map-rd + copy-dst) 0 |> Result.unwrap
# WGSL shader that doubles each value
wgsl = <<~WGSL
@group(0) @binding(0) var<storage, read> input: array<f32>;
@group(0) @binding(1) var<storage, read_write> output: array<f32>;
@compute @workgroup_size(64)
fn main(@builtin(global_invocation_id) id: vec3<u32>) {
let i = id.x;
if (i < arrayLength(&input)) {
output[i] = input[i] * 2.0;
}
}
WGSL
shader = GPU.create-shader ctx wgsl |> Result.unwrap
# Dispatch compute (1 workgroup)
GPU.dispatch-clear
GPU.dispatch-add input-buf
GPU.dispatch-add output-buf
GPU.compute ctx shader "main" 1 1 1 |> Result.unwrap
# Copy output to staging buffer, then read
GPU.copy-buffer ctx output-buf staging-buf count
GPU.map-read ctx staging-buf |> Result.unwrap
println "Results:"
List.range 0 count |> List.map (fn(i) =>
val = GPU.get-float staging-buf i
println " output[${show i}] = ${show val}"
)
GPU.unmap staging-buf
# Cleanup
GPU.release-buffer input-buf
GPU.release-buffer output-buf
GPU.release-buffer staging-buf
GPU.destroy-shader shader
GPU.destroy ctx
mainDevelopment
Running Examples
Run examples with the interpreter:
kit run examples/hello-compute.kitCompile examples to a native binary:
kit build examples/hello-compute.kit && ./hello-computeRunning Tests
Run the test suite:
kit testRun the test suite with coverage:
kit test --coverageRunning kit dev
Run the standard development workflow (format, check, test):
kit devThis will:
- Format and check source files in
src/ - Run tests in
tests/with coverage
Generating Documentation
Generate API documentation from doc comments:
kit docNote: Kit sources with doc comments (##) will generate HTML documents in docs/*.html
Cleaning Build Artifacts
Remove generated files, caches, and build artifacts:
kit task cleanNote: Defined in kit.toml.
Local Installation
To install this package locally for development:
kit installThis installs the package to ~/.kit/packages/@kit/wgpu/, making it available for import as Kit.WGPU in other projects.
License
This package is released under the MIT License - see LICENSE for details.
wgpu-native is released under the Apache 2.0 / MIT License.
Exported Functions & Types
create-shader
Compile a WGSL shader module.
Parameters:
Returns:
Ptr -> NonEmptyString -> Result Ptr GPUError
destroy-shader
Destroy a shader module and release its resources.
Ptr -> Unit
dispatch-clear
Clear the dispatch entry list. Call this before adding entries for a new compute dispatch.
Unit
dispatch-add
Add a buffer to the dispatch entry list. Entries are bound in order as @binding(0), @binding(1), etc.
Ptr -> Unit
dispatch-add-storage-texture
Add a storage texture view to the dispatch entry list. Used for textures bound as read_write storage (textureStore).
Ptr -> Unit
dispatch-add-sampled-texture
Add a sampled texture view to the dispatch entry list. Used for textures bound as read-only (textureLoad/textureSample).
Ptr -> Unit
dispatch-add-sampler
Add a sampler to the dispatch entry list.
Ptr -> Unit
run
Run a compute shader.
Uses the entries previously added via dispatch-clear/dispatch-add*. Blocks until the compute operation is complete.
Parameters:
Returns:
Ptr -> Ptr -> NonEmptyString -> PositiveInt -> PositiveInt -> PositiveInt -> Result Unit GPUError
GPUError
GPU error type for typed error handling.
Variants
GPUErrorAdapterNotFound
Adapter not found error variant.
Variants
AdapterNotFoundDeviceRequestFailed
Device request failed error variant.
Variants
DeviceRequestFailedShaderCompileError
Shader compile error variant.
Variants
ShaderCompileErrorBufferError
Buffer error variant.
Variants
BufferErrorComputeError
Compute error variant.
Variants
ComputeErrorTextureError
Texture error variant.
Variants
TextureErrorbuffer-usage-map-read
Buffer can be mapped for reading.
Int
buffer-usage-map-write
Buffer can be mapped for writing.
Int
buffer-usage-copy-src
Buffer can be used as a copy source.
Int
buffer-usage-copy-dst
Buffer can be used as a copy destination.
Int
buffer-usage-uniform
Buffer can be used as a uniform buffer.
Int
buffer-usage-storage
Buffer can be used as a storage buffer.
Int
texture-format-r8-unorm
R8Unorm texture format (1 byte per pixel, single channel).
Int
texture-format-r32-float
R32Float texture format (4 bytes per pixel, single float channel).
Int
texture-format-rgba8-unorm
RGBA8Unorm texture format (4 bytes per pixel, 8-bit RGBA).
Int
texture-format-rgba8-unorm-srgb
RGBA8UnormSrgb texture format (4 bytes per pixel, sRGB RGBA).
Int
texture-format-bgra8-unorm
BGRA8Unorm texture format (4 bytes per pixel, BGRA order).
Int
texture-format-rgba32-float
RGBA32Float texture format (16 bytes per pixel, 32-bit float RGBA).
Int
texture-usage-copy-src
Texture can be used as a copy source.
Int
texture-usage-copy-dst
Texture can be used as a copy destination.
Int
texture-usage-texture-binding
Texture can be bound as a sampled texture.
Int
texture-usage-storage-binding
Texture can be bound as a storage texture.
Int
texture-usage-render-attachment
Texture can be used as a render target attachment.
Int
filter-nearest
Nearest-neighbor filtering.
Int
filter-linear
Linear interpolation filtering.
Int
address-clamp-to-edge
Clamp texture coordinates to [0, 1].
Int
address-repeat
Repeat texture coordinates.
Int
address-mirror-repeat
Mirror and repeat texture coordinates.
Int
init
Initialize the GPU context.
NonNegativeInt -> Result Ptr GPUError
destroy
Destroy the GPU context and release all resources.
Ptr -> Unit
adapter-name
Get the name of the GPU adapter.
Ptr -> String
create-surface-metal-layer
Create a WGPU surface from a macOS CAMetalLayer pointer.
Ptr -> Ptr -> Result Ptr GPUError
release-surface
Release a previously created WGPU surface.
Ptr -> Unit
surface-preferred-texture-fmt
Query the preferred texture format for a surface. Uses the first format returned by surface capabilities.
Ptr -> Ptr -> Result Int GPUError
configure-surface
Configure a surface for rendering with default UI-friendly options. Uses render-attachment usage, FIFO present mode, and automatic alpha mode. Width and height are validated at runtime and must both be > 0.
Ptr -> Ptr -> Int -> Int -> Int -> Result Unit GPUError
acquire-surface-texture-view
Acquire a texture view for the current surface frame.
Ptr -> Result Ptr GPUError
begin-surface-batch
Begin a batched surface render pass. Subsequent rect and texture draws reuse the same render pass until present-surface.
Ptr -> Ptr -> Result Unit GPUError
begin-texture-batch
Begin a batched render pass into a render-attachment texture. Subsequent texture fill draws reuse the same render pass until finish-texture-batch.
Ptr -> Ptr -> Result Unit GPUError
finish-texture-batch
Finish a previously started batched render pass into a texture.
Ptr -> Result Unit GPUError
present-surface
Present the current surface frame.
Ptr -> Result Unit GPUError
clear-surface
Clear the current surface frame to a solid color and present it.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Result Unit GPUError
clear-texture
Clear a render-attachment texture to a solid color.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Result Unit GPUError
set-surface-scissor-rect
Set a clip rectangle on the surface for subsequent rect and texture draws. Coordinates are in surface pixels.
Ptr -> Int -> Int -> Int -> Int -> Result Unit GPUError
clear-surface-scissor-rect
Clear any clip rectangle set on the surface.
Ptr -> Unit
set-texture-scissor-rect
Set a clip rectangle on a render-attachment texture. Coordinates are in texture pixels.
Ptr -> Int -> Int -> Int -> Int -> Result Unit GPUError
clear-texture-scissor-rect
Clear any clip rectangle set on a render-attachment texture.
Ptr -> Unit
fill-surface-rect
Fill a rectangle on the current surface frame. If no frame is currently acquired, this acquires one, clears it to transparent black, draws the rectangle, and presents it. If a frame is already acquired, it draws into that frame without presenting.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-surface-rounded-rect
Fill a rounded rectangle on the current surface frame. Radius is in surface pixels.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-surface-vertical-gradient-rounded-rect
Fill a rounded rectangle with a vertical gradient on the current surface frame. Radius is in surface pixels.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
stroke-surface-rounded-rect
Stroke a rounded rectangle on the current surface frame. Stroke width and radius are in surface pixels.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-surface-corner-rounded-rect
Fill a rounded rectangle with independent corner radii on the current surface frame. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-surface-vertical-gradient-corner-rounded-rect
Fill a rounded rectangle with a vertical gradient and independent corner radii on the current surface frame. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
stroke-surface-corner-rounded-rect
Stroke a rounded rectangle with independent corner radii on the current surface frame. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-rect
Fill a rectangle into a render-attachment texture.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-rounded-rect
Fill a rounded rectangle into a render-attachment texture.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-vertical-gradient-rounded-rect
Fill a rounded rectangle with a vertical gradient into a render-attachment texture.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
stroke-texture-rounded-rect
Stroke a rounded rectangle into a render-attachment texture.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-corner-rounded-rect
Fill a rounded rectangle with independent corner radii into a render-attachment texture. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-vertical-gradient-corner-rounded-rect
Fill a rounded rectangle with a vertical gradient and independent corner radii into a render-attachment texture. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
stroke-texture-corner-rounded-rect
Stroke a rounded rectangle with independent corner radii into a render-attachment texture. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
draw-texture-texture
Draw a source texture into a destination rectangle on a render-attachment texture.
Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Result Unit GPUError
draw-texture-texture-region
Draw a source region of a source texture into a destination rectangle on a render-attachment texture.
Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
draw-surface-texture
Draw a texture into a destination rectangle on the current surface frame. If no frame is currently acquired, this acquires one, clears it to transparent black, draws the texture, and presents it. If a frame is already acquired, it draws into that frame without presenting.
Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Result Unit GPUError
draw-surface-texture-region
Draw a region of a texture into a destination rectangle on the current surface frame. Source coordinates are in texture pixels. If no frame is currently acquired, this acquires one, clears it to transparent black, draws the texture region, and presents it. If a frame is already acquired, it draws into that frame without presenting.
Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
atlas-glyph
Construct a glyph record for a texture atlas.
Float -> Float -> Float -> Float -> Float -> {src-x: Float, src-y: Float, src-width: Float, src-height: Float, advance: Float}
draw-glyph
Draw a single atlas glyph to the current surface frame.
Ptr -> Ptr -> Ptr -> {src-x: Float, src-y: Float, src-width: Float, src-height: Float, advance: Float} -> Float -> Float -> Float -> Result Unit GPUError
measure-run-width
Measure the width of a glyph run at the given scale and letter spacing.
List {src-x: Float, src-y: Float, src-width: Float, src-height: Float, advance: Float} -> Float -> Float -> Float
draw-run
Draw a horizontal run of atlas glyphs to the current surface frame.
Ptr -> Ptr -> Ptr -> List {src-x: Float, src-y: Float, src-width: Float, src-height: Float, advance: Float} -> Float -> Float -> Float -> Float -> Result Unit GPUError
create-buffer
Create a GPU buffer for float data.
Ptr -> PositiveInt -> Int -> Int -> Result Ptr GPUError
set-float
Write a float value to a mapped buffer at the given index.
Ptr -> NonNegativeInt -> Float -> Unit
get-float
Read a float value from a mapped buffer at the given index.
Ptr -> NonNegativeInt -> Float
map-read
Map a buffer for CPU reading. Blocks until mapped.
Ptr -> Ptr -> Result Unit GPUError
unmap
Unmap a previously mapped buffer.
Ptr -> Unit
copy-buffer
Copy float data between GPU buffers.
Ptr -> Ptr -> Ptr -> PositiveInt -> Unit
release-buffer
Release a buffer and its resources.
Ptr -> Unit
create-shader
Compile a WGSL shader module.
Ptr -> NonEmptyString -> Result Ptr GPUError
destroy-shader
Destroy a shader module and release its resources.
Ptr -> Unit
dispatch-clear
Clear the dispatch entry list.
Unit
dispatch-add
Add a buffer to the dispatch entry list.
Ptr -> Unit
dispatch-add-storage-texture
Add a storage texture view to the dispatch entry list.
Ptr -> Unit
dispatch-add-sampled-texture
Add a sampled texture view to the dispatch entry list.
Ptr -> Unit
dispatch-add-sampler
Add a sampler to the dispatch entry list.
Ptr -> Unit
compute
Run a compute shader with the previously added entries.
Ptr -> Ptr -> NonEmptyString -> PositiveInt -> PositiveInt -> PositiveInt -> Result Unit GPUError
Style parameters for a rounded panel shadow.
Style parameters for a rounded panel, including fill and shadow.
Owned textures and blur resources for a reusable rounded panel layer.
Minimal retained state for an owned rounded panel layer.
Retained rounded panel view state with owned layer cache, style, and frame.
Ordered retained scene of rounded panel views.
Simple vertical layout for retained rounded panel views.
Simple stack layout for retained rounded panel views.
Simple split layout for the first two retained rounded panel views in a scene. Intended for sidebar/detail desktop structure.
Retained two-panel sidebar/detail composition.
Retained interaction state for dragging a split-scene divider.
Style parameters for a visible split-divider affordance.
Style parameters for a retained sidebar/detail shell.
RoundedPanelStackChildren
Minimal retained node tree for rounded panel UI composition.
Variants
StackChild {RoundedPanelNode}StackChildren {child, tail}RoundedPanelSplitPointerPhase
Split-divider pointer phases in drawable-space coordinates.
Variants
SplitPointerDownSplitPointerMoveSplitPointerUpSplitPointerLeavecreate-box-blur-effect
Create a reusable separable box blur effect.
Ptr -> PositiveInt -> Result {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} GPUError
create-gaussian-blur-effect
Create a reusable separable Gaussian blur effect.
Ptr -> PositiveInt -> PositiveFloat -> Result {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} GPUError
default-panel-shadow-style
Package default shadow style for rounded desktop panels.
{radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}
default-rounded-panel-style
Package default style for rounded desktop panels.
{shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}
create-panel-shadow-effect
Create a shadow effect from a style record.
Ptr -> {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float} -> Result {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} GPUError
create-rounded-panel-shadow-effect
Create a shadow effect from a rounded panel style record.
Ptr -> {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float} -> Result {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} GPUError
create-default-panel-shadow-effect
Create the package's default shadow effect for rounded panels.
Ptr -> Result {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} GPUError
create-rounded-panel-layer
Create an owned offscreen layer for repeatedly rendering styled rounded panels.
Ptr -> PositiveInt -> PositiveInt -> {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float} -> Result {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} GPUError
create-default-rounded-panel-layer
Create an owned offscreen layer using the package default panel style.
Ptr -> PositiveInt -> PositiveInt -> Result {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} GPUError
create-rounded-panel-layer-state
Create retained state for a rounded panel layer. New state starts dirty so the first render refreshes the cached layer.
{effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} -> {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}
create-rounded-panel-view
Create a retained rounded panel view with owned layer cache, style, and frame.
Ptr -> PositiveInt -> PositiveInt -> {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float} -> Float -> Float -> Float -> Float -> Result {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} GPUError
create-default-rounded-panel-view
Create a retained rounded panel view using the package default style.
Ptr -> PositiveInt -> PositiveInt -> Float -> Float -> Float -> Float -> Result {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} GPUError
create-rounded-panel-scene
Create an empty rounded panel scene.
{views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}}
create-rounded-panel-split-scene
Create a retained split scene from sidebar and detail views plus a split layout record.
{state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float} -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float} -> {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float} -> {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}}
default-rounded-panel-column-layout
Default vertical layout for retained rounded panel views.
{x: Float, y: Float, width: Float, item-height: Float, spacing: Float}
default-rounded-panel-stack-layout
Default stack layout for retained rounded panel views.
{x: Float, y: Float, item-width: Float, item-height: Float, spacing: Float, is-horizontal?: Bool}
default-rounded-panel-split-layout
Default split layout for retained rounded panel views.
{x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}
release-rounded-panel-layer
Release a previously created rounded panel layer.
{effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} -> Unit
release-rounded-panel-layer-state
Release retained rounded panel layer state and its owned layer.
{layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} -> Unit
release-rounded-panel-view
Release a retained rounded panel view and its owned layer cache.
{state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} -> Unit
release-rounded-panel-scene
Release every retained view in a rounded panel scene.
{views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} -> Unit
release-rounded-panel-split-scene
Release a retained split scene and both owned views.
{sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} -> Unit
resize-rounded-panel-layer
Replace a rounded panel layer with a newly sized/styled one. The existing layer is only released after the replacement succeeds.
Ptr -> {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} -> PositiveInt -> PositiveInt -> {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float} -> Result {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} GPUError
resize-default-rounded-panel-layer
Replace a rounded panel layer with a newly sized layer using the package default panel style.
Ptr -> {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} -> PositiveInt -> PositiveInt -> Result {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} GPUError
mark-rounded-panel-layer-dirty
Mark retained rounded panel layer state dirty.
{layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} -> {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}
clear-rounded-panel-layer-dirty
Mark retained rounded panel layer state clean without rendering.
{layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} -> {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}
mark-rounded-panel-view-dirty
Return a rounded panel view with its cached layer marked dirty.
{state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float}
rounded-panel-scene-add-view
Append a retained rounded panel view to the end of a scene.
{views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}}
mark-rounded-panel-scene-dirty
Mark every retained rounded panel view in a scene dirty.
{views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}}
mark-rounded-panel-split-scene-dirty
Mark both retained views in a split scene dirty.
{sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} -> {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}}
set-rounded-panel-split-scene-layout
Return a split scene with an updated split layout record.
{sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} -> {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float} -> {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}}
layout-rounded-panel-scene-column
Apply a simple vertical layout to every view in a scene. This updates both retained panel frames and surface draw frames.
{x: Float, y: Float, width: Float, item-height: Float, spacing: Float} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}}
layout-rounded-panel-scene-stack
Apply a simple stack layout to every view in a scene. This updates both retained panel frames and surface draw frames.
{x: Float, y: Float, item-width: Float, item-height: Float, spacing: Float, is-horizontal?: Bool} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}}
resize-and-layout-rounded-panel-scene-stack
Resize each retained rounded panel view's owned layer cache to a fixed item size, then apply stack layout frames.
Ptr -> PositiveInt -> PositiveInt -> {x: Float, y: Float, item-width: Float, item-height: Float, spacing: Float, is-horizontal?: Bool} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} -> Result {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} GPUError
layout-rounded-panel-scene-split
Apply a simple split layout to the first two views in a scene. Additional trailing views keep their existing frames.
{x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}}
resize-and-layout-rounded-panel-scene-split
Resize the first two retained rounded panel views' owned layer caches, then apply split layout frames. Additional trailing views keep their existing caches and frames.
Ptr -> PositiveInt -> PositiveInt -> PositiveInt -> PositiveInt -> {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float} -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} -> Result {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} GPUError
layout-rounded-panel-split-scene
Apply the split layout owned by a retained split scene.
{sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} -> Result {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} GPUError
resize-and-layout-rounded-panel-split-scene
Resize both owned view layer caches and apply the retained split scene's split layout.
Ptr -> PositiveInt -> PositiveInt -> PositiveInt -> PositiveInt -> {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} -> Result {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} GPUError
resize-and-layout-rounded-panel-split-scene-frame
Resize and layout a retained split scene from integer frame dimensions.
Ptr -> Float -> Float -> PositiveInt -> PositiveInt -> PositiveInt -> PositiveInt -> {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} -> Result {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} GPUError
resize-rounded-panel-layer-state
Resize retained rounded panel layer state and mark the replacement dirty.
Ptr -> {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} -> PositiveInt -> PositiveInt -> {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float} -> Result {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} GPUError
resize-default-rounded-panel-layer-state
Resize retained rounded panel layer state using the package default panel style.
Ptr -> {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} -> PositiveInt -> PositiveInt -> Result {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} GPUError
resize-rounded-panel-view-layer
Replace a rounded panel view's owned layer cache with a newly sized layer while keeping its style and frame.
Ptr -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} -> PositiveInt -> PositiveInt -> Result {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} GPUError
set-rounded-panel-view-style
Replace a rounded panel view's style and rebuild its owned layer cache as needed.
Ptr -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} -> {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float} -> Result {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} GPUError
set-rounded-panel-view-frame
Return a rounded panel view with updated frame and its cached layer marked dirty.
{state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} -> Float -> Float -> Float -> Float -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float}
set-rounded-panel-view-surface-frame
Return a rounded panel view with updated surface draw frame.
{state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float} -> Float -> Float -> Float -> Float -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}
rounded-panel-layer-texture
Get the sampled destination texture owned by a rounded panel layer.
{effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} -> Ptr
rounded-panel-layer-state-texture
Get the sampled destination texture owned by retained rounded panel layer state.
{layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} -> Ptr
rounded-panel-view-texture
Get the sampled destination texture owned by a rounded panel view.
{state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} -> Ptr
draw-rounded-panel-view
Draw a retained rounded panel view's cached texture to a surface. Assumes the caller has already configured the surface render pass as needed.
Ptr -> Ptr -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float} -> Result Unit GPUError
release-box-blur-effect
Release a previously created box blur effect.
{horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> Unit
apply-box-blur
Apply a separable box blur from source into destination using scratch as the intermediate texture.
Ptr -> {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> Ptr -> Ptr -> Ptr -> Result Unit GPUError
apply-gaussian-blur
Apply a separable Gaussian blur from source into destination using scratch as the intermediate texture.
Ptr -> {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> Ptr -> Ptr -> Ptr -> Result Unit GPUError
render-rounded-rect-shadow
Render a blurred rounded-rectangle shadow into destination using source and scratch as intermediates.
Ptr -> {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-corner-rounded-rect-shadow
Render a blurred corner-rounded shadow into destination using source and scratch as intermediates. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-shadowed-rounded-panel
Render a shadowed rounded panel into destination using source and scratch as intermediates.
Ptr -> {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-styled-shadowed-rounded-panel
Render a shadowed rounded panel using a style record for the shadow.
Ptr -> {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float} -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-styled-rounded-panel
Render a rounded panel using a full style record for fill, border, and shadow.
Ptr -> {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float} -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-rounded-panel-layer
Render a styled rounded panel into an owned rounded panel layer.
Ptr -> {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} -> {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float} -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-default-rounded-panel-layer
Render a rounded panel into an owned rounded panel layer using the package default style.
Ptr -> {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt} -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-rounded-panel-layer-if-dirty
Render retained rounded panel layer state only when it is dirty. Returns updated state marked clean on success.
Ptr -> {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} -> {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float} -> Float -> Float -> Float -> Float -> Result {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} GPUError
render-default-rounded-panel-layer-if-dirty
Render retained rounded panel layer state using the package default style only when it is dirty.
Ptr -> {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} -> Float -> Float -> Float -> Float -> Result {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool} GPUError
render-rounded-panel-view-if-dirty
Render a retained rounded panel view only when its cached layer is dirty. Returns updated view state marked clean on success.
Ptr -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} -> Result {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} GPUError
render-default-rounded-panel-view-if-dirty
Render a retained rounded panel view using the package default style only when its cached layer is dirty.
Ptr -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} -> Result {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float} GPUError
render-and-draw-rounded-panel-view
Render a retained rounded panel view if needed, then draw it to a surface.
Ptr -> Ptr -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float} -> Result {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float} GPUError
render-and-draw-default-rounded-panel-view
Render a retained rounded panel view using the package default style if needed, then draw it to a surface.
Ptr -> Ptr -> {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float} -> Result {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float} GPUError
render-and-draw-rounded-panel-scene
Render and draw each retained rounded panel view in a scene in order. Returns updated scene values with dirty flags cleared where rendering succeeded.
Ptr -> Ptr -> {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} -> Result {views: List {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}} GPUError
render-and-draw-rounded-panel-split-scene
Render and draw a retained split scene using its two owned views and split layout.
Ptr -> Ptr -> {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} -> Result {sidebar: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, detail: {state: {layer: {effect: {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt}, source: Ptr, scratch: Ptr, destination: Ptr, width: PositiveInt, height: PositiveInt}, is-dirty?: Bool}, style: {shadow: {radius: PositiveInt, sigma: PositiveFloat, offset-x: Float, offset-y: Float, r: Float, g: Float, b: Float, a: Float}, top-left-radius: Float, top-right-radius: Float, bottom-right-radius: Float, bottom-left-radius: Float, border-width: Float, border-r: Float, border-g: Float, border-b: Float, border-a: Float, fill-top-r: Float, fill-top-g: Float, fill-top-b: Float, fill-top-a: Float, fill-bottom-r: Float, fill-bottom-g: Float, fill-bottom-b: Float, fill-bottom-a: Float}, x: Float, y: Float, width: Float, height: Float, surface-x: Float, surface-y: Float, surface-width: Float, surface-height: Float}, layout: {x: Float, y: Float, width: Float, height: Float, leading-width: Float, spacing: Float}} GPUError
render-default-shadowed-rounded-panel
Render a rounded panel into destination using the package's default shadow style.
Ptr -> {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-default-rounded-panel
Render a rounded panel using the package's default panel style.
Ptr -> {horizontal-shader: Ptr, vertical-shader: Ptr, sampler: Ptr, radius: PositiveInt} -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
create-texture
Create a 2D GPU texture with CPU staging buffer.
Ptr -> PositiveInt -> PositiveInt -> Int -> Int -> Result Ptr GPUError
texture-width
Get the width of a texture in pixels.
Ptr -> Int
texture-height
Get the height of a texture in pixels.
Ptr -> Int
texture-set-pixel
Set a pixel's RGBA values in the CPU staging buffer.
Ptr -> NonNegativeInt -> NonNegativeInt -> Byte -> Byte -> Byte -> Byte -> Unit
texture-get-pixel-r
Get the red channel of a pixel from the CPU staging buffer.
Ptr -> NonNegativeInt -> NonNegativeInt -> Int
texture-get-pixel-g
Get the green channel of a pixel from the CPU staging buffer.
Ptr -> NonNegativeInt -> NonNegativeInt -> Int
texture-get-pixel-b
Get the blue channel of a pixel from the CPU staging buffer.
Ptr -> NonNegativeInt -> NonNegativeInt -> Int
texture-get-pixel-a
Get the alpha channel of a pixel from the CPU staging buffer.
Ptr -> NonNegativeInt -> NonNegativeInt -> Int
texture-upload
Upload staging buffer data to the GPU texture.
Ptr -> Ptr -> Result Unit GPUError
texture-download
Download GPU texture data to the CPU staging buffer.
Ptr -> Ptr -> Result Unit GPUError
create-texture-view
Create a texture view for use in bind groups.
Ptr -> Result Ptr GPUError
release-texture
Release a texture and its staging buffer.
Ptr -> Unit
texture-copy-from-bytes
Copy raw bytes from an image data pointer into the texture staging buffer. Handles channel conversion (1ch/3ch/4ch → RGBA8) internally.
Ptr -> Ptr -> PositiveInt -> PositiveInt -> PositiveInt -> Unit
texture-copy-to-bytes
Copy texture staging buffer data to a raw byte pointer. Handles channel conversion (RGBA8 → 1ch/3ch/4ch) internally.
Ptr -> Ptr -> PositiveInt -> PositiveInt -> PositiveInt -> Unit
release-texture-view
Release a texture view.
Ptr -> Unit
create-sampler
Create a GPU sampler for texture filtering.
Ptr -> Int -> Int -> Int -> Result Ptr GPUError
release-sampler
Release a sampler and its resources.
Ptr -> Unit
Style parameters for a rounded panel shadow.
Style parameters for a rounded panel, including fill and shadow.
Reusable separable box blur resources.
Owned textures and blur resources for a reusable rounded panel layer.
Minimal retained state for an owned rounded panel layer.
Retained rounded panel view state with owned layer cache, style, and frame.
Ordered retained scene of rounded panel views.
Simple vertical layout for retained rounded panel views.
Simple stack layout for retained rounded panel views.
Simple split layout for the first two retained rounded panel views in a scene. Intended for sidebar/detail desktop structure.
Retained two-panel sidebar/detail composition.
Retained interaction state for dragging a split-scene divider.
Style parameters for a visible split-divider affordance.
Style parameters for a retained sidebar/detail shell.
RoundedPanelNode
Minimal retained node tree for rounded panel UI composition.
Variants
PanelLeaf {RoundedPanelView}SplitBranch {RoundedPanelSplitNode}StackBranch {RoundedPanelStackNode}OverlayBranch {RoundedPanelOverlayNode}RoundedPanelSplitPointerPhase
Split-divider pointer phases in drawable-space coordinates.
Variants
SplitPointerDownSplitPointerMoveSplitPointerUpSplitPointerLeavedefault-panel-shadow-style
Package default shadow style for rounded desktop panels.
default-rounded-panel-style
Package default style for rounded desktop panels.
default-split-divider-style
Package default style for a split-divider affordance.
default-rounded-panel-split-shell-style
Package default style for a retained sidebar/detail shell.
create-box-blur-effect
Create a reusable separable box blur effect. Radius is the number of taps on each side of the center sample.
Ptr -> PositiveInt -> Result BoxBlurEffect GPUError
release-box-blur-effect
Release a previously created box blur effect.
BoxBlurEffect -> Unit
apply-box-blur
Apply a separable box blur from source into destination using scratch as the intermediate texture. scratch and destination should support both sampled and storage-texture usage.
Ptr -> BoxBlurEffect -> Ptr -> Ptr -> Ptr -> Result Unit GPUError
create-gaussian-blur-effect
Create a reusable separable Gaussian blur effect. Sigma controls the weight falloff; larger values produce softer blur.
Ptr -> PositiveInt -> PositiveFloat -> Result BoxBlurEffect GPUError
apply-gaussian-blur
Apply a separable Gaussian blur using a previously created effect.
Ptr -> BoxBlurEffect -> Ptr -> Ptr -> Ptr -> Result Unit GPUError
create-panel-shadow-effect
Create a shadow effect from a style record.
Ptr -> PanelShadowStyle -> Result BoxBlurEffect GPUError
create-rounded-panel-shadow-effect
Create a shadow effect from a rounded panel style record.
Ptr -> RoundedPanelStyle -> Result BoxBlurEffect GPUError
create-default-panel-shadow-effect
Create a default shadow effect tuned for rounded desktop panels.
Ptr -> Result BoxBlurEffect GPUError
create-rounded-panel-layer
Create an owned offscreen layer for repeatedly rendering styled rounded panels. The layer owns its blur effect and all intermediate textures.
Ptr -> PositiveInt -> PositiveInt -> RoundedPanelStyle -> Result RoundedPanelLayer GPUError
create-default-rounded-panel-layer
Create an owned offscreen layer using the package default panel style.
Ptr -> PositiveInt -> PositiveInt -> Result RoundedPanelLayer GPUError
create-rounded-panel-layer-state
Create retained state for a rounded panel layer. New state starts dirty so the first render refreshes the cached layer.
RoundedPanelLayer -> RoundedPanelLayerState
create-rounded-panel-view
Create a retained rounded panel view with owned layer cache, style, and frame.
Ptr -> PositiveInt -> PositiveInt -> RoundedPanelStyle -> Float -> Float -> Float -> Float -> Result RoundedPanelView GPUError
create-default-rounded-panel-view
Create a retained rounded panel view using the package default style.
Ptr -> PositiveInt -> PositiveInt -> Float -> Float -> Float -> Float -> Result RoundedPanelView GPUError
create-rounded-panel-scene
Create an empty rounded panel scene.
RoundedPanelScene
default-rounded-panel-column-layout
Default vertical layout for retained rounded panel views.
default-rounded-panel-stack-layout
Default stack layout for retained rounded panel views.
default-rounded-panel-split-layout
Default split layout for retained rounded panel views.
create-rounded-panel-split-scene
Create a retained split scene from sidebar and detail views plus a split layout record.
RoundedPanelView -> RoundedPanelView -> RoundedPanelSplitLayout -> RoundedPanelSplitScene
release-rounded-panel-layer
Release a previously created rounded panel layer.
RoundedPanelLayer -> Unit
release-rounded-panel-layer-state
Release retained rounded panel layer state and its owned layer.
RoundedPanelLayerState -> Unit
release-rounded-panel-view
Release a retained rounded panel view and its owned layer cache.
RoundedPanelView -> Unit
release-rounded-panel-scene
Release every retained view in a rounded panel scene.
RoundedPanelScene -> Unit
release-rounded-panel-split-scene
Release a retained split scene and both owned views.
RoundedPanelSplitScene -> Unit
resize-rounded-panel-layer
Replace a rounded panel layer with a newly sized/styled one. The existing layer is only released after the replacement succeeds.
Ptr -> RoundedPanelLayer -> PositiveInt -> PositiveInt -> RoundedPanelStyle -> Result RoundedPanelLayer GPUError
resize-default-rounded-panel-layer
Replace a rounded panel layer with a newly sized layer using the package default panel style.
Ptr -> RoundedPanelLayer -> PositiveInt -> PositiveInt -> Result RoundedPanelLayer GPUError
mark-rounded-panel-layer-dirty
Mark retained rounded panel layer state dirty.
RoundedPanelLayerState -> RoundedPanelLayerState
clear-rounded-panel-layer-dirty
Mark retained rounded panel layer state clean without rendering.
RoundedPanelLayerState -> RoundedPanelLayerState
mark-rounded-panel-view-dirty
Return a rounded panel view with its cached layer marked dirty.
RoundedPanelView -> RoundedPanelView
rounded-panel-scene-add-view
Append a retained rounded panel view to the end of a scene.
RoundedPanelScene -> RoundedPanelView -> RoundedPanelScene
mark-rounded-panel-scene-dirty
Mark every retained rounded panel view in a scene dirty.
RoundedPanelScene -> RoundedPanelScene
mark-rounded-panel-split-scene-dirty
Mark both retained views in a split scene dirty.
RoundedPanelSplitScene -> RoundedPanelSplitScene
set-rounded-panel-split-scene-layout
Return a split scene with an updated split layout record.
RoundedPanelSplitScene -> RoundedPanelSplitLayout -> RoundedPanelSplitScene
create-rounded-panel-split-drag-state
Create retained drag state for a split-scene divider.
RoundedPanelSplitScene -> PositiveInt -> PositiveInt -> Float -> RoundedPanelSplitDragState
rounded-panel-split-drag-scene
Get the retained split scene owned by drag state.
RoundedPanelSplitDragState -> RoundedPanelSplitScene
set-rounded-panel-split-drag-scene
Replace the retained split scene owned by drag state. Active drag state is preserved.
RoundedPanelSplitDragState -> RoundedPanelSplitScene -> RoundedPanelSplitDragState
style-rounded-panel-split-scene
Apply a shell style record to both retained views in a split scene.
Ptr -> RoundedPanelSplitShellStyle -> RoundedPanelSplitScene -> Result RoundedPanelSplitScene GPUError
style-rounded-panel-split-drag-state
Apply a shell style record to the split scene owned by retained drag state.
Ptr -> RoundedPanelSplitShellStyle -> RoundedPanelSplitDragState -> Result RoundedPanelSplitDragState GPUError
rounded-panel-node-leaf
Wrap a retained rounded panel view as a leaf node.
RoundedPanelView -> RoundedPanelNode
rounded-panel-node-split
Build a split node from two child nodes.
PositiveInt -> PositiveInt -> RoundedPanelNode -> RoundedPanelNode -> RoundedPanelNode
rounded-panel-node-stack
Build a stack node from a child list.
PositiveInt -> Bool -> List RoundedPanelNode -> Result RoundedPanelNode GPUError
rounded-panel-node-overlay
Build an overlay node from a child list.
List RoundedPanelNode -> Result RoundedPanelNode GPUError
release-rounded-panel-node
Release every owned view reachable from a rounded panel node tree.
RoundedPanelNode -> Unit
mark-rounded-panel-node-dirty
Mark every retained panel view in a node tree dirty.
RoundedPanelNode -> RoundedPanelNode
has-active-rounded-panel-split-drag?
Check whether split drag state is actively dragging.
RoundedPanelSplitDragState -> Bool
has-hover-rounded-panel-split-divider?
Check whether split drag state is currently hovering the divider.
RoundedPanelSplitDragState -> Bool
has-rounded-panel-split-resize-cursor?
Check whether split drag state should show a resize cursor.
RoundedPanelSplitDragState -> Bool
rounded-panel-split-scene-divider-x
Return the divider x-position for a retained split scene. This is the leading edge of the spacing gap between sidebar and detail.
RoundedPanelSplitScene -> Float
is-point-in-rounded-panel-split-scene-divider?
Check whether a point falls within a retained split scene's divider hit area. hit-slop expands both sides of the divider gap for easier pointer interaction.
RoundedPanelSplitScene -> Float -> Float -> Float -> Bool
rounded-panel-split-scene-leading-width-at-divider-x
Convert a divider x-position into a clamped leading width for a retained split scene. The split scene must already have integer-backed frame dimensions.
RoundedPanelSplitScene -> Float -> PositiveInt -> PositiveInt -> Result PositiveInt GPUError
begin-rounded-panel-split-drag
Start dragging a retained split-scene divider if the pointer hits its handle.
RoundedPanelSplitDragState -> Float -> Float -> RoundedPanelSplitDragState
update-rounded-panel-split-drag-hover
Update retained split-divider hover state from a pointer location. Active drags keep the divider hot until drag end.
RoundedPanelSplitDragState -> Float -> Float -> RoundedPanelSplitDragState
end-rounded-panel-split-drag
End an active retained split-scene divider drag.
RoundedPanelSplitDragState -> RoundedPanelSplitDragState
layout-rounded-panel-scene-column
Apply a simple vertical layout to every view in a scene. This updates both the retained panel frame and the surface draw frame.
RoundedPanelColumnLayout -> RoundedPanelScene -> RoundedPanelScene
layout-rounded-panel-scene-stack
Apply a simple stack layout to every view in a scene. This updates both retained panel frames and surface draw frames.
RoundedPanelStackLayout -> RoundedPanelScene -> RoundedPanelScene
resize-and-layout-rounded-panel-scene-stack
Resize each retained rounded panel view's owned layer cache to a fixed item size, then apply stack layout frames. This is a first bridge between retained layout and retained layer sizing.
Ptr -> PositiveInt -> PositiveInt -> RoundedPanelStackLayout -> RoundedPanelScene -> Result RoundedPanelScene GPUError
layout-rounded-panel-scene-split
Apply a simple split layout to the first two views in a scene. Additional trailing views keep their existing frames.
RoundedPanelSplitLayout -> RoundedPanelScene -> RoundedPanelScene
resize-and-layout-rounded-panel-scene-split
Resize the first two retained rounded panel views' owned layer caches, then apply split layout frames. Additional trailing views keep their existing caches and frames.
Ptr -> PositiveInt -> PositiveInt -> PositiveInt -> PositiveInt -> RoundedPanelSplitLayout -> RoundedPanelScene -> Result RoundedPanelScene GPUError
layout-rounded-panel-split-scene
Apply the split layout owned by a retained split scene.
RoundedPanelSplitScene -> Result RoundedPanelSplitScene GPUError
resize-and-layout-rounded-panel-split-scene
Resize both owned view layer caches and apply the retained split scene's split layout.
Ptr -> PositiveInt -> PositiveInt -> PositiveInt -> PositiveInt -> RoundedPanelSplitScene -> Result RoundedPanelSplitScene GPUError
resize-and-layout-rounded-panel-split-scene-frame
Resize and layout a retained split scene from integer frame dimensions. The same dimensions drive both layer-cache sizing and split-layout geometry.
Ptr -> Float -> Float -> PositiveInt -> PositiveInt -> PositiveInt -> PositiveInt -> RoundedPanelSplitScene -> Result RoundedPanelSplitScene GPUError
resize-and-layout-rounded-panel-split-scene-at-divider-x
Resize and layout a retained split scene by dragging its divider to divider-x. The requested divider position is clamped to preserve minimum sidebar and detail widths.
Ptr -> Float -> PositiveInt -> PositiveInt -> RoundedPanelSplitScene -> Result RoundedPanelSplitScene GPUError
drag-rounded-panel-split
Drag a retained split-scene divider if drag state is active. Returns updated drag state owning the relaid-out split scene.
Ptr -> Float -> RoundedPanelSplitDragState -> Result RoundedPanelSplitDragState GPUError
handle-rounded-panel-split-pointer
Apply one split-divider pointer phase in drawable-space coordinates. This collapses hover, begin-drag, drag, and end-drag sequencing into one retained helper.
Ptr -> RoundedPanelSplitPointerPhase -> Float -> Float -> RoundedPanelSplitDragState -> Result RoundedPanelSplitDragState GPUError
draw-styled-rounded-panel-split-divider
Draw the retained split divider affordance for a drag state using a divider style. Assumes the caller has already configured the surface render pass as needed.
Ptr -> Ptr -> SplitDividerStyle -> RoundedPanelSplitDragState -> Result Unit GPUError
draw-rounded-panel-split-divider
Draw the retained split divider affordance for a drag state using the package default style.
Ptr -> Ptr -> RoundedPanelSplitDragState -> Result Unit GPUError
render-and-draw-styled-rounded-panel-split-drag-state
Render and draw a retained split scene plus its divider affordance from drag state using a divider style.
Ptr -> Ptr -> SplitDividerStyle -> RoundedPanelSplitDragState -> Result RoundedPanelSplitDragState GPUError
render-and-draw-rounded-panel-split-drag-state
Render and draw a retained split scene plus its divider affordance from drag state.
Ptr -> Ptr -> RoundedPanelSplitDragState -> Result RoundedPanelSplitDragState GPUError
resize-and-layout-rounded-panel-node-frame
Resize and layout a rounded panel node tree within an integer frame. Split branches recursively allocate leading and trailing child frames.
Ptr -> Float -> Float -> PositiveInt -> PositiveInt -> RoundedPanelNode -> Result RoundedPanelNode GPUError
render-and-draw-rounded-panel-node
Render and draw a rounded panel node tree in traversal order.
Ptr -> Ptr -> RoundedPanelNode -> Result RoundedPanelNode GPUError
rounded-panel-node-stack-child-count
Return the number of direct stack slots represented by a stack node.
RoundedPanelNode -> Result Int GPUError
resize-rounded-panel-layer-state
Resize retained rounded panel layer state and mark the replacement dirty.
Ptr -> RoundedPanelLayerState -> PositiveInt -> PositiveInt -> RoundedPanelStyle -> Result RoundedPanelLayerState GPUError
resize-default-rounded-panel-layer-state
Resize retained rounded panel layer state using the package default panel style and mark the replacement dirty.
Ptr -> RoundedPanelLayerState -> PositiveInt -> PositiveInt -> Result RoundedPanelLayerState GPUError
resize-rounded-panel-view-layer
Replace a rounded panel view's owned layer cache with a newly sized layer while keeping its style and frame.
Ptr -> RoundedPanelView -> PositiveInt -> PositiveInt -> Result RoundedPanelView GPUError
set-rounded-panel-view-style
Replace a rounded panel view's style and rebuild its owned layer cache as needed.
Ptr -> RoundedPanelView -> RoundedPanelStyle -> Result RoundedPanelView GPUError
set-rounded-panel-view-frame
Return a rounded panel view with updated frame and its cached layer marked dirty.
RoundedPanelView -> Float -> Float -> Float -> Float -> RoundedPanelView
set-rounded-panel-view-surface-frame
Return a rounded panel view with updated surface draw frame.
RoundedPanelView -> Float -> Float -> Float -> Float -> RoundedPanelView
rounded-panel-layer-texture
Get the sampled destination texture owned by a rounded panel layer.
RoundedPanelLayer -> Ptr
rounded-panel-layer-state-texture
Get the sampled destination texture owned by retained rounded panel layer state.
RoundedPanelLayerState -> Ptr
rounded-panel-view-texture
Get the sampled destination texture owned by a rounded panel view.
RoundedPanelView -> Ptr
draw-rounded-panel-view
Draw a retained rounded panel view's cached texture to a surface. Assumes the caller has already configured the surface render pass as needed.
Ptr -> Ptr -> RoundedPanelView -> Result Unit GPUError
render-rounded-panel-layer
Render a styled rounded panel into an owned rounded panel layer.
Ptr -> RoundedPanelLayer -> RoundedPanelStyle -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-default-rounded-panel-layer
Render a styled rounded panel into an owned rounded panel layer using the package default style.
Ptr -> RoundedPanelLayer -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-rounded-panel-layer-if-dirty
Render retained rounded panel layer state only when it is dirty. Returns updated state marked clean on success.
Ptr -> RoundedPanelLayerState -> RoundedPanelStyle -> Float -> Float -> Float -> Float -> Result RoundedPanelLayerState GPUError
render-default-rounded-panel-layer-if-dirty
Render retained rounded panel layer state using the package default style only when it is dirty.
Ptr -> RoundedPanelLayerState -> Float -> Float -> Float -> Float -> Result RoundedPanelLayerState GPUError
render-rounded-panel-view-if-dirty
Render a retained rounded panel view only when its cached layer is dirty. Returns updated view state marked clean on success.
Ptr -> RoundedPanelView -> Result RoundedPanelView GPUError
render-default-rounded-panel-view-if-dirty
Render a retained rounded panel view using the package default style only when its cached layer is dirty.
Ptr -> RoundedPanelView -> Result RoundedPanelView GPUError
render-and-draw-rounded-panel-view
Render a retained rounded panel view if needed, then draw it to a surface.
Ptr -> Ptr -> RoundedPanelView -> Result RoundedPanelView GPUError
render-and-draw-default-rounded-panel-view
Render a retained rounded panel view with the package default style if needed, then draw it to a surface.
Ptr -> Ptr -> RoundedPanelView -> Result RoundedPanelView GPUError
render-and-draw-rounded-panel-scene
Render and draw each retained rounded panel view in a scene in order. Returns updated scene values with dirty flags cleared where rendering succeeded.
Ptr -> Ptr -> RoundedPanelScene -> Result RoundedPanelScene GPUError
render-and-draw-rounded-panel-split-scene
Render and draw a retained split scene using its two owned views and split layout.
Ptr -> Ptr -> RoundedPanelSplitScene -> Result RoundedPanelSplitScene GPUError
render-rounded-rect-shadow
Render a blurred rounded-rectangle shadow into destination using source and scratch as intermediates. source, scratch, and destination must all be distinct textures. source should support render-attachment usage, while scratch and destination should support sampled and storage-texture usage for the blur passes.
Ptr -> BoxBlurEffect -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-corner-rounded-rect-shadow
Render a blurred corner-rounded shadow into destination using source and scratch as intermediates. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> BoxBlurEffect -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-shadowed-rounded-panel
Render a shadowed rounded panel into destination using source and scratch as intermediates. The destination texture must support both blur-related usage and render-attachment usage so the panel fill can be composited over the blurred shadow.
Ptr -> BoxBlurEffect -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-styled-shadowed-rounded-panel
Render a shadowed rounded panel using a style record for the shadow.
Ptr -> BoxBlurEffect -> PanelShadowStyle -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-styled-rounded-panel
Render a rounded panel using a full style record for fill and shadow.
Ptr -> BoxBlurEffect -> RoundedPanelStyle -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-default-shadowed-rounded-panel
Render a rounded panel using the package's default shadow style.
Ptr -> BoxBlurEffect -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
render-default-rounded-panel
Render a rounded panel using the package's default panel style.
Ptr -> BoxBlurEffect -> Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
init
Initialize the GPU context.
Creates a WebGPU instance, requests an adapter and device. The backend parameter is reserved for future use (pass 0 for default).
Returns:
NonNegativeInt -> Result Ptr GPUError
destroy
Destroy the GPU context and release all resources.
Ptr -> Unit
adapter-name
Get the name of the GPU adapter.
Ptr -> String
create-surface-metal-layer
Create a WGPU surface from a macOS CAMetalLayer pointer.
Ptr -> Ptr -> Result Ptr GPUError
release-surface
Release a previously created WGPU surface.
Ptr -> Unit
surface-preferred-texture-fmt
Query the preferred texture format for a surface. Uses the first format returned by surface capabilities.
Ptr -> Ptr -> Result Int GPUError
configure-surface
Configure a surface for rendering with default UI-friendly options. Uses render-attachment usage, FIFO present mode, and automatic alpha mode. Width and height are validated at runtime and must both be > 0.
Ptr -> Ptr -> Int -> Int -> Int -> Result Unit GPUError
acquire-surface-texture-view
Acquire a texture view for the current surface frame.
Ptr -> Result Ptr GPUError
begin-surface-batch
Begin a batched surface render pass. Subsequent rect and texture draws reuse the same render pass until present-surface. If no frame is currently acquired, this acquires one and clears it to transparent black.
Ptr -> Ptr -> Result Unit GPUError
begin-texture-batch
Begin a batched render pass into a render-attachment texture. Subsequent texture fill draws reuse the same render pass until finish-texture-batch. This loads existing texture contents; call clear-texture first if a fresh transparent layer is needed.
Ptr -> Ptr -> Result Unit GPUError
finish-texture-batch
Finish a previously started batched render pass into a texture.
Ptr -> Result Unit GPUError
present-surface
Present the current surface frame.
Ptr -> Result Unit GPUError
clear-surface
Clear the current surface frame to a solid color and present it.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Result Unit GPUError
clear-texture
Clear a render-attachment texture to a solid color. This updates the GPU texture contents only; call Texture.download if CPU staging data is needed afterward.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Result Unit GPUError
set-surface-scissor-rect
Set a clip rectangle on the surface. Subsequent rect and texture draws respect this clip until cleared. Coordinates are in surface pixels.
Ptr -> Int -> Int -> Int -> Int -> Result Unit GPUError
clear-surface-scissor-rect
Clear any clip rectangle set on the surface. Subsequent draws render unclipped.
Ptr -> Unit
set-texture-scissor-rect
Set a clip rectangle on a render-attachment texture. Subsequent texture fill and texture-to-texture draws respect this clip until cleared. Coordinates are in texture pixels.
Ptr -> Int -> Int -> Int -> Int -> Result Unit GPUError
clear-texture-scissor-rect
Clear any clip rectangle set on a render-attachment texture.
Ptr -> Unit
fill-surface-rect
Fill a rectangle on the current surface frame. If no frame is currently acquired, this acquires one, clears it to transparent black, draws the rectangle, and presents it. If a frame is already acquired, it draws into that frame without presenting so additional rendering can follow.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-surface-rounded-rect
Fill a rounded rectangle on the current surface frame. Radius is in surface pixels. If no frame is currently acquired, this acquires one, clears it to transparent black, draws the rounded rectangle, and presents it. If a frame is already acquired, it draws into that frame without presenting so additional rendering can follow.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-surface-vertical-gradient-rounded-rect
Fill a rounded rectangle with a vertical gradient on the current surface frame. Radius is in surface pixels.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
stroke-surface-rounded-rect
Stroke a rounded rectangle on the current surface frame. Stroke width and radius are in surface pixels.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-surface-corner-rounded-rect
Fill a rounded rectangle with independent corner radii on the current surface frame. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-surface-vertical-gradient-corner-rounded-rect
Fill a rounded rectangle with a vertical gradient and independent corner radii on the current surface frame. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
stroke-surface-corner-rounded-rect
Stroke a rounded rectangle with independent corner radii on the current surface frame. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-rect
Fill a rectangle into a render-attachment texture. This updates the GPU texture contents only; call Texture.download if CPU staging data is needed afterward.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-rounded-rect
Fill a rounded rectangle into a render-attachment texture.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-vertical-gradient-rounded-rect
Fill a rounded rectangle with a vertical gradient into a render-attachment texture.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
stroke-texture-rounded-rect
Stroke a rounded rectangle into a render-attachment texture.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-corner-rounded-rect
Fill a rounded rectangle with independent corner radii into a render-attachment texture. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
fill-texture-vertical-gradient-corner-rounded-rect
Fill a rounded rectangle with a vertical gradient and independent corner radii into a render-attachment texture. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
stroke-texture-corner-rounded-rect
Stroke a rounded rectangle with independent corner radii into a render-attachment texture. Corner order is top-left, top-right, bottom-right, bottom-left.
Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
draw-texture-texture
Draw a source texture into a destination rectangle on a render-attachment texture. The target texture may already have an active batch started with begin-texture-batch.
Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Result Unit GPUError
draw-texture-texture-region
Draw a source region of a source texture into a destination rectangle on a render-attachment texture. Source coordinates are in source texture pixels.
Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
draw-surface-texture
Draw a texture into a destination rectangle on the current surface frame. If no frame is currently acquired, this acquires one, clears it to transparent black, draws the texture, and presents it. If a frame is already acquired, it draws into that frame without presenting so additional rendering can follow.
Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Result Unit GPUError
draw-surface-texture-region
Draw a region of a texture into a destination rectangle on the current surface frame. Source coordinates are in texture pixels. If no frame is currently acquired, this acquires one, clears it to transparent black, draws the texture region, and presents it. If a frame is already acquired, it draws into that frame without presenting so additional rendering can follow.
Ptr -> Ptr -> Ptr -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Result Unit GPUError
create
Create a 2D GPU texture with a CPU staging buffer.
Parameters:
Returns:
Ptr -> PositiveInt -> PositiveInt -> Int -> Int -> Result Ptr GPUError
width
Get the width of a texture in pixels.
Ptr -> Int
height
Get the height of a texture in pixels.
Ptr -> Int
set-pixel
Set a pixel's RGBA values in the CPU staging buffer. Values are clamped to 0-255.
Ptr -> NonNegativeInt -> NonNegativeInt -> Byte -> Byte -> Byte -> Byte -> Unit
get-pixel-r
Get the red channel of a pixel from the CPU staging buffer.
Ptr -> NonNegativeInt -> NonNegativeInt -> Int
get-pixel-g
Get the green channel of a pixel from the CPU staging buffer.
Ptr -> NonNegativeInt -> NonNegativeInt -> Int
get-pixel-b
Get the blue channel of a pixel from the CPU staging buffer.
Ptr -> NonNegativeInt -> NonNegativeInt -> Int
get-pixel-a
Get the alpha channel of a pixel from the CPU staging buffer.
Ptr -> NonNegativeInt -> NonNegativeInt -> Int
upload
Upload staging buffer data to the GPU texture.
Ptr -> Ptr -> Result Unit GPUError
download
Download GPU texture data to the CPU staging buffer.
Ptr -> Ptr -> Result Unit GPUError
create-view
Create a texture view for use in bind groups.
Ptr -> Result Ptr GPUError
release
Release a texture and its staging buffer.
Ptr -> Unit
copy-from-bytes
Copy raw bytes from an image data pointer into the texture staging buffer. Handles channel conversion (1ch/3ch/4ch → RGBA8) internally.
Ptr -> Ptr -> PositiveInt -> PositiveInt -> PositiveInt -> Unit
copy-to-bytes
Copy texture staging buffer data to a raw byte pointer. Handles channel conversion (RGBA8 → 1ch/3ch/4ch) internally.
Ptr -> Ptr -> PositiveInt -> PositiveInt -> PositiveInt -> Unit
release-view
Release a texture view.
Ptr -> Unit
atlas-glyph
Construct a glyph record for a texture atlas.
Record shape: - src-x, src-y: source origin in texture pixels - src-width, src-height: source size in texture pixels - advance: logical advance in destination pixels at scale 1.0
Float -> Float -> Float -> Float -> Float -> {src-x: Float, src-y: Float, src-width: Float, src-height: Float, advance: Float}
draw-glyph
Draw a single atlas glyph to the current surface frame.
Ptr -> Ptr -> Ptr -> {src-x: Float, src-y: Float, src-width: Float, src-height: Float, advance: Float} -> Float -> Float -> Float -> Result Unit GPUError
measure-run-width
Measure the width of a glyph run at the given scale and letter spacing.
List {src-x: Float, src-y: Float, src-width: Float, src-height: Float, advance: Float} -> Float -> Float -> Float
draw-run
Draw a horizontal run of atlas glyphs to the current surface frame.
Ptr -> Ptr -> Ptr -> List {src-x: Float, src-y: Float, src-width: Float, src-height: Float, advance: Float} -> Float -> Float -> Float -> Float -> Result Unit GPUError
create
Create a GPU sampler for texture filtering.
Parameters:
Returns:
Ptr -> Int -> Int -> Int -> Result Ptr GPUError
release
Release a sampler and its resources.
Ptr -> Unit
create
Create a GPU buffer for float data.
Parameters:
Returns:
Ptr -> PositiveInt -> Int -> Int -> Result Ptr GPUError
set-float
Write a float value to a mapped buffer at the given index.
Ptr -> NonNegativeInt -> Float -> Unit
get-float
Read a float value from a mapped buffer at the given index.
Ptr -> NonNegativeInt -> Float
map-read
Map a buffer for CPU reading. Blocks until the buffer is mapped.
Parameters:
Returns:
Ptr -> Ptr -> Result Unit GPUError
unmap
Unmap a previously mapped buffer.
Ptr -> Unit
copy
Copy float data from one buffer to another on the GPU.
Ptr -> Ptr -> Ptr -> PositiveInt -> Unit
release
Release a buffer and its resources.
Ptr -> Unit
GPUError
GPU error type for typed error handling. Variants distinguish between different failure modes.
Variants
AdapterNotFound {message}DeviceRequestFailed {message}ShaderCompileError {message}BufferError {message}ComputeError {message}TextureError {message}buffer-usage-map-read
Buffer can be mapped for reading.
buffer-usage-map-write
Buffer can be mapped for writing.
buffer-usage-copy-src
Buffer can be used as a copy source.
buffer-usage-copy-dst
Buffer can be used as a copy destination.
buffer-usage-uniform
Buffer can be used as a uniform buffer.
buffer-usage-storage
Buffer can be used as a storage buffer.
texture-format-r8-unorm
R8Unorm texture format (1 byte per pixel, single channel).
texture-format-r32-float
R32Float texture format (4 bytes per pixel, single float channel).
texture-format-rgba8-unorm
RGBA8Unorm texture format (4 bytes per pixel, 8-bit RGBA).
texture-format-rgba8-unorm-srgb
RGBA8UnormSrgb texture format (4 bytes per pixel, sRGB RGBA).
texture-format-bgra8-unorm
BGRA8Unorm texture format (4 bytes per pixel, BGRA order).
texture-format-rgba32-float
RGBA32Float texture format (16 bytes per pixel, 32-bit float RGBA).
texture-usage-copy-src
Texture can be used as a copy source.
texture-usage-copy-dst
Texture can be used as a copy destination.
texture-usage-texture-binding
Texture can be bound as a sampled texture (for textureLoad/textureSample).
texture-usage-storage-binding
Texture can be bound as a storage texture (for textureStore).
texture-usage-render-attachment
Texture can be used as a render target attachment.
filter-nearest
Nearest-neighbor filtering.
filter-linear
Linear interpolation filtering.
address-clamp-to-edge
Clamp texture coordinates to [0, 1].
address-repeat
Repeat texture coordinates.
address-mirror-repeat
Mirror and repeat texture coordinates.