wzzc-dev/moui/render does not have a README file
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?
}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
}pub struct HostImageSource {
read_fn : (String) -> Bytes?
}fn HostSurface::new(surface_id? : String, metrics~ : SurfaceMetrics, cpu_present? : PresentTarget?, native_surface? : NativeSurface?, image_source? : HostImageSource?) -> HostSurfacepub(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, ToJson, Debug)fn ImageResourceLoadCompletion::failed(source : String, diagnostic~ : String, background_io? : Bool) -> ImageResourceLoadCompletionfn ImageResourceLoadCompletion::has_decoded_rgba_payload(self : ImageResourceLoadCompletion) -> Boolfn ImageResourceLoadCompletion::ready(source : String, width~ : Int, height~ : Int, background_io? : Bool) -> ImageResourceLoadCompletionfn ImageResourceLoadCompletion::ready_decoded_rgba(source : String, width~ : Int, height~ : Int, row_bytes~ : Int, pixels : Bytes, background_io? : Bool, background_decode? : Bool) -> ImageResourceLoadCompletionpub(all) struct ImageResourceRecord {
source : String
status : ImageResourceStatus
width : Int
height : Int
diagnostic : String
} derive(Eq, ToJson, Debug)fn NativeSurface::new(surface_handle~ : UInt64, display_handle? : UInt64?, acquire? : (SurfaceMetrics) -> UInt64?, present? : (UInt64) -> Bool, resize? : (SurfaceMetrics) -> Unit, dispose? : () -> Unit) -> NativeSurface?pub(all) struct PixelFrame {
width : Int
height : Int
row_bytes : Int
scale_factor : Double
pixels : Bytes
}fn PixelFrame::new(width~ : Int, height~ : Int, row_bytes~ : Int, scale_factor~ : Double, pixels~ : Bytes) -> PixelFramepub(all) enum RecoveryResult {
RecoverySucceeded
RecoveryFailed(String)
FallbackToCpu
}pub(all) struct RenderFrameInput {
metrics : SurfaceMetrics
commands : Array[DrawCommand]
damage : DamageRegion
clear_color : Color?
} derive(Eq, ToJson, Debug)fn RenderFrameInput::new(metrics~ : SurfaceMetrics, commands~ : Array[DrawCommand], damage? : DamageRegion, clear_color? : Color?) -> RenderFrameInputfn RenderFrameResult::new(presented? : Bool, queued? : Bool, cache_hit_count? : Int, cache_miss_count? : Int, cache_update_count? : Int, cache_evict_count? : Int) -> RenderFrameResultpub struct RenderFrameSubmission {
// private fields
}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, ToJson, Debug)fn RenderPresentCompletion::new(token~ : FrameToken, submitted_at_ms~ : Double, completed_at_ms~ : Double, presented_at_ms~ : Double, status~ : RenderPresentStatus, gpu_context_generation~ : Int) -> RenderPresentCompletionpub(all) struct RendererBackendFeatureCapability {
provider_id : String
feature : RendererFeature
backend : RendererBackendKind
status : RendererFeatureStatus
note : String
} derive(Eq, ToJson, Debug)fn RendererBackendFeatureCapability::new(provider_id~ : String, feature~ : RendererFeature, backend~ : RendererBackendKind, status~ : RendererFeatureStatus, note? : String) -> RendererBackendFeatureCapabilitypub(all) struct RendererBackendInfo {
backend : RendererBackendKind
status : RendererCapabilityStatus
can_render : Bool
can_resize : Bool
owns_surface : Bool
description : String
} derive(Eq, ToJson, Debug)fn RendererBackendInfo::new(backend~ : RendererBackendKind, status~ : RendererCapabilityStatus, can_render~ : Bool, can_resize~ : Bool, owns_surface~ : Bool, description? : String) -> RendererBackendInfofn RendererCommandFallback::new(index~ : Int, feature~ : RendererFeature, command~ : String, kind? : RendererCommandFallbackKind, reason~ : String) -> RendererCommandFallbackfn RendererCommandPlan::new(total_commands~ : Int, fallback_count~ : Int, final_layer_depth~ : Int, final_filter_depth~ : Int, fallbacks~ : Array[RendererCommandFallback]) -> RendererCommandPlanpub(all) struct RendererDescriptor {
backend : RendererBackendKind
family : RendererFamily
presentation : RendererPresentationModel
supported_targets : Array[RendererTarget]
capabilities : Array[RendererBackendFeatureCapability]
description : String
} derive(Eq, ToJson, Debug)fn RendererDescriptor::new(backend~ : RendererBackendKind, family~ : RendererFamily, presentation~ : RendererPresentationModel, supported_targets~ : Array[RendererTarget], capabilities~ : Array[RendererBackendFeatureCapability], description? : String) -> RendererDescriptorpub(all) enum RendererEvent {
PresentCompleted(RenderPresentCompletion)
ImageLoadRequested(RendererImageLoadRequest)
}pub(all) struct RendererFeatureCapability {
feature : RendererFeature
providers : Array[RendererBackendFeatureCapability]
} derive(Eq, ToJson, Debug)fn RendererFeatureCapability::new(feature~ : RendererFeature, providers~ : Array[RendererBackendFeatureCapability]) -> RendererFeatureCapabilityfn RendererFeatureCapability::note_for_provider(self : RendererFeatureCapability, provider_id : String) -> Stringfn RendererFeatureCapability::provider_capability(self : RendererFeatureCapability, provider_id : String) -> RendererBackendFeatureCapability?fn RendererFeatureCapability::status_for_provider(self : RendererFeatureCapability, provider_id : String) -> RendererFeatureStatuspub struct RendererGpuRecoveryCapability {
// private fields
}fn RendererGpuRecoveryCapability::new(inject_context_loss? : () -> Unit, gpu_recovery_count? : () -> Int, gpu_fallback_active? : () -> Bool) -> RendererGpuRecoveryCapabilityfn RendererImageDecoder::decode(self : RendererImageDecoder, source : String, bytes : Bytes?) -> ImageResourceLoadCompletionfn RendererImageDecoder::new(decode~ : (String, Bytes?) -> ImageResourceLoadCompletion) -> RendererImageDecoderpub struct RendererImageDiagnostics {
// private fields
}pub struct RendererImageLoadCompletion {
// private fields
}fn RendererImageLoadCompletion::new(token~ : RendererImageLoadToken, result~ : ImageResourceLoadCompletion) -> RendererImageLoadCompletionfn RendererImageLoadCompletion::result(self : RendererImageLoadCompletion) -> ImageResourceLoadCompletionpub struct RendererImageLoadRequest {
// private fields
}pub struct RendererPlatformViewCapability {
// private fields
}fn RendererPlatformViewCapability::new(draw_platform_view_pixels? : (Bytes, Int, Int, Int, Double, Double, Double, Double) -> Unit, set_platform_view_draw_fn? : (() -> Unit?) -> Unit) -> RendererPlatformViewCapabilitypub(all) struct RendererProvider {
id : String
descriptor : RendererDescriptor
capabilities : () -> Array[RendererBackendFeatureCapability]
bind : (HostSurface) -> RendererBindResult
}fn RendererProvider::bind_surface(self : RendererProvider, surface : HostSurface) -> RendererBindResultfn RendererProvider::capability_report(self : RendererProvider) -> Array[RendererBackendFeatureCapability]fn RendererProvider::new(id~ : String, descriptor~ : RendererDescriptor, capabilities~ : () -> Array[RendererBackendFeatureCapability], bind~ : (HostSurface) -> RendererBindResult) -> RendererProviderpub(all) enum RendererSelection {
Default
Backend(RendererBackendKind)
Family(RendererFamily)
} derive(Eq, ToJson, Debug)fn RendererSelection::matches_backend(self : RendererSelection, backend : RendererBackendKind) -> Boolpub struct RendererSession {
// private fields
}fn RendererSession::apply_image_load_completion(self : RendererSession, completion : RendererImageLoadCompletion) -> RendererImageCompletionResultfn 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) -> Unitfn RendererSession::new(resize~ : (SurfaceMetrics) -> Unit, render_frame~ : (RenderFrameSubmission) -> RenderFrameResult, drain_events? : () -> Array[RendererEvent]?, text_system~ : () -> TextSystem, present_count? : () -> Int, recover? : (String) -> RecoveryResult, dispose? : () -> Unit, image_records? : () -> Array[ImageResourceRecord], apply_image_load_completion? : (ImageResourceLoadCompletion) -> Bool, image_source? : HostImageSource, image_decoder? : RendererImageDecoder?, native_surface? : NativeSurface?, platform_view? : RendererPlatformViewCapability, gpu_recovery? : RendererGpuRecoveryCapability) -> RendererSessionfn RendererSession::render_frame(self : RendererSession, submission : RenderFrameSubmission) -> RenderFrameResultfn RendererSession::set_platform_view_draw_fn(self : RendererSession, draw_fn : () -> Unit?) -> Unitpub(all) struct WgpuSurfaceContract {
source : WgpuSurfaceSourceKind
backend : RendererBackendKind
ready : Bool
description : String
} derive(Eq, ToJson, Debug)fn WgpuSurfaceContract::new(source~ : WgpuSurfaceSourceKind, backend~ : RendererBackendKind, ready~ : Bool, description? : String) -> WgpuSurfaceContractInstall
Download zipMoUI is a multi-platform MoonBit GUI framework
Dependencies