Expand description
Strata Platform: Unified Native Hardware Abstraction Layer for Android, iOS, macOS, Windows, Linux, and Web.
Provides zero-dependency platform windowing abstractions, client-side decorations (CSD), desktop system tray integrations, and headless mock drivers for deterministic CI testing.
§Examples
use strata_platform::WindowConfig;
let mut config = WindowConfig::default();
config.title = "My Strata App".into();
assert_eq!(config.title, "My Strata App");Re-exports§
pub use biometrics::authenticate_biometric;pub use biometrics::probe_biometric_capability;pub use biometrics::set_mock_biometric_result;pub use biometrics::BiometricAuthResult;pub use biometrics::BiometricCapability;pub use biometrics::BiometricKind;pub use csd::ControlPlacement;pub use csd::CsdController;pub use csd::CsdGeometry;pub use csd::CsdHitZone;pub use cursor_theme::CursorBitmap;pub use cursor_theme::CursorTheme;pub use dialog::open_file;pub use dialog::open_file_async;pub use dialog::open_multiple_files;pub use dialog::open_multiple_files_async;pub use dialog::pick_folder;pub use dialog::pick_folder_async;pub use dialog::save_file;pub use dialog::save_file_async;pub use dialog::show_message_box;pub use dialog::DialogFilter;pub use dialog::DialogMockResponse;pub use dialog::MessageBoxButtons;pub use dialog::MessageBoxResult;pub use dialog::MessageBoxType;pub use dialog::OpenFileOptions;pub use dialog::PickFolderOptions;pub use dialog::SaveFileOptions;pub use events::decode_file_uri_to_path;pub use events::parse_dropped_uri_list_to_paths;pub use events::KeyCode;pub use events::Modifiers;pub use events::MouseButton;pub use events::PlatformEvent;pub use events::PointerKind;pub use events::StylusPhase;pub use events::TouchPhase;pub use notifications::close_notification;pub use notifications::enable_notification_recorder;pub use notifications::take_closed_notification_ids;pub use notifications::take_recorded_notifications;pub use notifications::NotificationAction;pub use notifications::NotificationBuilder;pub use notifications::NotificationRecord;pub use notifications::NotificationUrgency;pub use print::list_printers;pub use print::print_pdf_bytes;pub use print::set_mock_print_spooler;pub use print::take_mock_print_jobs;pub use print::PrintDuplex;pub use print::PrintJobOptions;pub use print::PrinterInfo;pub use print::RecordedPrintJob;pub use gtk_window::cairo_rounded_rect;pub use gtk_window::cairo_rounded_rect_radii;pub use gtk_window::gtk_begin_window_drag;pub use gtk_window::gtk_close;pub use gtk_window::gtk_current_modifiers;pub use gtk_window::gtk_focus_window;pub use gtk_window::gtk_get_clipboard_text;pub use gtk_window::gtk_gpu_2d_enabled;pub use gtk_window::gtk_gpu_surface_is_active;pub use gtk_window::gtk_is_closing;pub use gtk_window::gtk_is_maximized;pub use gtk_window::gtk_last_gpu_telemetry;pub use gtk_window::gtk_last_tile_cache_stats;pub use gtk_window::gtk_minimize;pub use gtk_window::gtk_present_active_gpu_surface_now;pub use gtk_window::gtk_present_active_gpu_surface_now_timed;pub use gtk_window::gtk_primary_refresh_interval;pub use gtk_window::gtk_reset_ime;pub use gtk_window::gtk_set_clipboard_text;pub use gtk_window::gtk_set_cursor;pub use gtk_window::gtk_set_gpu_2d_enabled;pub use gtk_window::gtk_set_ime_cursor_location;pub use gtk_window::gtk_set_ime_surrounding_text;pub use gtk_window::gtk_toggle_maximize;pub use gtk_window::gtk_warp_cursor;pub use gtk_window::init_pango_text_measurement;pub use gtk_window::launch_gtk_window;pub use gtk_window::launch_gtk_window_with_config;pub use gtk_window::launch_gtk_window_with_scheduler;pub use gtk_window::pango_font_metrics;pub use gtk_window::pango_measure_styled_text;pub use gtk_window::pango_measure_styled_text_family;pub use gtk_window::pango_measure_text;pub use gtk_window::pango_measure_text_family;pub use gtk_window::post_platform_event;pub use gtk_window::render_display_list_to_cairo;pub use gtk_window::render_to_captured_buffer;pub use gtk_window::render_to_png;pub use gtk_window::render_to_png_bytes;pub use gtk_window::resolved_font_family;pub use gtk_window::set_cursor_position;pub use gtk_window::try_present_display_list_gpu;pub use gtk_window::try_present_display_list_gpu_timed;pub use gtk_window::warp_cursor;pub use wgpu_surface::render_scene_3d_wgpu_bgra;pub use wgpu_surface::WgpuSwapchainPresenter;pub use wgpu_surface::WgpuWindowPresenter;pub use mcp_cursor::McpCursorState;pub use dbus::show_desktop_notification;pub use dbus::DbusClient;pub use dbus::DbusMessageDecoder;pub use dbus::DbusMessageEncoder;pub use menu::AcceleratorModifier;pub use menu::Menu;pub use menu::MenuAccelerator;pub use menu::MenuBar;pub use menu::MenuItem;pub use menu::MenuItemRole;pub use shortcuts::ShortcutCallback;pub use shortcuts::ShortcutManager;pub use shortcuts::ShortcutTrigger;pub use single_instance::decode_args;pub use single_instance::encode_args;pub use single_instance::SingleInstanceLock;pub use single_instance::SingleInstanceStatus;pub use surface::FramePacer;pub use surface::PresentMode;pub use surface::RefreshRate;pub use surface::SurfaceConfig;pub use surface::SurfaceHandle;pub use tray::DbusStatusNotifier;pub use tray::clear_delivered_notifications;pub use tray::get_delivered_notifications;pub use tray::DesktopNotification;pub use tray::NativeTrayHandle;pub use tray::TrayEvent;pub use tray::TrayEventChannel;pub use tray::TrayEventReceiver;pub use tray::TrayEventSink;pub use tray::TrayIcon;pub use tray::TrayMenu;pub use tray::TrayMenuItem;pub use vibrancy::apply_vibrancy;pub use vibrancy::clear_vibrancy;pub use vibrancy::VibrancyConfig;pub use vibrancy::VibrancyEffect;pub use vibrancy::VibrancyError;pub use wayland_window::WaylandDecoder;pub use wayland_window::WaylandEncoder;pub use wayland_window::WaylandEventLoop;pub use wayland_window::WaylandWindow;pub use window::CursorIcon;pub use window::EventLoop;pub use window::EventLoopControl;pub use window::HoverTooltipStyle;pub use window::LivePlatformWindow;pub use window::MockEventLoop;pub use window::MockPlatformWindow;pub use window::MonitorInfo;pub use window::NativeSurfaceWindow;pub use window::PlatformWindow;pub use window::ThemeMode;pub use window::WindowAnchor;pub use window::WindowConfig;pub use window::WindowDecoration;pub use window::WindowMode;pub use window_manager::WindowId;pub use window_manager::WindowManager;pub use x11_window::PureX11Client;pub use x11_window::PureX11Window;pub use x11_window::X11EventLoop;pub use x11_window::X11ShmSegment;pub use x11_window::X11Window;pub use x11_window::X11WireDecoder;pub use x11_window::X11WireEncoder;pub use cairo;pub use gtk;pub use pango;
Modules§
- biometrics
- Cross-platform native OS biometric authentication (
fprintdD-Bus on Linux,LocalAuthenticationTouch ID on macOS, Windows Hello on Windows) + deterministic mock override. - csd
- Client-Side Decorations (CSD): Titlebar geometry, control buttons, and resize border hit-testing.
- cursor_
theme - System Cursor Theme and Xcursor parser.
- dbus
- Pure-Rust D-Bus wire protocol serializer, client, and desktop notification daemon.
- dialog
- Cross-platform native OS dialogs (file pickers, folder selectors, and message boxes).
- events
- Platform Event Model: Mouse, Keyboard, Touch, Window State, and File Drag-and-Drop.
- gtk_
window - High-Fidelity Native GTK3 and Cairo Presentation Backend for Linux.
- mcp_
cursor - Emulated MCP Cursor State and Animation Engine.
- menu
- Native application menus, submenus, keyboard accelerators, and menu bar models.
- notifications
- Cross-platform rich native OS notifications (
org.freedesktop.Notificationsover pure-Rust D-Bus on Linux,UNUserNotificationCenter/osascript on macOS, WinRT Toast on Windows) plus an in-memory deterministic recorder for headless CI testing. - prelude
- Platform prelude module.
- Cross-platform native OS printer discovery and PDF print spooler dispatch
(CUPS
lpstat/lpon Linux & macOS, Win32 spooler hooks on Windows, andMockPrintSpoolerfor CI). - raw_abi
- Zero-dependency raw Native OS ABI protocols and descriptors for Windows, Wayland, and macOS.
- shortcuts
- Universal cross-platform keyboard shortcut and keybinding manager.
- single_
instance - Single-Instance Mutex and Inter-Process Communication (IPC) Window Focusing.
- surface
- Abstract hardware presentation surfaces, swapchain configuration, and frame pacing.
- tray
- Desktop System Tray abstraction (
TrayIcon,TrayMenu,TrayMenuItem). - vibrancy
- Operating system window vibrancy, frosted-glass blurs, and backdrop composition.
- wayland_
window - Pure-Rust Wayland Client Protocol Backend and Hardware Event Loop.
- wgpu_
surface - Hardware
wgpuswapchain surface presenter and offscreen GPU bridge forstrata_platform. - window
- Window configuration, platform window traits, and mock implementations.
- window_
manager - Multi-window desktop manager with parent-child modality, focus arbitration, and event multiplexing.
- x11_
window - Pure-Rust Linux X11 Windowing, Event Loop, and MIT-SHM Shared Memory Presentation.
Structs§
- Captured
Surface Buffer - Owned surface pixel buffer captured on the UI thread so PNG compression & base64 encoding can execute on a background worker thread without stalling rendering.
- GpuPresent
Timings - Structured wall-clock breakdown returned by hybrid GTK + wgpu swapchain presentation so
[
FrameProfileRecord] captures real 2D raster/upload, 3D GPU encode/submit, and swapchain present durations instead of attributing everything to a single bucket. - Platform
GpuTelemetry - Snapshot of hardware GPU pass timings, Scene3D offscreen cache statistics, and VRAM allocation.
- Software
Surface Presenter - Zero-dependency software presentation surface holding a target backing pixel store.
- Swapchain
Compositor - Orchestrates display list compilation, damage scissoring, and swapchain presentation.
Enums§
- Platform
Target - Target operating system or runtime platform.
- Present
Error - Potential presentation and swapchain errors.
- Swapchain
Format - Color format for pixel data stored in the swapchain surface.
Traits§
- Surface
Presenter - Abstract hardware presentation surface capable of receiving rendered frames.
Functions§
- render_
to_ captured_ buffer_ pure - Pure-Rust headless software rasterization into an owned RGBA pixel buffer.
- render_
to_ png_ bytes_ pure - Pure-Rust headless software rasterization and PNG byte export.