pub struct Backend {
pub bitmap: Option<Box<dyn Bitmap + 'static>>,
pub bitmap_type: Option<Box<dyn Bitmap + 'static>>,
pub position: Point,
pub area: Area,
pub enable: bool,
pub visible: bool,
pub background_color: Color,
pub handle_all_event: bool,
pub on_press: Option<Box<dyn FnMut(Point, &mut Handler, &mut Backend)>>,
pub on_motion: Option<Box<dyn FnMut(Point, &mut Handler, &mut Backend)>>,
pub on_release: Option<Box<dyn FnMut(Point, &mut Handler, &mut Backend)>>,
pub on_message: Option<Box<dyn FnMut(&'static str, &mut Handler, &mut Backend)>>,
}Fields§
§bitmap: Option<Box<dyn Bitmap + 'static>>§bitmap_type: Option<Box<dyn Bitmap + 'static>>§position: Point§area: Area§enable: bool§visible: bool§background_color: Color§handle_all_event: bool§on_press: Option<Box<dyn FnMut(Point, &mut Handler, &mut Backend)>>§on_motion: Option<Box<dyn FnMut(Point, &mut Handler, &mut Backend)>>§on_release: Option<Box<dyn FnMut(Point, &mut Handler, &mut Backend)>>§on_message: Option<Box<dyn FnMut(&'static str, &mut Handler, &mut Backend)>>Implementations§
Source§impl Backend
impl Backend
pub fn new() -> Self
pub fn set_size(&mut self, width: u16, height: u16)
pub fn create_buffer(&mut self) -> Result<(), PixelabError>
pub fn destroy_buffer(&mut self)
pub fn overlay( &mut self, fb: &mut Box<dyn Bitmap + 'static>, ) -> Result<(), PixelabError>
pub fn set_pixel( &mut self, point: Point, color: Color, ) -> Result<(), PixelabError>
pub fn clear(&mut self, color: Color) -> Result<(), PixelabError>
pub fn set_position(&mut self, x: u16, y: u16)
pub fn check_scope(&mut self, point: Point) -> bool
pub fn on_press( &mut self, f: impl 'static + FnMut(Point, &mut Handler, &mut Backend), )
pub fn on_motion( &mut self, f: impl 'static + FnMut(Point, &mut Handler, &mut Backend), )
pub fn on_release( &mut self, f: impl 'static + FnMut(Point, &mut Handler, &mut Backend), )
pub fn on_message<F>( &mut self, f: impl 'static + FnMut(&'static str, &mut Handler, &mut Backend), )
Auto Trait Implementations§
impl !RefUnwindSafe for Backend
impl !Send for Backend
impl !Sync for Backend
impl !UnwindSafe for Backend
impl Freeze for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more