pixelab-core 0.1.0

Core types, traits, and utilities for pixelab-rs
Documentation
1
2
3
4
5
6
7
8
use crate::{Backend, Bitmap, Event, Handler};

pub trait Widget {
    fn init(&mut self) {}
    fn draw(&mut self, fb: &mut Box<dyn Bitmap + 'static>);
    fn event(&mut self, event: Event, handler: &mut Handler);
    fn backend(&mut self) -> &mut Backend;
}