Expand description
Bevy plugin for the Noesis GUI SDK.
Drives libNoesis.so through the noesis_runtime FFI crate and implements
Noesis::RenderDevice on top of Bevy’s wgpu device. UIs render into an
offscreen wgpu texture and composite into the Bevy frame.
Add NoesisPlugin to initialize the runtime, then host XAML through a
NoesisView camera.
Re-exports§
pub use animation::AnimationSpec;pub use animation::NoesisAnimation;pub use animation::NoesisAnimationPlugin;pub use bake::NoesisLabelBaker;pub use bake::NoesisLabelBakerPlugin;pub use binding::NoesisBinding;pub use binding::NoesisBindingPlugin;pub use binding::SourceSpec;pub use brushes::BrushReadback;pub use brushes::BrushSpec;pub use brushes::BrushTarget;pub use brushes::GradientStop;pub use brushes::NoesisBrushChanged;pub use brushes::NoesisBrushes;pub use brushes::NoesisBrushesPlugin;pub use classes::NoesisClassPlugin;pub use classes::NoesisClassRegistry;pub use clip::NoesisClip;pub use clip::NoesisClipPlugin;pub use commands::CommandForwarder;pub use commands::CommandsDef;pub use commands::NoesisCommandInvoked;pub use commands::NoesisCommands;pub use commands::NoesisCommandsPlugin;pub use diagnostics::NoesisDiagnostics;pub use diagnostics::NoesisDiagnosticsPlugin;pub use dp::DpKind;pub use dp::DpValue;pub use dp::DpWatch;pub use dp::NoesisDp;pub use dp::NoesisDpChanged;pub use dp::NoesisDpPlugin;pub use events::ClickWatchEntry;pub use events::KeyDownWatchEntry;pub use events::NoesisClickWatch;pub use events::NoesisClicked;pub use events::NoesisEventsPlugin;pub use events::NoesisKeyDown;pub use events::NoesisKeyDownWatch;pub use events::UiClicked;pub use events::UiKeyDown;pub use focus::NoesisFocus;pub use focus::NoesisFocusPlugin;pub use focus_input::FocusMove;pub use focus_input::FocusPredict;pub use focus_input::KeyBindingSpec;pub use focus_input::NoesisFocusBindingFired;pub use focus_input::NoesisFocusControl;pub use focus_input::NoesisFocusControlPlugin;pub use focus_input::NoesisFocusPredicted;pub use font::BevyFontProvider;pub use font::FontAsset;pub use font::FontAssetLoader;pub use font::FontAssetPlugin;pub use font::FontRegistry;pub use geometry::NoesisGeometry;pub use geometry::NoesisGeometryPlugin;pub use headless::NoesisHeadlessPlugin;pub use image::BevyTextureProvider;pub use image::ImageAsset;pub use image::ImageAssetLoader;pub use image::ImageAssetPlugin;pub use image::ImageRegistry;pub use imaging::ImageBitmap;pub use imaging::ImageReadback;pub use imaging::NoesisImageChanged;pub use imaging::NoesisImaging;pub use imaging::NoesisImagingPlugin;pub use inlines::InlineSpec;pub use inlines::InlinesReadback;pub use inlines::NoesisInlines;pub use inlines::NoesisInlinesChanged;pub use inlines::NoesisInlinesPlugin;pub use input::NoesisInputEvent;pub use input::NoesisInputPlugin;pub use input::NoesisInputQueue;pub use input::NoesisPointerOverUi;pub use input::TargetedInput;pub use integration::NoesisCursorRequested;pub use integration::NoesisIntegrationPlugin;pub use integration::NoesisOpenUrl;pub use integration::NoesisPlayAudio;pub use items::CollectionViewOp;pub use items::ItemValue;pub use items::ItemsBinding;pub use items::NoesisItems;pub use items::NoesisItemsCurrent;pub use items::NoesisItemsPlugin;pub use items::ObjectRow;pub use items::ObjectSource;pub use layout::Margin;pub use layout::NoesisLayout;pub use layout::NoesisLayoutPlugin;pub use list::ListRows;pub use list::ListSort;pub use list::ListedIn;pub use list::NoesisListAppExt;pub use list::NoesisListOps;pub use list::NoesisListPlugin;pub use list::NoesisListSelection;pub use list::NoesisListSet;pub use list::NoesisRowSelected;pub use list::Selected;pub use list::UiList;pub use markup::NoesisMarkupExtensionPlugin;pub use markup::NoesisMarkupExtensionRegistry;pub use panel::NoesisPanelAppExt;pub use panel::NoesisPanelPlugin;pub use panel::NoesisPanelSet;pub use panel::NoesisPanelText;pub use panel::NoesisPanelTextChanged;pub use panel::SealPanel;pub use panel::UiPanel;pub use plain_vm::NoesisViewModel;pub use plain_vm::NoesisViewModelAppExt;pub use render::NoesisCamera;pub use render::NoesisIntermediate;pub use render::NoesisRenderPlugin;pub use render::NoesisSet;pub use render::NoesisView;pub use resources::NoesisResources;pub use resources::NoesisResourcesInstalled;pub use resources::NoesisResourcesPlugin;pub use resources::ResourceEntry;pub use routed_events::EventWatchEntry;pub use routed_events::NoesisEventWatch;pub use routed_events::NoesisRoutedEvent;pub use routed_events::NoesisRoutedEventsPlugin;pub use routed_events::RoutedEventSnapshot;pub use routed_events::UiRoutedEvent;pub use shapes::NoesisShapes;pub use shapes::NoesisShapesPlugin;pub use shapes::ShapeKind;pub use shapes::ShapeSpec;pub use styles::DataTriggerSpec;pub use styles::MultiTriggerSpec;pub use styles::NoesisStyles;pub use styles::NoesisStylesPlugin;pub use styles::PropertyTrigger;pub use styles::StyleSpec;pub use svg::NoesisSvg;pub use svg::NoesisSvgChanged;pub use svg::NoesisSvgPlugin;pub use text::NoesisText;pub use text::NoesisTextChanged;pub use text::NoesisTextPlugin;pub use theme::NoesisDefaultThemePlugin;pub use transforms::NoesisTransform;pub use transforms::NoesisTransformChanged;pub use transforms::NoesisTransformPlugin;pub use transforms::TransformSpec;pub use transforms3d::Matrix3DSpec;pub use transforms3d::NoesisMatrixTransform3DChanged;pub use transforms3d::NoesisTransform3D;pub use transforms3d::NoesisTransform3DChanged;pub use transforms3d::NoesisTransform3DPlugin;pub use transforms3d::Transform3DSpec;pub use typography::FontStyling;pub use typography::NoesisTypography;pub use typography::NoesisTypographyChanged;pub use typography::NoesisTypographyPlugin;pub use typography::TypographyField;pub use typography::TypographyValue;pub use typography::TypographyWatch;pub use ui::NoesisUi;pub use viewmodel::NoesisViewModelChanged;pub use viewmodel::NoesisViewModelPlugin;pub use viewmodel::NoesisVm;pub use viewmodel::ViewModelChangeForwarder;pub use viewmodel::ViewModelDef;pub use viewmodel::VmValue;pub use visibility::NoesisVisibility;pub use visibility::NoesisVisibilityPlugin;pub use visual_state::NoesisVisualState;pub use visual_state::NoesisVisualStatePlugin;pub use visual_state::StateRequest;pub use window_compat::NoesisWindowCompatPlugin;pub use window_compat::WINDOW_CLASS;pub use xaml::BevyXamlProvider;pub use xaml::XamlAsset;pub use xaml::XamlAssetLoader;pub use xaml::XamlAssetPlugin;pub use xaml::XamlRegistry;
Modules§
- animation
- Per-view code-built property animations: the runtime-driven counterpart to a
XAML
<Storyboard>/<DoubleAnimation>declared inline in aControlTemplateorStyle.Triggers. - bake
- Bake an XAML view to an offscreen
Handle<Image>. - binding
- Per-view value-converter / multi-binding bridge: install a code-built
{Binding}, driven by a RustValueConverter/MultiValueConverter, onto a named element’s dependency property. - brushes
- Per-view code-built brush bridge: paint named XAML elements with brushes
constructed in Rust, no XAML authoring required. The brush counterpart of the
crate::dp/crate::geometrywrite bridges. - classes
- Register Rust-backed XAML classes (
<myns:Foo>) with Noesis from Bevy systems. - clip
- Per-view clip bridge: imperative polygon clips against named XAML elements on a
single
NoesisView. The clip counterpart ofcrate::geometry— where that assigns aPath’sData, this assigns any element’sUIElement::Clip. - commands
- Per-view Rust-owned
ICommandbridge. - diagnostics
- App-level diagnostics bridge: surface Noesis’s process-global allocator counters as a Bevy resource and route its error handler into Bevy’s log.
- dp
- Per-view generic dependency-property get/set bridge, keyed by
(x:Name, property). - events
- Per-view routed-event bridge: surface
BaseButton::ClickandUIElement::KeyDownfrom named elements of a singlecrate::NoesisViewas both Bevy messages and BevyEntityEvents (observers). - focus
- Per-view keyboard-focus bridge: give a named XAML element keyboard
focus on a single
crate::NoesisView. - focus_
input - Per-view focus-navigation and input-binding bridge: the directional,
engagement, and key-chord layer on top of the one-shot
crate::NoesisFocusbridge. - font
- Font-asset plumbing for the Bevy plugin.
- geometry
- Per-view geometry bridge: imperative vector polyline writes against named
XAML
Pathelements on a singleNoesisView. The geometry counterpart ofcrate::text. - headless
- Headless harness entry point for tests and CI.
- image
- Image-asset plumbing for the
ImageBrush/Imageloader. - imaging
- Per-view code-built imaging bridge: drive a named
<Image>’s pixels from a Rust-provided bitmap (RGBA8 + size), no image file on disk required. The imaging counterpart of thecrate::brushes/crate::geometrywrite bridges. - inlines
- Per-view formatted text bridge: give a named
TextBlockrich inline content (Run/Bold/Italic/Underline/Span/Hyperlink/LineBreak) from Bevy, then read the resulting live structure back. - input
- Bevy → Noesis input forwarding.
- integration
- App-level system-integration bridge.
- items
- Per-view
ItemsSourcebridge: populate XAML list controls (ComboBox/ListBox/ItemsControl) from a Bevy app, with typed items. - layout
- Per-view
Marginwrites against named XAML elements: the positioning primitive for floating panels (context menus, popups, tooltips) that must follow gameplay coordinates. - list
- Primitive 2: list = query. The rows of a XAML list control are Bevy
entities: spawn an entity carrying a row-data component and a
ListedInmembership, and it appears as a row; despawn it and the row leaves. The boundObservableCollectionis reconciled from the query keyed byEntity, emitting the minimal Add / Remove / Update / Move op sequence (never aClear/Resetin steady state), so a control’s selection and scroll position survive every edit. - markup
- Custom
MarkupExtensionregistration for Bevy. - panel
- Primitive 1: panel = entity. A
UiPanelis a Bevy entity that mounts a sub-XAML fragment as a hosted child of aNoesisViewscene; the bound components on that same entity are itsDataContext. - plain_
vm - Per-view plain-struct
ViewModelbridge: bind a plain BevyComponentto a view’s XAML{Binding field_name}by field name, two-way. - reconcile
- “Diff in parallel, push serially”: the reconcile convention the data-driven bridges (list reconcile, panel/DataContext reconcile) are built on.
- render
- Render integration: drives each
NoesisViewcamera’s UI and composites it into the Bevy frame. - render_
device - wgpu-backed render device for Noesis. This module pulls in no Bevy types, so you can drive it with a hand-built wgpu instance in tests.
- resources
- App-level application-resources bridge. Registers Rust-built resources
(code-built brushes, scalar values) and merged
<ResourceDictionary>XAML into the process-global application resources, so XAML{StaticResource Key}references resolve them without authoring a theme file on disk. - routed_
events - Per-view generic routed-event bridge: surface any
RoutedEvent(mouse, key, focus, drag, manipulation, lifecycle bubbling, …) from named elements of a singlecrate::NoesisViewas Bevy messages. - shapes
- Per-view shapes bridge: build a Noesis vector
Shape(Rectangle,Ellipse, orLine) entirely in Rust and assign it as the content of a named XAML container element on a singleNoesisView. - styles
- Per-view code-built
Stylebridge: restyle named XAML elements with aNoesis::Styleconstructed in Rust, no XAML authoring required. The style counterpart of thecrate::dp/crate::brusheswrite bridges. - svg
- Per-view SVG bridge: drive a named XAML element from an SVG path-data
source string parsed in Rust. The SVG counterpart of the
crate::geometrypolyline bridge. - text
- Per-view
Textbridge: write and observe theTextof named XAML elements (TextBox/TextBlock) on a singlecrate::NoesisView. - theme
- Opt-in loader for Noesis’s shipped control theme.
- transforms
- Per-view
RenderTransformwrites against named XAML elements: the post-layout scale / skew / rotate / translate that drives UI motion (a button that pops on hover, a panel that slides in, a spinning loader) without touching layout. - transforms3d
- Per-view 3D transform writes against named XAML elements: the
UIElement.Transform3Dattached behaviour (WinUI/Noesis) that rotates, scales and translates an element in 3D space about a center, with the implicit projection camera supplying perspective. Distinct from the 2DRenderTransformbridge (crate::transforms): that one setsRenderTransform, this one setsTransform3D. - typography
- Per-view typography bridge: restyle the
TextElementfont properties (size, family, weight, style, stretch) of named XAML elements on a singleNoesisView. - ui
NoesisUi: ergonomic access to the singleNoesisViewin a one-UI app.- viewmodel
- Per-view Rust-owned
ViewModel/DataContextbridge. - visibility
- Per-view visibility bridge: show or hide named XAML elements on a single
NoesisView. - visual_
state - Per-view
VisualStateManager::GoToStatewrites against named XAML controls: the code-driven counterpart to aControlTemplate’s trigger-driven visual states (e.g. a control’sCommonStates:Normal/MouseOver/Pressed/Disabled, or app-authored groups). - window_
compat Windowroot-element compatibility shim.- xaml
- XAML asset plumbing: feeds Bevy-loaded XAML bytes to Noesis’s parser.
Structs§
- Convert
Arg - A borrowed, boxed binding value handed to a
ValueConverter.None-valued (the bound source produced null / the control supplied no parameter) reportsis_none; the typed accessors returnNonewhen the boxed runtime type doesn’t match. - Modifier
Keys - A typed bitset of
Noesis::ModifierKeys: the chord modifiers held down (Alt/Control/Shift/Windows). Compose withSelf::with/FromIteratorand test withSelf::contains. - Noesis
License - Per-developer Indie license credentials.
- Noesis
Plugin - Bevy plugin that initializes Noesis at app startup and shuts it down when
the
Appis dropped. - Plain
Value Ref - A borrowed, boxed value handed to a
PlainSetHandler(aTwoWaywriteback). The typed accessors returnNonewhen the boxed runtime type doesn’t match / the value is null.
Enums§
- Binding
Mode - How a
Bindingpropagates values between source and target. MirrorsNoesis::BindingMode. - Converted
- A value a
ValueConverterproduces. The trampoline re-boxes it into theNoesis::BaseComponent*the binding engine expects. - Cursor
Type - Built-in cursor kind Noesis asks the host to display. Re-exported from the
runtime so consumers can match on
NoesisCursorRequested::cursorwithout depending onnoesis_runtimedirectly. Built-in cursor types, mirroringNoesis::CursorTypeinNsGui/Cursor.h. The discriminants match the C++ enum exactly so the value read back from a liveCursorround-trips. - Focus
Navigation Direction - Mirror of
Noesis::FocusNavigationDirection: the direction forFrameworkElement::move_focus/FrameworkElement::predict_focus.Next/Previous/First/Lastare tab-order traversal (not supported bypredict_focus), whileLeft/Right/Up/Downare directional. - Font
Stretch Noesis::FontStretch.- Font
Style Noesis::FontStyle.- Font
Weight Noesis::FontWeight. The numeric value is the weight (e.g.Normal= 400,Bold= 700), matching the OpenTypeusWeightClass.- Key
- Common subset of
Noesis::KeyfromNsGui/InputEnums.h. Values are the C++ enum ordinals, validated bystatic_assertinnoesis_view.cpp.View::key_downtakes this typed enum, so a key outside the subset can’t be sent until it is added here — add the variant (with a matching assert in C++) to centralize the mapping. - Mouse
Button - Mirror of
Noesis::MouseButtonfromNsGui/InputEnums.h. Ordinals validated at C++ compile time viastatic_assertinnoesis_view.cpp. - Plain
Type - Content type of a reflected plain-VM property. Mirrors
noesis_plain_typeincpp/noesis_shim.h; the ordinal is the FFI tag. - Plain
Value - A value to push into a plain-VM property. The crate boxes it into the
BaseComponent*the binding engine reads. - Routed
Event - A documented
Noesis::RoutedEventaccepted bysubscribe_event. Each variant maps to a curated entry in the C++ event table (noesis_events.cpp), so the typed accessors onEventArgsknow which concrete arg struct fired. Usesubscribe_event_by_namefor arbitrary/custom events not listed here. - Text
Decorations - Re-exported from
noesis_runtime: theTextDecorationsan inline can carry (seeInlineSpec::decorated). TheTextDecorationsanInlinecan carry, mirroringNoesis::TextDecorations.
Traits§
- Multi
Value Converter - Rust-side multi-value conversion logic: combine the source values of the
child bindings into one target value. Returning
NonesignalsUnsetValue(the binding falls back to itsFallbackValue/ the property default). - Value
Converter - Rust-side conversion logic.
convertmaps a binding source value to the target;convert_back(only reached on aTwoWay/OneWayToSourcebinding) maps a target value back to the source. ReturningNonesignalsUnsetValue.
Functions§
- get_
culture - Return the active default culture’s BCP-47 name. Defaults to
"en-US"before anyset_culturecall. - open_
url - Ask Noesis to open
url. Invokes the registered open-URL callback synchronously; a no-op if none is registered. - play_
audio - Ask Noesis to play the sound at
uriatvolume. Invokes the registered play-audio callback synchronously; a no-op if none is registered. - set_
culture - Set the default culture by BCP-47 name (e.g.
"en-US","fr-FR"). The name backs Noesis’s number / currency / date formatting. Round-trips throughget_culture. The C++ shim keeps the name alive in a static buffer for the process lifetime.
Derive Macros§
- Noesis
View Model - Derive macro for
NoesisViewModel: binds a plain struct’s fields by name.