wzzc-dev/moui/core does not have a README file
pub(open) trait ViewNode {
fn identity(Self) -> ViewIdentity
fn declaration(Self) -> ViewDeclaration = _
fn child_constraints(Self, Constraints) -> Constraints = _
fn child_environment(Self, Environment) -> Environment = _
fn child_style(Self, ViewStyle) -> ViewStyle = _
fn layout(Self, ViewLayoutContext) -> ViewLayoutResult
fn paint(Self, ViewPaintContext) -> ViewPaintPlan = _
fn platform_views(Self, ViewPlatformContext) -> Array[PlatformViewPlacement] = _
fn text_input_state(Self, ViewPaintContext) -> TextInputState? = _
fn semantics(Self) -> ViewSemanticsInfo = _
fn focusable(Self) -> Bool = _
fn focus_trap(Self) -> Bool = _
fn flex_weight(Self) -> Double = _
}pub(open) trait ViewStateValue {
fn view_state_type_key() -> DeclarationKey
fn encode_view_state(Self) -> Bytes
fn decode_view_state(Self, Bytes) -> Self?
}impl ViewStateValue for Boolfn decode_view_state(_self : Bool, bytes : Bytes) -> Bool?fn encode_view_state(self : Bool) -> Bytesimpl ViewStateValue for Intfn decode_view_state(_self : Int, bytes : Bytes) -> Int?fn encode_view_state(self : Int) -> Bytesimpl ViewStateValue for Doublefn decode_view_state(_self : Double, bytes : Bytes) -> Double?fn encode_view_state(self : Double) -> Bytesimpl ViewStateValue for Stringfn decode_view_state(_self : String, bytes : Bytes) -> String?fn encode_view_state(self : String) -> Bytesimpl ViewStateValue for Bytesfn decode_view_state(_self : Bytes, bytes : Bytes) -> Bytes?fn encode_view_state(self : Bytes) -> Bytespub(all) struct AccessibilityLabelModifier {
label : String
}fn[Msg] AccessibilityLabelModifier::to_any_modifier(self : AccessibilityLabelModifier) -> AnyModifier[Msg]pub(all) struct ActionCommand {
intent : CommandIntent
shortcut : KeyboardShortcut?
label : String
enabled : Bool
group : String
description : String
context_menu : Bool
} derive(Eq, ToJson, Debug)fn ActionCommand::new(intent~ : CommandIntent, label? : String, shortcut? : KeyboardShortcut?, enabled? : Bool, group? : String, description? : String, context_menu? : Bool) -> ActionCommandtype ActionCommandMapfn ActionCommandMap::dispatch_shortcut(self : ActionCommandMap, event : KeyboardEvent) -> CommandIntent?fn ActionCommandMap::find_shortcut(self : ActionCommandMap, event : KeyboardEvent) -> ActionCommand?pub(all) struct AnyModifier[Msg] {
identity_kind : String
identity_key : Key?
declaration : ViewDeclaration
child_constraints : (Constraints) -> Constraints
child_environment : (Environment) -> Environment
child_style : (ViewStyle) -> ViewStyle
layout : (ViewLayoutContext) -> ViewLayoutResult
paint : (ViewPaintContext) -> ViewPaintPlan
event : (ViewEventContext) -> ViewEventResult[Msg]
semantics : ViewSemanticsInfo
semantics_actions : Array[ViewSemanticsActionHandler[Msg]]
focusable : Bool
focus_trap : Bool
flex_weight : Double
}pub(all) enum AppEvent {
FrameTick(Frame)
Pointer(PointerEvent)
Keyboard(KeyboardEvent)
TextInput(TextInputEvent)
DragDrop(DragDropEvent)
PlatformView(String, PlatformViewEvent)
Resize(Size)
Redraw(RedrawReason)
CloseRequested
} derive(Eq, ToJson, Debug)pub(all) struct AspectRatioModifier {
ratio : Double
}pub(all) enum Brush {
Solid(Color)
LinearGradient(LinearGradientSpec)
RadialGradient(RadialGradientSpec)
} derive(Eq, ToJson, Debug)pub(all) struct ChildLayoutInfo {
size : Size
first_baseline : Double?
priority : Double
alignment_guides : AlignmentGuideSet
flex_weight : Double
} derive(Eq, Debug)fn ChildLayoutInfo::new(size~ : Size, first_baseline? : Double?, priority? : Double, flex_weight? : Double) -> ChildLayoutInfopub(all) struct ClipModifier {
}pub(all) struct ColorPalette {
foreground : Color
background : Color
surface : Color
surface_variant : Color
primary : Color
on_primary : Color
primary_container : Color
on_primary_container : Color
secondary : Color
on_secondary : Color
secondary_container : Color
on_secondary_container : Color
tertiary : Color
on_tertiary : Color
tertiary_container : Color
on_tertiary_container : Color
error : Color
on_error : Color
error_container : Color
on_error_container : Color
on_foreground : Color
on_surface : Color
on_surface_variant : Color
outline : Color
outline_variant : Color
muted : Color
success : Color
on_success : Color
warning : Color
on_warning : Color
info : Color
on_info : Color
danger : Color
on_danger : Color
focus : Color
scrim : Color
} derive(Eq, ToJson, Debug)fn ColorPalette::from_seed(primary~ : Color, scheme : ColorScheme, foreground? : Color, background? : Color, surface? : Color, surface_variant? : Color, outline? : Color, muted? : Color) -> ColorPalettetype CommandBindingpub struct ControlledValue[T, Msg] {
// private fields
}pub(all) struct CornerRadiusModifier {
radius : Double
}fn[Msg] CrossAxisAlignmentModifier::to_any_modifier(_self : CrossAxisAlignmentModifier) -> AnyModifier[Msg]pub(all) struct CustomLayoutContext {
constraints : Constraints
children : Array[ChildLayoutInfo]
layout_direction : LayoutDirection
safe_area : Insets
viewport : Size?
}pub(all) struct CustomPlacementContext {
frame : Rect
measured_size : Size
children : Array[ChildLayoutInfo]
layout_direction : LayoutDirection
safe_area : Insets
viewport : Size?
}fn CustomPlacementContext::mirror_x(self : CustomPlacementContext, x~ : Double, width~ : Double) -> Doublefn DeclarationKey::record(type_tag~ : String, fields~ : Array[(String, DeclarationKey)]) -> DeclarationKeypub(all) struct DisabledModifier {
disabled : Bool
}fn DragDropEvent::new(phase~ : DragDropPhase, paths? : Array[String], position? : Point?) -> DragDropEventfn DragGestureEvent::new(phase~ : DragGesturePhase, start~ : Point, position~ : Point, delta~ : Point, translation~ : Point) -> DragGestureEventpub(all) enum DrawCommand {
Clear(Color)
FillRect(Rect, Color)
StrokeRect(Rect, Color, Double)
FillRoundedRect(RoundedRect, Color)
StrokeRoundedRect(RoundedRect, Color, Double)
FillRoundedRectBrush(RoundedRect, Brush)
StrokeRoundedRectBrush(RoundedRect, Brush, Double)
DrawShadow(ShadowSpec)
DrawText(TextRun)
DrawImage(ImageRun)
PushClip(Rect)
PopClip
PushRoundedClip(RoundedRect)
PopRoundedClip
PushTransform(Transform2D)
PopTransform
PushOpacity(Double)
PopOpacity
PushLayer(LayerSpec)
PopLayer
BeginRetainedLayer(RetainedLayerSpec)
EndRetainedLayer(String)
PushFilter(FilterEffect)
PopFilter
DrawPath(PathSpec)
DrawShaderEffect(ShaderEffectSpec)
} derive(Eq, ToJson, Debug)pub(all) struct DrawFrame {
commands : Array[DrawCommand]
platform_views : Array[PlatformViewPlacement]
overlay_bounds : Rect?
damage : DamageRegion
clear_color : Color
} derive(Eq, ToJson, Debug)fn DrawFrame::new(commands~ : Array[DrawCommand], platform_views? : Array[PlatformViewPlacement], overlay_bounds? : Rect?, damage~ : DamageRegion, clear_color? : Color) -> DrawFramepub(all) enum Effect[Msg] {
NoEffect
Batch(Array[Effect[Msg]])
Send(Msg)
Dispatch(((Msg) -> Unit) -> Unit)
Run(EffectDescriptor, ((Msg) -> Unit) -> Unit)
Task(EffectDescriptor, ((Msg) -> Unit) -> () -> Unit?)
}fn[Msg] Effect::runtime_visit(self : Effect[Msg], send : (Msg) -> Unit, dispatch_effect : (((Msg) -> Unit) -> Unit) -> Unit, run_effect : (EffectDescriptor, ((Msg) -> Unit) -> Unit) -> Unit, start_task : (EffectDescriptor, ((Msg) -> Unit) -> () -> Unit?) -> Unit) -> Unitpub(all) struct Environment {
theme_spec : ThemeSpec
system_scheme : ColorScheme
theme : Theme
scale_factor : Double
text_scale : Double
locale : String
layout_direction : LayoutDirection
accessibility_contrast : AccessibilityContrast
reduced_motion : Bool
content_size_category : ContentSizeCategory
enabled : Bool
} derive(Eq, ToJson, Debug)fn Environment::with_accessibility_contrast(self : Environment, accessibility_contrast : AccessibilityContrast) -> Environmentfn Environment::with_content_size_category(self : Environment, content_size_category : ContentSizeCategory) -> Environmentfn Environment::with_layout_direction(self : Environment, layout_direction : LayoutDirection) -> Environmentpub(all) struct FlexibleModifier {
weight : Double
}fn FocusScope::new(items~ : Array[FocusScopeItem], current? : String?, wrap? : Bool, default_action? : String, dismiss_action? : String) -> FocusScopepub(all) struct FocusTrapModifier {
trap : Bool
}pub(all) struct FocusableModifier {
focusable : Bool
}pub(all) struct FontSpec {
families : FontFamilyStack
size : Double
weight : Int
style : FontStyle
variations : Array[FontVariation]
} derive(Eq, ToJson, Debug)fn FontSpec::new(families? : FontFamilyStack, size? : Double, weight? : Int, style? : FontStyle, variations? : Array[FontVariation]) -> FontSpecpub(all) struct FrameModifier {
width : Double?
height : Double?
min_width : Double?
min_height : Double?
max_width : Double?
max_height : Double?
}pub(all) struct IntrinsicHeightModifier {
}fn[Msg] IntrinsicHeightModifier::to_any_modifier(_self : IntrinsicHeightModifier) -> AnyModifier[Msg]pub(all) struct IntrinsicWidthModifier {
}pub(all) struct KeyboardEvent {
key : String
text : String?
pressed : Bool
repeat : Bool
modifiers : KeyModifiers
} derive(Eq, ToJson, Debug)fn KeyboardEvent::new(key~ : String, pressed? : Bool, text? : String?, repeat? : Bool, modifiers? : KeyModifiers) -> KeyboardEventfn[Msg] KeyboardShortcutModifier::to_any_modifier(self : KeyboardShortcutModifier) -> AnyModifier[Msg]pub(all) struct LayoutPriorityModifier {
priority : Double
}fn LinearGradientSpec::new(start~ : Point, end~ : Point, start_color~ : Color, end_color~ : Color) -> LinearGradientSpecfn[Msg] MainAxisAlignmentModifier::to_any_modifier(_self : MainAxisAlignmentModifier) -> AnyModifier[Msg]pub(all) struct OffsetModifier {
dx : Double
dy : Double
}pub(all) struct OnDoubleTapModifier[Msg] {
message : Msg
}fn[Msg] OnDragWithFrameModifier::to_any_modifier(self : OnDragWithFrameModifier[Msg]) -> AnyModifier[Msg]pub(all) struct OnLongPressModifier[Msg] {
message : Msg
}pub(all) struct OnTapModifier[Msg] {
message : Msg
}pub(all) struct OpacityModifier {
opacity : Double
}pub struct PlatformViewPixelSink {
// private fields
}fn PlatformViewPixelSink::draw(self : PlatformViewPixelSink, pixels : Bytes, width : Int, height : Int, stride : Int, x : Double, y : Double, draw_width : Double, draw_height : Double) -> Unitfn PlatformViewPixelSink::new(draw~ : (Bytes, Int, Int, Int, Double, Double, Double, Double) -> Unit) -> PlatformViewPixelSinkfn PlatformViewPlacement::new(id~ : String, kind~ : String, frame~ : Rect, clip? : Rect?, properties? : Array[PlatformViewProperty]) -> PlatformViewPlacementfn PlatformViewPlacement::property_or(self : PlatformViewPlacement, key : String, default : String) -> Stringpub(all) struct PointerEvent {
position : Point
phase : PointerPhase
button : Int
wheel_delta : Point
time_ms : Double
modifiers : KeyModifiers
} derive(Eq, ToJson, Debug)fn PointerEvent::new(position~ : Point, phase~ : PointerPhase, button? : Int, wheel_delta? : Point, time_ms? : Double, modifiers? : KeyModifiers) -> PointerEventtype Program[Model, Msg]fn[Model, Msg] Program::new_with_environment(init~ : () -> (Model, Effect[Msg]), update~ : (Model, Msg) -> (Model, Effect[Msg]), view~ : (Model, ViewEnvironment) -> View[Msg], subscriptions? : (Model) -> Subscription[Msg]) -> Program[Model, Msg]fn[Model, Msg] Program::runtime_commands(self : Program[Model, Msg], model : Model) -> Array[ProgramCommand[Msg]]fn[Model, Msg] Program::runtime_subscriptions(self : Program[Model, Msg], model : Model) -> Subscription[Msg]fn[Model, Msg] Program::runtime_view(self : Program[Model, Msg], model : Model, environment : ViewEnvironment) -> View[Msg]fn[Model, Msg] Program::simple(init~ : Model, update~ : (Model, Msg) -> Model, view~ : (Model) -> View[Msg], subscriptions? : (Model) -> Subscription[Msg]) -> Program[Model, Msg]fn[Model, Msg] Program::simple_with_environment(init~ : Model, update~ : (Model, Msg) -> Model, view~ : (Model, ViewEnvironment) -> View[Msg], subscriptions? : (Model) -> Subscription[Msg]) -> Program[Model, Msg]fn[Msg, NextMsg] ProgramCommand::map(self : ProgramCommand[Msg], map : (Msg) -> NextMsg) -> ProgramCommand[NextMsg]fn RadialGradientSpec::new(center~ : Point, radius~ : Double, center_color~ : Color, edge_color~ : Color) -> RadialGradientSpecpub(all) struct RepaintBoundaryModifier {
}fn[Msg] RepaintBoundaryModifier::to_any_modifier(_self : RepaintBoundaryModifier) -> AnyModifier[Msg]fn RetainedLayerSpec::new(key~ : String, frame~ : Rect, content_revision~ : Int, scale_factor? : Double) -> RetainedLayerSpecpub(all) struct ScaleModifier {
sx : Double
sy : Double
}impl ToJson for SemanticIdpub(all) enum SemanticsAction {
Activate
Focus
SetText(String)
Submit
Scroll(SemanticsScrollDirection)
Select
Expand
Collapse
Dismiss
Increment
Decrement
SetNumericValue(Double)
SetSelection(TextRange)
ShowMenu
} derive(Eq, ToJson, Debug)fn[Msg] SemanticsCheckedModifier::to_any_modifier(self : SemanticsCheckedModifier) -> AnyModifier[Msg]fn SemanticsCollectionInfo::new(row_index? : Int, row_count? : Int, row_span? : Int, column_index? : Int, column_count? : Int, column_span? : Int, set_size? : Int, set_position? : Int) -> SemanticsCollectionInfofn[Msg] SemanticsCompositionModifier::to_any_modifier(self : SemanticsCompositionModifier) -> AnyModifier[Msg]pub(all) struct SemanticsDescriptionModifier {
description : String
}fn[Msg] SemanticsDescriptionModifier::to_any_modifier(self : SemanticsDescriptionModifier) -> AnyModifier[Msg]pub(all) struct SemanticsExpandedModifier {
expanded : Bool
}fn[Msg] SemanticsExpandedModifier::to_any_modifier(self : SemanticsExpandedModifier) -> AnyModifier[Msg]impl ToJson for SemanticsGenerationpub(all) struct SemanticsInvalidModifier {
invalid : Bool
}fn[Msg] SemanticsInvalidModifier::to_any_modifier(self : SemanticsInvalidModifier) -> AnyModifier[Msg]pub(all) struct SemanticsLevelModifier {
level : Int
}fn[Msg] SemanticsMetadataModifier::to_any_modifier(self : SemanticsMetadataModifier) -> AnyModifier[Msg]pub(all) struct SemanticsNode {
node_id : SemanticsNodeId
semantic_id : SemanticId?
role : SemanticsRole
level : Int?
url : String
label : String
value : String
description : String
state : SemanticsState
numeric : SemanticsNumericValue?
text : SemanticsTextValue?
collection : SemanticsCollectionInfo?
relations : SemanticsRelations
live : SemanticsLive
live_atomic : Bool
actions : Array[SemanticsActionKind]
focus_order : Int?
frame : Rect
children : Array[SemanticsNodeId]
} derive(Eq, ToJson, Debug)impl ToJson for SemanticsNodeIdfn SemanticsNumericValue::new(current? : Double, min? : Double, max? : Double, step? : Double, value_text? : String) -> SemanticsNumericValuepub(all) struct SemanticsPressedModifier {
pressed : Bool
}fn[Msg] SemanticsPressedModifier::to_any_modifier(self : SemanticsPressedModifier) -> AnyModifier[Msg]pub(all) struct SemanticsRelations {
labelled_by : Array[SemanticsNodeId]
described_by : Array[SemanticsNodeId]
controls : Array[SemanticsNodeId]
error_message : Array[SemanticsNodeId]
active_descendant : Array[SemanticsNodeId]
} derive(Eq, ToJson, Debug)pub(all) struct SemanticsRelationsDeclaration {
labelled_by : Array[SemanticId]
described_by : Array[SemanticId]
controls : Array[SemanticId]
error_message : Array[SemanticId]
active_descendant : Array[SemanticId]
} derive(Eq, ToJson, Debug)fn SemanticsRelationsDeclaration::new(labelled_by? : Array[SemanticId], described_by? : Array[SemanticId], controls? : Array[SemanticId], error_message? : Array[SemanticId], active_descendant? : Array[SemanticId]) -> SemanticsRelationsDeclarationpub(all) struct SemanticsRequiredModifier {
required : Bool
}fn[Msg] SemanticsRequiredModifier::to_any_modifier(self : SemanticsRequiredModifier) -> AnyModifier[Msg]pub(all) enum SemanticsRole {
None
Text
Link
Heading
Navigation
Main
Button
Checkbox
TextField
List
ListItem
Grid
ScrollView
Switch
Radio
Slider
Progress
Tab
Dialog
Tooltip
Menu
ButtonGroup
Form
FormField
Tree
TreeItem
Group
WebView
Image
Alert
Status
ComboBox
Option
Table
Row
Cell
Separator
} derive(Eq, ToJson, Debug)pub(all) struct SemanticsSelectedModifier {
selected : Bool
}fn[Msg] SemanticsSelectedModifier::to_any_modifier(self : SemanticsSelectedModifier) -> AnyModifier[Msg]pub(all) struct SemanticsState {
focused : Bool
disabled : Bool
selected : Bool
pressed : Bool
checked : SemanticsCheckedState?
expanded : Bool
invalid : Bool
required : Bool
read_only : Bool
busy : Bool
multiline : Bool
password : Bool
modal : Bool
} derive(Eq, ToJson, Debug)pub(all) enum SemanticsTarget {
BySemanticId(SemanticId)
ByNodeId(SemanticsNodeId)
} derive(Eq, ToJson, Debug)fn SemanticsTextValue::new(selection? : TextRange, caret? : Int, editable? : Bool) -> SemanticsTextValuepub(all) struct SemanticsUrlModifier {
url : String
}fn ShaderEffectSpec::new(name~ : String, frame~ : Rect, uniforms? : Array[Double], fallback? : Brush) -> ShaderEffectSpecpub(all) struct ShadowScale {
sm : ShadowStyle
md : ShadowStyle
lg : ShadowStyle
} derive(Eq, ToJson, Debug)fn ShadowSpec::new(rect~ : RoundedRect, color~ : Color, offset? : Point, blur_radius? : Double, spread? : Double) -> ShadowSpecfn ShadowStyle::new(color~ : Color, offset? : Point, blur_radius? : Double, spread? : Double) -> ShadowStylepub(all) struct SpacingModifier {
spacing : Double
}pub struct Subscription[Msg] {
// private fields
}fn[Msg] Subscription::animation_tick(key~ : String, start~ : ((Msg) -> Unit) -> () -> Unit?, label? : String) -> Subscription[Msg]fn[Msg] Subscription::host_event(key~ : String, start~ : ((Msg) -> Unit) -> () -> Unit?, label? : String) -> Subscription[Msg]fn[Msg] Subscription::listen(key~ : String, start~ : ((Msg) -> Unit) -> () -> Unit?, kind? : String, label? : String) -> Subscription[Msg]fn[Msg, NextMsg] Subscription::map(self : Subscription[Msg], map : (Msg) -> NextMsg) -> Subscription[NextMsg]fn[Msg] Subscription::route_event(key~ : String, start~ : ((Msg) -> Unit) -> () -> Unit?, label? : String) -> Subscription[Msg]fn[Msg] Subscription::run(key~ : String, start~ : ((Msg) -> Unit) -> () -> Unit?, kind? : String, label? : String) -> Subscription[Msg]fn[Msg] Subscription::runtime_sources(self : Subscription[Msg]) -> Array[SubscriptionRuntimeSource[Msg]]fn[Msg] Subscription::runtime_visit(self : Subscription[Msg], none : (Int) -> Unit, batch : (Int, Int) -> Unit, source : (Int, SubscriptionDescriptor) -> Unit) -> Unitfn[Msg] Subscription::timer(key~ : String, start~ : ((Msg) -> Unit) -> () -> Unit?, label? : String) -> Subscription[Msg]fn[Msg] Subscription::window_event(key~ : String, start~ : ((Msg) -> Unit) -> () -> Unit?, label? : String) -> Subscription[Msg]pub struct SubscriptionRuntimeSource[Msg] {
// private fields
}fn[Msg] SubscriptionRuntimeSource::descriptor(self : SubscriptionRuntimeSource[Msg]) -> SubscriptionDescriptorfn[Msg] SubscriptionRuntimeSource::start(self : SubscriptionRuntimeSource[Msg], dispatch : (Msg) -> Unit) -> () -> Unit?fn SurfaceMetrics::new(logical_size~ : Size, physical_size~ : Size, scale_factor? : Double) -> SurfaceMetricspub(all) struct TextControlStateContext {
caret : Int
selection : TextRange?
text_selection_anchor : Int?
composition : String?
composition_cursor : TextRange?
undo_stack : Array[TextHistoryEntryContext]
redo_stack : Array[TextHistoryEntryContext]
} derive(Eq, ToJson, Debug)pub(all) struct TextParagraphLayoutResult {
text : String
size : Size
baseline : Double
lines : Array[TextParagraphLineMetrics]
caret_rects : Array[Rect]
visual_order : TextParagraphVisualOrderMetadata
metadata : TextParagraphLayoutMetadata
} derive(Eq, ToJson, Debug)fn TextParagraphLayoutResult::hit_test(self : TextParagraphLayoutResult, point : Point) -> TextParagraphHitTestResultfn TextParagraphLayoutResult::selection_rects(self : TextParagraphLayoutResult, range : TextRange) -> Array[Rect]pub struct TextSystem {
id : String
measure : (TextLayoutInput) -> TextLayoutResult
paragraph_layout : (TextLayoutInput) -> TextParagraphLayoutResult
register_font_data : (FontFamily, Bytes) -> Unit
}fn TextSystem::layout_paragraph(self : TextSystem, input : TextLayoutInput) -> TextParagraphLayoutResultfn TextSystem::new(id~ : String, measure~ : (TextLayoutInput) -> TextLayoutResult, paragraph_layout? : (TextLayoutInput) -> TextParagraphLayoutResult?, register_font_data? : (FontFamily, Bytes) -> Unit) -> TextSystempub(all) struct Theme {
scheme : ColorScheme
palette : ColorPalette
spacing_scale : SpacingScale
radius_scale : RadiusScale
typography : TypographyScale
shadow_scale : ShadowScale
motion : MotionScale
surfaces : SurfaceScale
} derive(Eq, ToJson, Debug)pub(all) struct ThemeSpec {
preset : ThemePreset
color_mode : ColorMode
density : ThemeDensity
contrast : AccessibilityContrast
seed : Color?
reduced_motion : Bool
} derive(Eq, ToJson, Debug)pub struct TransitionSample {
progress : Double
style : TransitionStyle
present : Bool
} derive(Eq, ToJson, Debug)pub struct TransitionSpec {
from : TransitionStyle
to : TransitionStyle
duration_ms : Double
easing : Easing
} derive(Eq, ToJson, Debug)fn TransitionSpec::fade(from_opacity? : Double, to_opacity? : Double, duration_ms? : Double, easing? : Easing) -> TransitionSpecfn TransitionSpec::new(from? : TransitionStyle, to? : TransitionStyle, duration_ms? : Double, easing? : Easing) -> TransitionSpecfn TransitionSpec::presence(self : TransitionSpec, present~ : Bool, progress~ : Double, reduced_motion? : Bool) -> TransitionSamplefn TransitionSpec::sample(self : TransitionSpec, progress : Double, reduced_motion? : Bool) -> TransitionSamplefn TransitionSpec::sample_elapsed(self : TransitionSpec, elapsed_ms : Double, reduced_motion? : Bool) -> TransitionSamplefn TransitionSpec::scale(from_scale? : Double, to_scale? : Double, duration_ms? : Double, easing? : Easing) -> TransitionSpecfn TransitionSpec::slide(from_offset~ : Point, to_offset? : Point, duration_ms? : Double, easing? : Easing) -> TransitionSpecfn TransitionStyle::interpolate(self : TransitionStyle, to : TransitionStyle, progress~ : Double, easing? : Easing, reduced_motion? : Bool) -> TransitionStylefn TransitionStyle::new(opacity? : Double, offset? : Point, scale? : Point, foreground? : Color?) -> TransitionStylefn TransitionStyle::with_offset(self : TransitionStyle, dx? : Double, dy? : Double) -> TransitionStylefn TransitionStyle::with_scale(self : TransitionStyle, sx? : Double, sy? : Double) -> TransitionStylepub struct View[Msg] {
// private fields
}fn[Msg] View::dispatch_semantics_action(self : View[Msg], context : ViewSemanticsActionContext, action : SemanticsAction) -> ViewSemanticsActionResult[Msg]fn[Node : ViewNode, Msg] View::from_node(node : Node, children? : (Node) -> Array[View[Msg]], event? : (Node, ViewEventContext) -> ViewEventResult[Msg], text_command? : (Node, ViewEventContext, CommandIntent, String?) -> ViewTextCommandResult[Msg], semantics_actions? : (Node) -> Array[ViewSemanticsActionHandler[Msg]]) -> View[Msg]fn[Msg] View::on_drag_with_frame(self : View[Msg], handler : (DragGestureEvent, Rect) -> Msg) -> View[Msg]fn[Msg] View::platform_views(self : View[Msg], context : ViewPlatformContext) -> Array[PlatformViewPlacement]fn[Msg] View::presence(self : View[Msg], present~ : Bool, spec? : TransitionSpec, progress? : Double, reduced_motion? : Bool) -> View[Msg]fn[Msg] View::semantics_collection(self : View[Msg], collection : SemanticsCollectionInfo) -> View[Msg]fn[Msg] View::semantics_composition(self : View[Msg], composition : SemanticsComposition) -> View[Msg]fn[Msg] View::semantics_live(self : View[Msg], live : SemanticsLive, live_atomic? : Bool) -> View[Msg]fn[Msg] View::semantics_relations(self : View[Msg], relations : SemanticsRelationsDeclaration) -> View[Msg]fn[Msg] View::text_command(self : View[Msg], context : ViewEventContext, intent : CommandIntent, paste_text? : String?) -> TextCommandResultfn[Msg] View::text_command_result(self : View[Msg], context : ViewEventContext, intent : CommandIntent, paste_text? : String?) -> ViewTextCommandResult[Msg]fn[Msg] View::transition(self : View[Msg], spec? : TransitionSpec, progress? : Double, reduced_motion? : Bool) -> View[Msg]pub struct ViewDeclaration {
layout : DeclarationChannel
paint : DeclarationChannel
semantics : DeclarationChannel
platform : DeclarationChannel
} derive(Eq)fn ViewDeclaration::changes_from(self : ViewDeclaration, previous : ViewDeclaration) -> DeclarationChangesfn ViewDeclaration::channels(layout~ : DeclarationChannel, paint~ : DeclarationChannel, semantics~ : DeclarationChannel, platform~ : DeclarationChannel) -> ViewDeclarationpub(all) struct ViewEventContext {
frame : Rect
child_frames : Array[Rect]
event : AppEvent
focused : Bool
state : ViewStateContext
text_control : TextControlStateContext
text_system : TextSystem
environment : Environment
style : ViewStyle
now_ms : Double
}pub(all) struct ViewEventResult[Msg] {
changed : Bool
activated : Bool
focused : Bool
captured : Bool
state : ViewStateContext?
text_control : TextControlStateContext?
dirty : ViewDirtyHint
messages : Array[Msg]
} derive(Eq, Debug)pub(all) struct ViewLayoutContext {
constraints : Constraints
child_sizes : Array[Size]
child_flex_weights : Array[Double]
anchor_frames : Array[(String, Rect)]
state : ViewStateContext
text_system : TextSystem
environment : Environment
style : ViewStyle
}pub(all) struct ViewPaintContext {
frame : Rect
child_frames : Array[Rect]
focused : Bool
state : ViewStateContext
text_control : TextControlStateContext
environment : Environment
style : ViewStyle
text_system : TextSystem
now_ms : Double
}pub(all) struct ViewPaintLayer {
frame : Rect
cache_key : String
content_revision : Int
commands : Array[DrawCommand]
overlay_commands : Array[DrawCommand]
} derive(Eq, Debug)fn ViewPaintLayer::new(frame~ : Rect, cache_key~ : String, content_revision~ : Int, commands? : Array[DrawCommand], overlay_commands? : Array[DrawCommand]) -> ViewPaintLayerpub(all) struct ViewPaintPlan {
commands : Array[DrawCommand]
child_layers : Array[ViewPaintLayer]
post_commands : Array[DrawCommand]
overlay_commands : Array[DrawCommand]
repaint_boundary : Bool
animating : Bool
} derive(Eq, Debug)pub(all) struct ViewPlatformContext {
frame : Rect
child_frames : Array[Rect]
environment : Environment
style : ViewStyle
}pub(all) struct ViewSemanticsActionContext {
frame : Rect
child_frames : Array[Rect]
focused : Bool
state : ViewStateContext
text_control : TextControlStateContext
text_system : TextSystem
environment : Environment
style : ViewStyle
}pub struct ViewSemanticsActionHandler[Msg] {
kind : SemanticsActionKind
handle : (ViewSemanticsActionContext, SemanticsAction) -> ViewSemanticsActionResult[Msg]
}fn[Msg] ViewSemanticsActionHandler::activate(handle : (ViewSemanticsActionContext) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::collapse(handle : (ViewSemanticsActionContext) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::decrement(handle : (ViewSemanticsActionContext) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::dismiss(handle : (ViewSemanticsActionContext) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::expand(handle : (ViewSemanticsActionContext) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::increment(handle : (ViewSemanticsActionContext) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::kind(self : ViewSemanticsActionHandler[Msg]) -> SemanticsActionKindfn[Msg] ViewSemanticsActionHandler::scroll(handle : (ViewSemanticsActionContext, SemanticsScrollDirection) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::select(handle : (ViewSemanticsActionContext) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::set_numeric_value(handle : (ViewSemanticsActionContext, Double) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::set_selection(handle : (ViewSemanticsActionContext, TextRange) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::set_text(handle : (ViewSemanticsActionContext, String) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::show_menu(handle : (ViewSemanticsActionContext) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]fn[Msg] ViewSemanticsActionHandler::submit(handle : (ViewSemanticsActionContext) -> ViewSemanticsActionResult[Msg]) -> ViewSemanticsActionHandler[Msg]pub(all) struct ViewSemanticsActionResult[Msg] {
accepted : Bool
state : ViewStateContext?
text_control : TextControlStateContext?
dirty : ViewDirtyHint
messages : Array[Msg]
deferred_commits : Array[() -> Unit]
}fn[Msg] ViewSemanticsActionResult::accepted(state? : ViewStateContext?, text_control? : TextControlStateContext?, dirty? : ViewDirtyHint, messages? : Array[Msg], commit? : () -> Unit?) -> ViewSemanticsActionResult[Msg]pub(all) struct ViewSemanticsInfo {
composition : SemanticsComposition
semantic_id : SemanticId?
role : SemanticsRole?
level : Int?
url : String?
label : String?
value : String?
description : String?
disabled : Bool?
selected : Bool?
pressed : Bool?
checked : SemanticsCheckedState?
expanded : Bool?
invalid : Bool?
required : Bool?
read_only : Bool?
busy : Bool?
multiline : Bool?
password : Bool?
modal : Bool?
numeric : SemanticsNumericValue?
text : SemanticsTextValue?
collection : SemanticsCollectionInfo?
relations : SemanticsRelationsDeclaration?
live : SemanticsLive?
live_atomic : Bool?
} derive(Eq, ToJson, Debug)fn ViewSemanticsInfo::new(composition? : SemanticsComposition, semantic_id? : SemanticId, role? : SemanticsRole, level? : Int, url? : String, label? : String, value? : String, description? : String, disabled? : Bool, selected? : Bool, pressed? : Bool, checked? : SemanticsCheckedState, expanded? : Bool, invalid? : Bool, required? : Bool, read_only? : Bool, busy? : Bool, multiline? : Bool, password? : Bool, modal? : Bool, numeric? : SemanticsNumericValue, text? : SemanticsTextValue, collection? : SemanticsCollectionInfo, relations? : SemanticsRelationsDeclaration, live? : SemanticsLive, live_atomic? : Bool) -> ViewSemanticsInfopub(all) struct ViewStateContext {
focused : Bool
hovered : Bool
pressed : Bool
selected : Bool
checked : Bool
expanded : Bool
disabled : Bool
slots : ViewStateSlots
} derive(Eq, Debug)fn[T : ViewStateValue] ViewStateContext::read_slot(self : ViewStateContext, slot : ViewStateSlot[T]) -> Tfn[T : ViewStateValue] ViewStateContext::with_slot(self : ViewStateContext, slot : ViewStateSlot[T], value : T) -> ViewStateContextfn[T] ViewStateContext::without_slot(self : ViewStateContext, slot : ViewStateSlot[T]) -> ViewStateContextpub struct ViewStateSlot[T] {
// private fields
}pub(all) struct ViewTextCommandResult[Msg] {
result : TextCommandResult
text_control : TextControlStateContext?
messages : Array[Msg]
} derive(Eq, Debug)fn[Msg] ViewTextCommandResult::new(result~ : TextCommandResult, text_control? : TextControlStateContext?, messages? : Array[Msg]) -> ViewTextCommandResult[Msg]pub(all) struct VisualStyle {
background : Brush?
foreground : Color?
border : BorderStyle?
shadow : ShadowStyle?
radius : Double?
opacity : Double?
} derive(Eq, ToJson, Debug)fn animated_value(from~ : Double, to~ : Double, progress~ : Double, easing? : Easing, reduced_motion? : Bool) -> Doublefn delete_grapheme_range(boundaries : TextGraphemeBoundaries, caret : Int, before : Int, after : Int) -> TextRangefn move_text_caret(text : String, caret : Int, selection : TextRange?, direction : TextCaretDirection, extend_selection~ : Bool) -> TextCaretMoveResultfn text_input_grapheme_selection(boundaries : TextGraphemeBoundaries, selection : TextRange?) -> TextRange?fn text_next_grapheme_caret_boundary(text : String, caret : Int) -> Intfn text_previous_grapheme_caret_boundary(text : String, caret : Int) -> IntMoUI is a multi-platform MoonBit GUI framework
Dependencies