wzzc-dev/moui/render does not have a README file

    HostSurfaceCapability

    pub(open) trait HostSurfaceCapability {
    fn surface_id(Self) -> String
    fn metrics(Self) ->
    SurfaceMetrics

    fn cpu_present(Self) -> PresentTarget?
    fn native_surface(Self) -> NativeSurface?
    fn image_source(Self) -> HostImageSource?
    }

    Object-safe capabilities supplied by one platform window.

    NativeSurfaceCapability

    pub(open) trait NativeSurfaceCapability {
    fn surface_handle(Self) -> UInt64
    fn display_handle(Self) -> UInt64?
    fn acquire(Self,
    SurfaceMetrics
    ) -> UInt64?
    fn present(Self, UInt64) -> Bool
    fn resize(Self,
    SurfaceMetrics
    ) -> Unit
    fn dispose(Self) -> Unit
    }

    Object-safe native-surface operations. Handles have no platform or graphics API tag in the root contract; the selected renderer interprets them using its composition-root platform policy.

    FrameToken

    pub struct FrameToken {
    // private fields
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    Identifies one frame submission for one native-surface generation.

    FrameToken::equal

    fn FrameToken::equal(FrameToken, FrameToken) -> Bool
    automatically derived

    FrameToken::new

    fn FrameToken::new(surface_generation~ : Int, sequence~ : Int) -> FrameToken

    FrameToken::not_equal

    fn FrameToken::not_equal(x : FrameToken, y : FrameToken) -> Bool
    automatically derived

    FrameToken::sequence

    fn FrameToken::sequence(self : FrameToken) -> Int

    FrameToken::surface_generation

    fn FrameToken::surface_generation(self : FrameToken) -> Int

    FrameToken::to_json

    automatically derived

    FrameToken::to_repr

    automatically derived

    HostImageSource

    pub struct HostImageSource {
    read_fn : (String) -> Bytes?
    }

    Renderer-neutral image source supplied by a platform backend. Format detection and decoding stay in the selected renderer module.

    HostImageSource::new

    fn HostImageSource::new(read~ : (String) -> Bytes?) -> HostImageSource

    HostImageSource::read

    fn HostImageSource::read(self : HostImageSource, source : String) -> Bytes?

    HostImageSource::unavailable

    fn HostImageSource::unavailable() -> HostImageSource

    HostSurface

    pub struct HostSurface {
    capability : &HostSurfaceCapability
    }

    Opaque surface wrapper passed from a platform backend to renderer providers.

    HostSurface::cpu_present

    fn HostSurface::cpu_present(self : HostSurface) -> PresentTarget?

    HostSurface::from_capability

    fn HostSurface::from_capability(capability : &HostSurfaceCapability) -> HostSurface

    HostSurface::image_source

    fn HostSurface::image_source(self : HostSurface) -> HostImageSource?

    HostSurface::native_surface

    fn HostSurface::native_surface(self : HostSurface) -> NativeSurface?

    HostSurface::new

    fn HostSurface::new(surface_id? : String, metrics~ :
    SurfaceMetrics
    , cpu_present? : PresentTarget?, native_surface? : NativeSurface?, image_source? : HostImageSource?) -> HostSurface

    HostSurface::surface_id

    fn HostSurface::surface_id(self : HostSurface) -> String

    ImageResourceLoadCompletion

    pub(all) struct ImageResourceLoadCompletion {
    source : String
    status : ImageResourceLoadCompletionStatus
    width : Int
    height : Int
    diagnostic : String
    background_io : Bool
    decoded_pixels : Bytes
    decoded_row_bytes : Int
    background_decode : Bool
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    ImageResourceLoadCompletion::equal

    automatically derived

    ImageResourceLoadCompletion::failed

    fn ImageResourceLoadCompletion::failed(source : String, diagnostic~ : String, background_io? : Bool) -> ImageResourceLoadCompletion

    ImageResourceLoadCompletion::has_decoded_rgba_payload

    fn ImageResourceLoadCompletion::has_decoded_rgba_payload(self : ImageResourceLoadCompletion) -> Bool

    ImageResourceLoadCompletion::not_equal

    automatically derived

    ImageResourceLoadCompletion::ready

    fn ImageResourceLoadCompletion::ready(source : String, width~ : Int, height~ : Int, background_io? : Bool) -> ImageResourceLoadCompletion

    ImageResourceLoadCompletion::ready_decoded_rgba

    fn ImageResourceLoadCompletion::ready_decoded_rgba(source : String, width~ : Int, height~ : Int, row_bytes~ : Int, pixels : Bytes, background_io? : Bool, background_decode? : Bool) -> ImageResourceLoadCompletion

    ImageResourceLoadCompletion::to_json

    automatically derived

    ImageResourceLoadCompletion::to_repr

    automatically derived

    ImageResourceLoadCompletionStatus

    pub(all) enum ImageResourceLoadCompletionStatus {
    ImageLoadReady
    ImageLoadFailed
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    ImageResourceLoadCompletionStatus::equal

    automatically derived

    ImageResourceLoadCompletionStatus::not_equal

    automatically derived

    ImageResourceLoadCompletionStatus::to_json

    automatically derived

    ImageResourceLoadCompletionStatus::to_repr

    automatically derived

    ImageResourceRecord

    pub(all) struct ImageResourceRecord {
    source : String
    status : ImageResourceStatus
    width : Int
    height : Int
    diagnostic : String
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    ImageResourceRecord::disposed

    fn ImageResourceRecord::disposed(source : String) -> ImageResourceRecord

    ImageResourceRecord::equal

    automatically derived

    ImageResourceRecord::failed

    fn ImageResourceRecord::failed(source : String, diagnostic~ : String) -> ImageResourceRecord

    ImageResourceRecord::loading

    fn ImageResourceRecord::loading(source : String) -> ImageResourceRecord

    ImageResourceRecord::not_equal

    automatically derived

    ImageResourceRecord::ready

    fn ImageResourceRecord::ready(source : String, width~ : Int, height~ : Int) -> ImageResourceRecord

    ImageResourceRecord::to_json

    automatically derived

    ImageResourceRecord::to_repr

    automatically derived

    ImageResourceStatus

    pub(all) enum ImageResourceStatus {
    ImageLoading
    ImageReady
    ImageFailed
    ImageDisposed
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    ImageResourceStatus::equal

    automatically derived

    ImageResourceStatus::not_equal

    automatically derived

    ImageResourceStatus::to_json

    automatically derived

    ImageResourceStatus::to_repr

    automatically derived

    NativeSurface

    pub struct NativeSurface {
    capability : &NativeSurfaceCapability
    }

    Opaque wrapper around native surface operations. Construction rejects zero surface handles and zero display handles.

    NativeSurface::acquire

    NativeSurface::display_handle

    fn NativeSurface::display_handle(self : NativeSurface) -> UInt64?

    NativeSurface::dispose

    fn NativeSurface::dispose(self : NativeSurface) -> Unit

    NativeSurface::new

    fn NativeSurface::new(surface_handle~ : UInt64, display_handle? : UInt64?, acquire? : (
    SurfaceMetrics
    ) -> UInt64?, present? : (UInt64) -> Bool, resize? : (
    SurfaceMetrics
    ) -> Unit, dispose? : () -> Unit) -> NativeSurface?

    NativeSurface::present

    fn NativeSurface::present(self : NativeSurface, surface : UInt64) -> Bool

    NativeSurface::resize

    NativeSurface::surface_handle

    fn NativeSurface::surface_handle(self : NativeSurface) -> UInt64

    PixelFrame

    pub(all) struct PixelFrame {
    width : Int
    height : Int
    row_bytes : Int
    scale_factor : Double
    pixels : Bytes
    }

    A renderer-neutral pixel frame supplied to a host presenter.

    PixelFrame::height

    fn PixelFrame::height(self : PixelFrame) -> Int

    PixelFrame::new

    fn PixelFrame::new(width~ : Int, height~ : Int, row_bytes~ : Int, scale_factor~ : Double, pixels~ : Bytes) -> PixelFrame

    PixelFrame::pixels

    fn PixelFrame::pixels(self : PixelFrame) -> Bytes

    PixelFrame::row_bytes

    fn PixelFrame::row_bytes(self : PixelFrame) -> Int

    PixelFrame::scale_factor

    fn PixelFrame::scale_factor(self : PixelFrame) -> Double

    PixelFrame::width

    fn PixelFrame::width(self : PixelFrame) -> Int

    PresentTarget

    pub struct PresentTarget {
    description : String
    present_fn : (PixelFrame) -> Bool
    }

    A CPU presenter owned by a platform backend. The callback is expressed in neutral bytes and does not depend on a renderer module.

    PresentTarget::description

    fn PresentTarget::description(self : PresentTarget) -> String

    PresentTarget::new

    fn PresentTarget::new(description~ : String, present~ : (PixelFrame) -> Bool) -> PresentTarget

    PresentTarget::present

    fn PresentTarget::present(self : PresentTarget, frame : PixelFrame) -> Bool

    RecoveryResult

    pub(all) enum RecoveryResult {
    RecoverySucceeded
    RecoveryFailed(String)
    FallbackToCpu
    }

    Result of a renderer recovery attempt after a context or presentation failure.

    RectBatch

    pub struct RectBatch {
    // private fields
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RectBatch::color

    RectBatch::equal

    fn RectBatch::equal(RectBatch, RectBatch) -> Bool
    automatically derived

    RectBatch::not_equal

    fn RectBatch::not_equal(x : RectBatch, y : RectBatch) -> Bool
    automatically derived

    RectBatch::rect

    RectBatch::to_json

    automatically derived

    RectBatch::to_repr

    automatically derived

    RectVertex

    pub struct RectVertex {
    // private fields
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RectVertex::a

    fn RectVertex::a(self : RectVertex) -> Double

    RectVertex::b

    fn RectVertex::b(self : RectVertex) -> Double

    RectVertex::equal

    fn RectVertex::equal(RectVertex, RectVertex) -> Bool
    automatically derived

    RectVertex::g

    fn RectVertex::g(self : RectVertex) -> Double

    RectVertex::not_equal

    fn RectVertex::not_equal(x : RectVertex, y : RectVertex) -> Bool
    automatically derived

    RectVertex::r

    fn RectVertex::r(self : RectVertex) -> Double

    RectVertex::to_json

    automatically derived

    RectVertex::to_repr

    automatically derived

    RectVertex::x

    fn RectVertex::x(self : RectVertex) -> Double

    RectVertex::y

    fn RectVertex::y(self : RectVertex) -> Double

    RenderFrameInput

    RenderFrameInput::equal

    automatically derived

    RenderFrameInput::not_equal

    fn RenderFrameInput::not_equal(x : RenderFrameInput, y : RenderFrameInput) -> Bool
    automatically derived

    RenderFrameInput::to_json

    automatically derived

    RenderFrameInput::to_repr

    automatically derived

    RenderFrameResult

    pub(all) struct RenderFrameResult {
    presented : Bool
    queued : Bool
    cache_hit_count : Int
    cache_miss_count : Int
    cache_update_count : Int
    cache_evict_count : Int
    diagnostics : Array[
    DiagnosticEvent
    ]
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RenderFrameResult::equal

    automatically derived

    RenderFrameResult::new

    fn RenderFrameResult::new(presented? : Bool, queued? : Bool, cache_hit_count? : Int, cache_miss_count? : Int, cache_update_count? : Int, cache_evict_count? : Int, diagnostics? : Array[
    DiagnosticEvent
    ]) -> RenderFrameResult

    RenderFrameResult::not_equal

    fn RenderFrameResult::not_equal(x : RenderFrameResult, y : RenderFrameResult) -> Bool
    automatically derived

    RenderFrameResult::to_json

    automatically derived

    RenderFrameResult::to_repr

    automatically derived

    RenderFrameSubmission

    pub struct RenderFrameSubmission {
    // private fields
    }

    A draw frame paired with the backend-owned submission identity.

    RenderFrameSubmission::token

    RenderPresentCompletion

    pub(all) struct RenderPresentCompletion {
    token : FrameToken
    submitted_at_ms : Double
    completed_at_ms : Double
    presented_at_ms : Double
    status : RenderPresentStatus
    gpu_context_generation : Int
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    Renderer-worker completion metadata. The frame token is the only identity used by backend frame owners to accept or reject an asynchronous result.

    RenderPresentCompletion::completed_at_ms

    fn RenderPresentCompletion::completed_at_ms(self : RenderPresentCompletion) -> Double

    RenderPresentCompletion::equal

    automatically derived

    RenderPresentCompletion::gpu_context_generation

    fn RenderPresentCompletion::gpu_context_generation(self : RenderPresentCompletion) -> Int

    RenderPresentCompletion::new

    fn RenderPresentCompletion::new(token~ : FrameToken, submitted_at_ms~ : Double, completed_at_ms~ : Double, presented_at_ms~ : Double, status~ : RenderPresentStatus, gpu_context_generation~ : Int) -> RenderPresentCompletion

    RenderPresentCompletion::not_equal

    automatically derived

    RenderPresentCompletion::presented_at_ms

    fn RenderPresentCompletion::presented_at_ms(self : RenderPresentCompletion) -> Double

    RenderPresentCompletion::status

    RenderPresentCompletion::submitted_at_ms

    fn RenderPresentCompletion::submitted_at_ms(self : RenderPresentCompletion) -> Double

    RenderPresentCompletion::to_json

    automatically derived

    RenderPresentCompletion::to_repr

    automatically derived

    RenderPresentCompletion::token

    RenderPresentStatus

    pub(all) enum RenderPresentStatus {
    Recorded
    Presented
    Dropped
    FallbackToRaster
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    Completion emitted by an asynchronous renderer worker. A queued frame is not considered presented until the host drains this record.

    RenderPresentStatus::equal

    automatically derived

    RenderPresentStatus::not_equal

    automatically derived

    RenderPresentStatus::to_json

    automatically derived

    RenderPresentStatus::to_repr

    automatically derived

    RenderWindowId

    pub(all) struct RenderWindowId {
    value : Int
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    Renderer-level window identifier. Mirror of WindowId in the host package — the host converts between the two at the API boundary so that moui/render never imports moui/backend.

    RenderWindowId::equal

    automatically derived

    RenderWindowId::new

    fn RenderWindowId::new(value : Int) -> RenderWindowId

    RenderWindowId::not_equal

    fn RenderWindowId::not_equal(x : RenderWindowId, y : RenderWindowId) -> Bool
    automatically derived

    RenderWindowId::to_json

    automatically derived

    RenderWindowId::to_repr

    automatically derived

    RendererBackendFeatureCapability

    pub(all) struct RendererBackendFeatureCapability {
    provider_id : String
    feature : RendererFeature
    backend : RendererBackendKind
    status : RendererFeatureStatus
    note : String
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererBackendFeatureCapability::equal

    automatically derived

    RendererBackendFeatureCapability::new

    fn RendererBackendFeatureCapability::new(provider_id~ : String, feature~ : RendererFeature, backend~ : RendererBackendKind, status~ : RendererFeatureStatus, note? : String) -> RendererBackendFeatureCapability

    RendererBackendFeatureCapability::not_equal

    automatically derived

    RendererBackendFeatureCapability::to_json

    automatically derived

    RendererBackendFeatureCapability::to_repr

    automatically derived

    RendererBackendInfo

    pub(all) struct RendererBackendInfo {
    backend : RendererBackendKind
    status : RendererCapabilityStatus
    can_render : Bool
    can_resize : Bool
    owns_surface : Bool
    description : String
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererBackendInfo::equal

    automatically derived

    RendererBackendInfo::new

    fn RendererBackendInfo::new(backend~ : RendererBackendKind, status~ : RendererCapabilityStatus, can_render~ : Bool, can_resize~ : Bool, owns_surface~ : Bool, description? : String) -> RendererBackendInfo

    RendererBackendInfo::not_equal

    automatically derived

    RendererBackendInfo::to_json

    automatically derived

    RendererBackendInfo::to_repr

    automatically derived

    RendererBackendKind

    pub(all) enum RendererBackendKind {
    NativeWgpu
    WebGpuWasm
    SkiaRasterNative
    SkiaGpuNative
    SunRasterNative
    Canvas2DWasm
    TerminalAnsiNative
    NativeDirectGpu
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    MoUI renderer facade. Core value types (RendererBackendKind, @core.SurfaceMetrics, RenderFrameResult, …) are defined in this file. The package also owns opaque host-surface capabilities, image/frame DTOs, capability reporting, and the provider/session plugin system (ADR 0027) in provider_contract.mbt and renderer_session.mbt.

    RendererProvider plugin system

    See provider_contract.mbt for:
    • RendererProvider — static registration and delayed surface binding
    • RendererSession — complete per-window live renderer lifecycle
    • HostSurface — opaque platform capability wrapper

    Provider selection and registries live in moui/render/common. Concrete providers live in sub-packages:
    • moui_skia_renderer
    • moui_wgpu_renderer
    • moui_sun_renderer
    • moui_web_renderer and moui_web_renderer/canvas2d
    • moui_tui_renderer

    RendererBackendKind::equal

    automatically derived

    RendererBackendKind::family

    RendererBackendKind::label

    fn RendererBackendKind::label(self : RendererBackendKind) -> String

    RendererBackendKind::not_equal

    automatically derived

    RendererBackendKind::short_label

    fn RendererBackendKind::short_label(self : RendererBackendKind) -> String

    RendererBackendKind::to_json

    automatically derived

    RendererBackendKind::to_repr

    automatically derived

    RendererBindResult

    pub(all) enum RendererBindResult {
    Bound(RendererSession)
    Rejected(String)
    }

    Result of asking one provider to bind a host surface. Rejection must be inspection-only: a provider may not retain renderer or native-surface resources unless it returns Bound.

    RendererCapabilityStatus

    pub(all) enum RendererCapabilityStatus {
    Supported
    Unavailable
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererCapabilityStatus::equal

    automatically derived

    RendererCapabilityStatus::not_equal

    automatically derived

    RendererCapabilityStatus::to_json

    automatically derived

    RendererCapabilityStatus::to_repr

    automatically derived

    RendererCommandFallback

    pub struct RendererCommandFallback {
    // private fields
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererCommandFallback::command

    fn RendererCommandFallback::command(self : RendererCommandFallback) -> String

    RendererCommandFallback::equal

    automatically derived

    RendererCommandFallback::feature

    RendererCommandFallback::index

    RendererCommandFallback::new

    fn RendererCommandFallback::new(index~ : Int, feature~ : RendererFeature, command~ : String, kind? : RendererCommandFallbackKind, reason~ : String) -> RendererCommandFallback

    RendererCommandFallback::not_equal

    automatically derived

    RendererCommandFallback::reason

    RendererCommandFallback::to_json

    automatically derived

    RendererCommandFallback::to_repr

    automatically derived

    RendererCommandFallbackKind

    pub(all) enum RendererCommandFallbackKind {
    PlannedFallback
    UnbalancedPop
    UnclosedScope
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererCommandFallbackKind::equal

    automatically derived

    RendererCommandFallbackKind::not_equal

    automatically derived

    RendererCommandFallbackKind::to_json

    automatically derived

    RendererCommandFallbackKind::to_repr

    automatically derived

    RendererCommandPlan

    pub struct RendererCommandPlan {
    // private fields
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererCommandPlan::equal

    automatically derived

    RendererCommandPlan::fallback_count

    fn RendererCommandPlan::fallback_count(self : RendererCommandPlan) -> Int

    RendererCommandPlan::fallbacks

    RendererCommandPlan::final_filter_depth

    fn RendererCommandPlan::final_filter_depth(self : RendererCommandPlan) -> Int

    RendererCommandPlan::final_layer_depth

    fn RendererCommandPlan::final_layer_depth(self : RendererCommandPlan) -> Int

    RendererCommandPlan::new

    fn RendererCommandPlan::new(total_commands~ : Int, fallback_count~ : Int, final_layer_depth~ : Int, final_filter_depth~ : Int, fallbacks~ : Array[RendererCommandFallback]) -> RendererCommandPlan

    RendererCommandPlan::not_equal

    automatically derived

    RendererCommandPlan::to_json

    automatically derived

    RendererCommandPlan::to_repr

    automatically derived

    RendererCommandPlan::total_commands

    fn RendererCommandPlan::total_commands(self : RendererCommandPlan) -> Int

    RendererControlMessage

    pub(all) enum RendererControlMessage {
    Resize(
    Size
    )
    Detach
    ContextLoss(String)
    Shutdown
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    Ordered control messages shared by the renderer facade and the common mailbox implementation. Frame submission policy remains in render/common.

    RendererControlMessage::equal

    automatically derived

    RendererControlMessage::not_equal

    automatically derived

    RendererControlMessage::to_json

    automatically derived

    RendererControlMessage::to_repr

    automatically derived

    RendererDescriptor

    pub(all) struct RendererDescriptor {
    backend : RendererBackendKind
    family : RendererFamily
    presentation : RendererPresentationModel
    supported_targets : Array[RendererTarget]
    capabilities : Array[RendererBackendFeatureCapability]
    description : String
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererDescriptor::equal

    automatically derived

    RendererDescriptor::new

    fn RendererDescriptor::new(backend~ : RendererBackendKind, family~ : RendererFamily, presentation~ : RendererPresentationModel, supported_targets~ : Array[RendererTarget], capabilities~ : Array[RendererBackendFeatureCapability], description? : String) -> RendererDescriptor

    RendererDescriptor::not_equal

    automatically derived

    RendererDescriptor::to_json

    automatically derived

    RendererDescriptor::to_repr

    automatically derived

    RendererEvent

    pub(all) enum RendererEvent {
    PresentCompleted(RenderPresentCompletion)
    ImageLoadRequested(RendererImageLoadRequest)
    }

    RendererFamily

    pub(all) enum RendererFamily {
    Wgpu
    WebGpu
    Skia
    Sun
    Canvas2D
    Terminal
    DirectGpu
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererFamily::equal

    automatically derived

    RendererFamily::label

    fn RendererFamily::label(self : RendererFamily) -> String

    RendererFamily::not_equal

    fn RendererFamily::not_equal(x : RendererFamily, y : RendererFamily) -> Bool
    automatically derived

    RendererFamily::to_json

    automatically derived

    RendererFamily::to_repr

    automatically derived

    RendererFeature

    pub(all) enum RendererFeature {
    Rect
    RoundedRect
    Gradient
    Shadow
    Text
    Image
    Clip
    Transform
    Opacity
    LayerCompositing
    BlendMode
    FilterEffect
    PathVector
    ShaderEffect
    TextShaping
    EmojiText
    AsyncImage
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererFeature::equal

    automatically derived

    RendererFeature::label

    fn RendererFeature::label(self : RendererFeature) -> String

    RendererFeature::not_equal

    fn RendererFeature::not_equal(x : RendererFeature, y : RendererFeature) -> Bool
    automatically derived

    RendererFeature::to_json

    automatically derived

    RendererFeature::to_repr

    automatically derived

    RendererFeatureCapability

    pub(all) struct RendererFeatureCapability {
    feature : RendererFeature
    providers : Array[RendererBackendFeatureCapability]
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererFeatureCapability::equal

    automatically derived

    RendererFeatureCapability::needs_follow_up

    fn RendererFeatureCapability::needs_follow_up(self : RendererFeatureCapability) -> Bool

    RendererFeatureCapability::new

    RendererFeatureCapability::not_equal

    automatically derived

    RendererFeatureCapability::note_for_provider

    fn RendererFeatureCapability::note_for_provider(self : RendererFeatureCapability, provider_id : String) -> String

    RendererFeatureCapability::provider_capability

    fn RendererFeatureCapability::provider_capability(self : RendererFeatureCapability, provider_id : String) -> RendererBackendFeatureCapability?

    RendererFeatureCapability::status_for_provider

    fn RendererFeatureCapability::status_for_provider(self : RendererFeatureCapability, provider_id : String) -> RendererFeatureStatus

    RendererFeatureCapability::to_json

    automatically derived

    RendererFeatureCapability::to_repr

    automatically derived

    RendererFeatureStatus

    pub(all) enum RendererFeatureStatus {
    Supported
    Partial
    Gap
    HostForwarded
    Unavailable
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererFeatureStatus::equal

    automatically derived

    RendererFeatureStatus::label

    fn RendererFeatureStatus::label(self : RendererFeatureStatus) -> String

    RendererFeatureStatus::needs_follow_up

    fn RendererFeatureStatus::needs_follow_up(self : RendererFeatureStatus) -> Bool

    RendererFeatureStatus::not_equal

    automatically derived

    RendererFeatureStatus::to_json

    automatically derived

    RendererFeatureStatus::to_repr

    automatically derived

    RendererGpuRecoveryCapability

    pub struct RendererGpuRecoveryCapability {
    // private fields
    }

    RendererGpuRecoveryCapability::new

    fn RendererGpuRecoveryCapability::new(inject_context_loss? : () -> Unit, gpu_recovery_count? : () -> Int, gpu_fallback_active? : () -> Bool) -> RendererGpuRecoveryCapability

    RendererImageCompletionResult

    pub(all) enum RendererImageCompletionResult {
    Applied(Bool)
    Stale
    Disposed
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererImageCompletionResult::equal

    automatically derived

    RendererImageCompletionResult::not_equal

    automatically derived

    RendererImageCompletionResult::to_json

    automatically derived

    RendererImageCompletionResult::to_repr

    automatically derived

    RendererImageDecoder

    pub struct RendererImageDecoder {
    decode_fn : (String, Bytes?) -> ImageResourceLoadCompletion
    }

    Renderer-owned byte decoder used to build a host async image loader.

    RendererImageDecoder::decode

    fn RendererImageDecoder::decode(self : RendererImageDecoder, source : String, bytes : Bytes?) -> ImageResourceLoadCompletion

    RendererImageDecoder::new

    RendererImageDiagnostics

    pub struct RendererImageDiagnostics {
    // private fields
    }

    RendererImageDiagnostics::pending_request_count

    fn RendererImageDiagnostics::pending_request_count(self : RendererImageDiagnostics) -> Int

    RendererImageDiagnostics::records

    RendererImageLoadCompletion

    pub struct RendererImageLoadCompletion {
    // private fields
    }

    RendererImageLoadCompletion::result

    RendererImageLoadCompletion::token

    RendererImageLoadRequest

    pub struct RendererImageLoadRequest {
    // private fields
    }

    RendererImageLoadRequest::load

    Decode this request, reading the source through the host's synchronous HostImageSource.

    RendererImageLoadRequest::load_bytes

    Decode this request from bytes the host already obtained out-of-band.

    A host that fetches asynchronously — remote sources on a worker, for example — must not re-read through the synchronous HostImageSource, which would either block the caller or return nothing. It hands the fetched payload here instead, and decoding stays in the renderer-owned decoder.

    RendererImageLoadRequest::source

    RendererImageLoadRequest::token

    RendererImageLoadToken

    pub struct RendererImageLoadToken {
    // private fields
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    Opaque renderer-owned identity for one image I/O request.

    RendererImageLoadToken::equal

    automatically derived

    RendererImageLoadToken::not_equal

    automatically derived

    RendererImageLoadToken::to_json

    automatically derived

    RendererImageLoadToken::to_repr

    automatically derived

    RendererPlatformViewCapability

    pub struct RendererPlatformViewCapability {
    // private fields
    }

    RendererPlatformViewCapability::new

    fn RendererPlatformViewCapability::new(draw_platform_view_pixels? : (Bytes, Int, Int, Int, Double, Double, Double, Double) -> Unit, set_platform_view_draw_fn? : (() -> Unit?) -> Unit) -> RendererPlatformViewCapability

    RendererPresentationModel

    pub(all) enum RendererPresentationModel {
    HostGpuSurface
    WebCanvas
    CpuPixelFrame
    ExternalSurface
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererPresentationModel::equal

    automatically derived

    RendererPresentationModel::label

    RendererPresentationModel::not_equal

    automatically derived

    RendererPresentationModel::to_json

    automatically derived

    RendererPresentationModel::to_repr

    automatically derived

    RendererProvider

    pub(all) struct RendererProvider {
    id : String
    descriptor : RendererDescriptor
    capabilities : () -> Array[RendererBackendFeatureCapability]
    bind : (HostSurface) -> RendererBindResult
    }

    Static renderer registration. The composition root registers providers in preference order; moui/render/common invokes bind after the platform window has produced an opaque HostSurface.

    RendererProvider::bind_surface

    fn RendererProvider::bind_surface(self : RendererProvider, surface : HostSurface) -> RendererBindResult

    RendererProvider::capability_report

    RendererProvider::descriptor

    RendererProvider::id

    fn RendererProvider::id(self : RendererProvider) -> String

    RendererProvider::new

    fn RendererProvider::new(id~ : String, descriptor~ : RendererDescriptor, capabilities~ : () -> Array[RendererBackendFeatureCapability], bind~ : (HostSurface) -> RendererBindResult) -> RendererProvider

    RendererSelection

    pub(all) enum RendererSelection {
    Default
    Backend(RendererBackendKind)
    Family(RendererFamily)
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererSelection::equal

    automatically derived

    RendererSelection::matches_backend

    fn RendererSelection::matches_backend(self : RendererSelection, backend : RendererBackendKind) -> Bool

    RendererSelection::native_default

    fn RendererSelection::native_default() -> RendererSelection

    RendererSelection::not_equal

    fn RendererSelection::not_equal(x : RendererSelection, y : RendererSelection) -> Bool
    automatically derived

    RendererSelection::to_json

    automatically derived

    RendererSelection::to_repr

    automatically derived

    RendererSelection::web_default

    RendererSession

    pub struct RendererSession {
    // private fields
    }

    Complete live renderer lifecycle for one host surface.

    RendererSession::apply_image_load_completion

    fn RendererSession::apply_image_load_completion(self : RendererSession, completion : RendererImageLoadCompletion) -> RendererImageCompletionResult

    RendererSession::dispose

    fn RendererSession::dispose(self : RendererSession) -> Unit

    RendererSession::drain_events

    fn RendererSession::drain_events(self : RendererSession) -> Array[RendererEvent]

    RendererSession::draw_platform_view_pixels

    fn RendererSession::draw_platform_view_pixels(self : RendererSession, pixels : Bytes, src_width : Int, src_height : Int, src_stride : Int, dst_x : Double, dst_y : Double, dst_width : Double, dst_height : Double) -> Unit

    RendererSession::gpu_fallback_active

    fn RendererSession::gpu_fallback_active(self : RendererSession) -> Bool

    RendererSession::gpu_recovery_count

    fn RendererSession::gpu_recovery_count(self : RendererSession) -> Int

    RendererSession::image_diagnostics

    RendererSession::inject_context_loss

    fn RendererSession::inject_context_loss(self : RendererSession) -> Unit

    RendererSession::new

    fn RendererSession::new(resize~ : (
    SurfaceMetrics
    ) -> Unit, render_frame~ : (RenderFrameSubmission) -> RenderFrameResult, drain_events? : () -> Array[RendererEvent]?, text_system~ : () ->
    TextSystem
    , present_count? : () -> Int, reset_caches? : () -> Unit?, recover? : (String) -> RecoveryResult, dispose? : () -> Unit, image_records? : () -> Array[ImageResourceRecord], image_records_generation? : () -> Int64?, apply_image_load_completion? : (ImageResourceLoadCompletion) -> Bool, image_source? : HostImageSource, image_decoder? : RendererImageDecoder?, native_surface? : NativeSurface?, platform_view? : RendererPlatformViewCapability, gpu_recovery? : RendererGpuRecoveryCapability, surface_damage? : SurfaceDamageCapability) -> RendererSession

    RendererSession::present_count

    fn RendererSession::present_count(self : RendererSession) -> Int

    RendererSession::recover

    fn RendererSession::recover(self : RendererSession, reason : String) -> RecoveryResult

    RendererSession::render_frame

    RendererSession::reset_caches

    fn RendererSession::reset_caches(self : RendererSession) -> Bool

    Drop renderer caches that may still describe the previous plugin image. The session also forgets in-flight image requests first, so a completion from the old generation cannot repopulate a just-cleared image cache. Returns whether the renderer supplied a reset path; clearing the session's pending requests is still safe when it did not.

    RendererSession::resize

    RendererSession::set_platform_view_draw_fn

    fn RendererSession::set_platform_view_draw_fn(self : RendererSession, draw_fn : () -> Unit?) -> Unit

    RendererSession::surface_damage_capability

    fn RendererSession::surface_damage_capability(self : RendererSession) -> SurfaceDamageCapability

    RendererSession::text_system

    RendererTarget

    pub(all) enum RendererTarget {
    Native
    WasmGc
    Web
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    RendererTarget::equal

    automatically derived

    RendererTarget::not_equal

    fn RendererTarget::not_equal(x : RendererTarget, y : RendererTarget) -> Bool
    automatically derived

    RendererTarget::to_json

    automatically derived

    RendererTarget::to_repr

    automatically derived

    SurfaceDamageCapability

    pub(all) enum SurfaceDamageCapability {
    FullSurfaceOnly
    SubRect
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    What a renderer session is allowed to do with DrawFrame.damage.

    FullSurfaceOnly is the default and preserves the frame contract: every presented frame overwrites the whole surface. SubRect is an explicit capability granted by the composition root after the renderer proves its clear, clip, redraw, and present paths preserve pixels outside the damage region.

    SurfaceDamageCapability::equal

    automatically derived

    SurfaceDamageCapability::label

    SurfaceDamageCapability::not_equal

    automatically derived

    SurfaceDamageCapability::to_json

    automatically derived

    SurfaceDamageCapability::to_repr

    automatically derived

    WgpuSurfaceContract

    pub(all) struct WgpuSurfaceContract {
    source : WgpuSurfaceSourceKind
    backend : RendererBackendKind
    ready : Bool
    description : String
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    WgpuSurfaceContract::equal

    automatically derived

    WgpuSurfaceContract::new

    fn WgpuSurfaceContract::new(source~ : WgpuSurfaceSourceKind, backend~ : RendererBackendKind, ready~ : Bool, description? : String) -> WgpuSurfaceContract

    WgpuSurfaceContract::not_equal

    automatically derived

    WgpuSurfaceContract::to_json

    automatically derived

    WgpuSurfaceContract::to_repr

    automatically derived

    WgpuSurfaceSourceKind

    pub(all) enum WgpuSurfaceSourceKind {
    NativeHostSurface
    WebCanvasSurface
    } derive(Eq,
    Debug
    ,
    ToJson
    )

    WgpuSurfaceSourceKind::equal

    automatically derived

    WgpuSurfaceSourceKind::not_equal

    automatically derived

    WgpuSurfaceSourceKind::to_json

    automatically derived

    WgpuSurfaceSourceKind::to_repr

    automatically derived

    collect_rect_batches

    fn collect_rect_batches(commands : Array[
    DrawCommand
    ]) -> Array[RectBatch]

    first_clear_color

    grow_capacity

    fn grow_capacity(required : UInt64) -> UInt64

    rect_batches_to_vertices

    fn rect_batches_to_vertices(batches : Array[RectBatch], size :
    Size
    ) -> Array[RectVertex]

    rect_vertices_to_bytes

    fn rect_vertices_to_bytes(vertices : Array[RectVertex]) -> Bytes

    render_present_completion_is_presented

    fn render_present_completion_is_presented(completion : RenderPresentCompletion) -> Bool

    render_present_completions_have_presented

    fn render_present_completions_have_presented(completions : Array[RenderPresentCompletion]) -> Bool

    render_present_completions_have_terminal

    fn render_present_completions_have_terminal(completions : Array[RenderPresentCompletion]) -> Bool

    size_dim_to_uint

    fn size_dim_to_uint(value : Double) -> UInt