Expand description
Slint platform backend for Kindles.
§Usage
slint::include_modules!();
static DEFAULT_FONT: &[u8] = include_bytes!("../ui/MyFont.ttf");
static SERIF_FONT: &[u8] = include_bytes!("../ui/MySerif.ttf");
fn main() {
let backend = slint_backend_kindle::install(DEFAULT_FONT)
.expect("failed to install Kindle backend");
let app = AppWindow::new().expect("failed to create window");
backend.register_font_from_memory(SERIF_FONT).expect("failed to register font");
app.run().expect("event loop error");
}Structs§
- Kindle
Backend - Returned by
install. Use it to add more fonts and configure power. - NoSchedule
- Typestate markers
- Scheduled
- Wake
Schedule - How often to wake from suspend-to-RAM and how long to stay awake afterwards.
Functions§
- install
- Set up the Kindle backend and use
font_dataas the default font.