Skip to main content

Crate slint_backend_kindle

Crate slint_backend_kindle 

Source
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§

KindleBackend
Returned by install. Use it to add more fonts and configure power.
NoSchedule
Typestate markers
Scheduled
WakeSchedule
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_data as the default font.