mod macros;
pub mod config;
#[cfg(feature = "runtime")]
pub mod app;
#[cfg(feature = "runtime")]
pub mod app_config;
#[cfg(feature = "runtime")]
pub mod app_context;
#[cfg(feature = "http-assets")]
pub mod async_assets;
#[cfg(feature = "runtime")]
pub mod dev_plugin;
#[cfg(feature = "dev")]
pub mod dev_tools;
#[cfg(feature = "runtime")]
mod direction;
#[cfg(any(
all(feature = "dev", not(target_os = "android")),
feature = "plugin-host"
))]
mod dylib;
#[cfg(feature = "runtime")]
pub mod files;
#[cfg(all(feature = "dev", not(target_os = "android")))]
pub mod hot;
#[cfg(feature = "dev")]
pub mod hot_state;
#[cfg(feature = "plugin")]
pub mod plugin;
#[cfg(feature = "runtime")]
pub mod prefs;
#[cfg(feature = "platform-headless")]
mod raster;
#[cfg(feature = "runtime")]
pub mod runner;
#[cfg(feature = "runtime")]
pub mod surface;
#[cfg(all(feature = "runtime", feature = "testing"))]
pub mod testing;
#[cfg(feature = "hardware")]
mod texture_ui;
#[cfg(feature = "runtime")]
pub mod tree;
#[cfg(feature = "watch")]
pub mod watch;
#[cfg(feature = "runtime")]
pub mod window;
pub use config::RendererBackend;
#[cfg(feature = "runtime")]
mod preview_runner;
#[cfg(feature = "runtime")]
pub use preview_runner::{PreviewEntry, PreviewSurface};
#[cfg(feature = "runtime")]
pub use app::App;
#[cfg(feature = "runtime")]
pub use app_config::AppConfig;
#[cfg(feature = "runtime")]
pub use app_context::{AppCtx, RedrawWaker};
#[cfg(feature = "runtime")]
pub use dev_plugin::{DevAction, DevPlugin};
#[cfg(feature = "runtime")]
pub use geometry_core::{ObjectFit, Point, Rect, Transform};
#[cfg(feature = "runtime")]
pub use layout_core::{
AlignItems, AvailableSpace, Direction, JustifyContent, LayoutError, LayoutStyle, Margin,
SizeDimension, TemplateTrack,
};
#[cfg(feature = "plugin")]
pub use plugin::EmbeddedApp;
#[cfg(feature = "runtime")]
pub use prefs::UserPrefs;
pub use raw_window_handle::{RawDisplayHandle, RawWindowHandle};
#[cfg(feature = "runtime")]
pub use tree::{Frame, HotTree, LocalTree, UiTree};
#[cfg(feature = "runtime")]
pub use ui_tree::SegmentNodeInfo;
pub use motion_core as motion;
#[cfg(feature = "runtime")]
pub use direction::follow_locale_direction;
pub use i18n_core as i18n;
pub use i18n_core::set_catalog;
pub use i18n_core::{current_locale, detect_system_locale, set_locale, use_locale};
#[cfg(feature = "runtime")]
pub use platform_core::{
Cursor, Event, FullscreenMode, Key, NamedKey, ScrollDelta, WindowCommand, WindowConfig,
WindowPosition, push_window_command, take_window_commands,
};
#[cfg(feature = "watch")]
pub use watch::watch_path;
#[cfg(feature = "hardware")]
pub use renderer_hardware::gpu;
#[cfg(feature = "hardware")]
pub use texture_ui::{TextureUi, TextureUiError};
#[cfg(feature = "runtime")]
pub use platform_core::{
EventHandler, ModifiersState, MultiSurfacePlatform, Platform, PlatformError, PointerButton,
PointerSource, SurfaceId, Window,
};
#[cfg(all(feature = "runtime", feature = "desktop", not(target_os = "android")))]
pub use platform_desktop::DesktopPathsProvider;
#[cfg(feature = "runtime")]
pub use reactive_core::{
Effect, Emitter, Memo, ReadSignal, RwSignal, Source, Task, batch, begin_batch, derive,
derive_pair, drain_tasks, effect, end_batch, memo, reset_runtime, reset_tasks, set_task_waker,
signal, spawn_stream, spawn_task,
};
#[cfg(all(feature = "runtime", feature = "dynamic-image"))]
pub use renderer_assets::{ImageError, decode};
#[cfg(all(feature = "runtime", feature = "svg"))]
pub use renderer_assets::{SvgData, SvgError, VectorCommand};
#[cfg(all(feature = "runtime", feature = "dynamic-svg"))]
pub use renderer_assets::{static_key, svg_cached};
#[cfg(feature = "runtime")]
pub use renderer_core::{
BorderRadius, BorderWidths, Color, DrawCommand, DrawState, FillRule, GlyphRaster, Gradient,
GradientKind, GradientStop, GradientStops, ImageData, ImageFilter, LineCap, LineJoin, Paint,
PathData, PathStyle, PathVerb, RectStyle, RendererError, Scale, Shadow, ShapeStyle, Stroke,
TextAlign, TextRun, TextStyle, for_each_with_matrix, hash_draw_commands, transform_clip_rect,
};
#[cfg(feature = "runtime")]
pub use renderer_core::{
FontConfig, RenderBackend, RendererBuild, RendererFactory, TextMetrics,
set_default_text_metrics, set_text_metrics,
};
#[cfg(feature = "runtime")]
pub fn font_family_available(family: &str) -> bool {
renderer_text::font_family_available(family)
}
#[cfg(feature = "runtime")]
pub fn install_default_text_metrics() {
renderer_core::set_default_text_metrics(renderer_text::ShaperMetrics);
}
#[cfg(feature = "software")]
pub use renderer_software::{CacheStat, cache_stats, sweep_idle as sweep_renderer_caches};
pub use services_core::app_paths as paths;
pub use services_core::{AppPathsProvider, NoPaths};
pub use services_core::{Clipboard, clipboard, clipboard_text, set_clipboard, set_clipboard_text};
#[cfg(feature = "http-assets")]
pub use async_assets::HttpAssetSource;
#[cfg(feature = "runtime")]
pub use services_core::{Scope, context, provide, set_context, try_inject, with_service};
#[cfg(feature = "runtime")]
pub use surface::{
SurfaceContent, SurfaceControl, SurfaceHost, SurfaceToken, open_surface, set_surface_host,
surface_content,
};
#[cfg(feature = "runtime")]
pub use theme_core::{
ControlSize, Theme, ThemeTokens, active_mode, control_scale, follow_system, register_mode,
set_control_size, set_mode, set_system_dark, set_theme, use_control_size, use_theme,
use_theme_tokens,
};
#[cfg(all(feature = "runtime", feature = "svg"))]
pub use ui_core::Svg;
#[cfg(feature = "async-assets")]
pub use ui_core::{AssetSource, AssetState};
#[cfg(feature = "runtime")]
pub use ui_core::{
Axis, Canvas, ChildSlot, Children, ClipAxis, ClippedItem, Component, ComponentList, Container,
DEFAULT_SCRIM, DragStart, Edge, EventResult, Holding, Image, Input, KeyNav, KeyNavMove,
LayoutItem, LayoutScrollArea, Lazy, Line, LineGutter, NodeId, NodeVec, Overlay, Path,
PointerButtons, ReactiveList, Rectangle, RenderNode, RichText, ScrollPage, ScrollViewport,
ScrollbarStyle, Slots, StyledContainer, SurfaceScaffold, SurfaceTransition, Text, TextArea,
VirtualList, WindowRoot, anchor_rect, apply_move, box_item, box_transform, close_overlay,
compute_layout, current_direction, dismiss_depth, dismiss_top, drag_start, drag_travel, focus,
fragment, fragment_positional, insertion_index, interactive_rects, kept, key_held,
key_nav_apply, key_nav_apply_grid, key_pressed, logical_border_radius, logical_border_widths,
mark_dirty, modifiers, new_container, new_leaf, observe_keyboard, observe_pointer,
open_overlay, overlay_state, pointer_buttons, relayout_if_dirty, remove_node, set_children,
set_direction, set_display, set_min_height, set_overlay_host, track_layout, transform_pointer,
use_context, use_direction, use_dismiss_depth, visible_window,
};
#[cfg(feature = "runtime")]
pub fn reset_layout_runtime() {
install_default_text_metrics();
ui_core::reset_layout_runtime();
}
#[cfg(feature = "navigate")]
pub use navigate_core::{
NavHost, NavPage, NavTransition, Navigator, PagePolicy, SimplePage, TabHost, TabStacks,
};
#[cfg(feature = "components")]
pub use ui_components::{
AccordionProps, BadgeProps, ButtonProps, CheckboxProps, ChipProps, DrawerProps, GroupProps,
HeadingProps, ItemProps, MIN_FRAME_SIZE, MenuProps, ModalProps, ProgressProps, RadioProps,
ReorderableProps, SectionProps, SelectProps, SliderProps, SpinnerProps, StepperProps,
SurfaceFrameStyle, TabsProps, TextFieldProps, ToggleProps, TooltipProps, WindowControls,
accordion, badge, button, checkbox, chip, drawer, group, heading, item, menu, modal, progress,
radio, reorderable, section, select, separator, slider, spinner, stepper, tabs, text_field,
toggle, tooltip, window_frame,
};
#[cfg(feature = "runtime")]
pub fn dispatch_overlays(event: &Event) -> bool {
ui_core::dispatch_overlays(event) == EventResult::Handled
}
#[cfg(all(
any(feature = "preview", feature = "preview-headless"),
not(target_os = "android")
))]
mod preview;
#[cfg(all(
any(feature = "preview", feature = "preview-headless"),
not(target_os = "android")
))]
pub use preview::PreviewApp;
#[cfg(all(feature = "preview-headless", not(target_os = "android")))]
pub use preview::run_preview_png;
#[cfg(feature = "platform-headless")]
pub use raster::rasterize;
#[cfg(feature = "dev")]
pub use hot_state::{hot_restore_json, hot_signal, hot_snapshot_json, probe};
#[cfg(all(feature = "runtime", not(feature = "dev")))]
pub fn hot_signal<T>(key: &str, init: T) -> reactive_core::RwSignal<T>
where
T: Clone + serde::Serialize + serde::de::DeserializeOwned + 'static,
{
let _ = key;
reactive_core::signal(init)
}
#[cfg(all(feature = "runtime", target_os = "android"))]
pub use platform_android::AndroidApp;
#[cfg(all(feature = "runtime", not(target_os = "android")))]
pub use runner::build_surface_handler;
#[cfg(all(feature = "runtime", target_os = "android"))]
pub use runner::run_android_app_with_name;
#[cfg(all(feature = "dev", not(target_os = "android")))]
pub use runner::run_hot_reload_host;
#[cfg(all(feature = "runtime", not(target_os = "android")))]
pub use runner::run_multi_with_platform;
#[cfg(all(feature = "runtime", not(target_os = "android")))]
pub use runner::run_with_platform;
#[cfg(feature = "runtime")]
pub use runner::set_default_font_family;
#[cfg(all(feature = "runtime", not(target_os = "android")))]
pub use runner::{SurfaceWindow, run_with_platform_and_renderer};
#[cfg(all(feature = "runtime", feature = "desktop", not(target_os = "android")))]
pub use runner::{open_window, run_app_windowed, run_app_with_name};
pub use telar_macros::{ThemeTokens, app, rsx_modules, t};
#[cfg(all(feature = "runtime", not(target_os = "android")))]
pub use preview_runner::{dev_entry, try_run_test};