pub struct FBmanager {
pub framebuffer: Framebuffer,
pub buffer: Vec<u8>,
pub windows: Vec<Window>,
}
Expand description
A container to manage the framebuffer. Abstracts away from the buffer that represents the screen
Fields§
§framebuffer: Framebuffer
§buffer: Vec<u8>
§windows: Vec<Window>
Implementations§
Source§impl FBmanager
impl FBmanager
Sourcepub fn new(template: &[WindowTemplate]) -> Self
pub fn new(template: &[WindowTemplate]) -> Self
Creates a new FBmanager
using the given template
Sourcepub fn enable_graphics() -> Result<i32, FramebufferError>
pub fn enable_graphics() -> Result<i32, FramebufferError>
Enables Framebuffer graphics. Must be enabled to draw to the screen
Must call disable_graphics()
before the process exits
Sourcepub fn disable_graphics() -> Result<i32, FramebufferError>
pub fn disable_graphics() -> Result<i32, FramebufferError>
Disables Framebuffer graphics. Call to use traditional means to print to the screen.
Sourcepub fn fill(&mut self, id: usize, rgb: (u8, u8, u8))
pub fn fill(&mut self, id: usize, rgb: (u8, u8, u8))
Fills the Window
with the given id
to the given color
Auto Trait Implementations§
impl Freeze for FBmanager
impl RefUnwindSafe for FBmanager
impl Send for FBmanager
impl Sync for FBmanager
impl Unpin for FBmanager
impl UnwindSafe for FBmanager
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