mgui-core 0.6.0

mgui 框架核心:Element/RenderObject/Widget 三树、布局与绘制协议、帧管线与响应式原语
Documentation
#![forbid(unsafe_code)]

// ============ 已合入的原独立 crate 模块 ============
pub mod events;
pub mod geometry;
pub mod paint;

// ============ 内部模块 ============
pub mod animation;
pub mod arena;
pub mod cache_stats;
pub mod composition;
pub mod devtools_trace;
pub mod element;
pub mod error_boundary;
pub mod event_log;
pub mod form;
pub mod frame;
pub mod frame_timeline;
pub mod gesture;
pub mod grapheme;
pub mod id;
pub mod image;
pub mod inherited;
pub mod inspect;
pub mod layout;
pub mod live;
pub mod load;
pub mod property;
pub mod query;
pub mod reactive;
pub mod render_object;
pub mod semantics;
pub mod text_edit;
pub mod theme;
pub mod widget;

pub use slotmap::Key;

// ============ 合入模块的顶层 re-export ============
pub use events::{
    GestureState, KeyCode, KeyModifiers, MouseButton, PointerData, WidgetEvent, DOUBLE_TAP_TIMEOUT_MS,
    LONG_PRESS_TIMEOUT_MS, TOUCH_SLOP,
};
pub use geometry::{Axis, Color, Point, RRectDef, Rect, Size, Transform2D};

// ============ 内部模块 re-export ============
pub use animation::{tick_animation, AnimationController, AnimationStatus, Curve, Repeat, TickOutcome};
pub use cache_stats::{CacheInvalidationReason, CacheStats};
pub use composition::{resolve_layer_compositions, Affine2D, ClipShape, CompositionScratch, LayerComposition};
pub use element::{paint_frame, Element, ElementTree, FramePaint, Layer, LayerPaint, LayerTree, OverlayHandle};
pub use error_boundary::{
    ErrorBoundaryRenderObject, ErrorBoundaryState, ErrorBoundaryWidget, FallbackBuilder, PanicStateWidget, PanicWidget,
};
pub use form::{FormState, SubmitState};
pub use gesture::{
    DoubleTapGestureRecognizer, GestureArena, GestureRecognizer, PanGestureRecognizer, TapGestureRecognizer,
};
pub use grapheme::{
    byte_to_grapheme_col, floor_grapheme_boundary, grapheme_byte_offsets, grapheme_col_to_byte, grapheme_count,
    next_grapheme_boundary, prev_grapheme_boundary,
};
pub use id::{ElementId, LayerId, RenderObjectId};
pub use image::{BoxFit, ImageData};
pub use inherited::{BuildContext, InheritedWidget};
pub use live::{LiveHandle, LiveOutcome, LivePhase, LiveReason, LiveSession};
pub use load::{LoadState, LoadStatus};
pub use paint::{effect_flags, LayerEffect, PaintCommand, PaintList, PendingTexture, TextureFrameMeta};
pub use property::{Lerp, PropertyTrack, SharedTrack, Spring, SpringTrack, Track};
pub use query::{MutationState, QueryKey, QueryPhase, QueryState, QueryTicket};
pub use reactive::{
    any_signal_epoch, batch, enter_subscriber, exit_subscriber, mark_dirty, new_signal_id, new_subscriber_id,
    peek_dependency_count, take_any_signal_set, take_dirty, untracked, with_subscriber, Effect, HostSubscriber, Memo,
    Signal, SignalId, SubscriberId,
};
pub use render_object::{
    BoxConstraints, ClipRRectRenderObject, ColumnRenderObject, LayerProxyRenderObject, LayoutContext,
    OpacityRenderObject, PaddingRenderObject, PositionedRenderObject, RRectRenderObject, RenderObject,
    StackRenderObject, StateApply, TransformRenderObject,
};
pub use semantics::{
    LiveRegion, SemanticsData, SemanticsNumericValue, SemanticsRole, VirtualSemanticItem, VirtualTextRun,
    WidgetSemantics,
};
pub use text_edit::{
    delete_after, delete_before, delete_selection, move_selection, replace_selection, PreeditState, TextBuffer,
    TextEdit, TextMove, TextSelection,
};
pub use widget::{
    children_equivalent, optional_child_equivalent, RRectWidget, StackWidget, State, StatefulWidget, TooltipPlacement,
    Widget, WidgetNode,
};
pub mod clipboard;
pub use clipboard::{ClipboardHandle, ClipboardImage, ClipboardProvider, NoopClipboard};