blinc_app
Part of the Blinc UI Framework
This crate is a component of Blinc, a GPU-accelerated UI framework for Rust. For full documentation and guides, visit the Blinc documentation.
High-level application framework for Blinc UI, combining layout and GPU rendering.
Overview
blinc_app provides the main entry point for building Blinc applications. It integrates the layout engine with GPU rendering and provides both headless and windowed application modes.
Features
- Windowed Applications: Native window support via winit
- Headless Rendering: Render to texture without a window
- Text Rendering: Integrated font loading and text measurement
- Image Loading: Async image loading with caching
- Theme Integration: Built-in theme support
- Platform Abstraction: Unified API across platforms
Quick Start
Windowed Application
use *;
use ;
Headless Rendering
use ;
Window Configuration
let config = WindowConfig ;
Font Loading
use system_font_paths;
// Get system font directories
let font_paths = system_font_paths;
// Load fonts
for path in font_paths
Architecture
blinc_app
├── lib.rs # Main BlincApp type
├── context.rs # RenderContext implementation
├── windowed.rs # WindowedApp for native windows
├── headless.rs # Headless rendering mode
└── prelude.rs # Common re-exports
Re-exports
blinc_app re-exports commonly used types from:
blinc_layout- Layout primitives and elementsblinc_core- Core types (Color, Rect, etc.)blinc_gpu- GPU renderer types
Examples
See the examples/ directory for complete examples:
hello_world.rs- Basic windowed appcn_demo.rs- Component library showcaseimage_layer_test.rs- Image rendering testglass_demo.rs- Glass/blur effects
Run examples with:
License
MIT OR Apache-2.0