pub struct Framebuffer { /* private fields */ }Expand description
Main framebuffer structure
Implementations§
Source§impl Framebuffer
impl Framebuffer
Sourcepub fn init_limine(
addr: u64,
width: u32,
height: u32,
stride: u32,
format: PixelFormat,
) -> Result<(), &'static str>
pub fn init_limine( addr: u64, width: u32, height: u32, stride: u32, format: PixelFormat, ) -> Result<(), &'static str>
Initialize framebuffer with Limine-provided buffer
Sourcepub fn init_virtio_gpu() -> Result<(), &'static str>
pub fn init_virtio_gpu() -> Result<(), &'static str>
Initialize framebuffer with VirtIO GPU
Sourcepub fn info() -> Option<FramebufferInfo>
pub fn info() -> Option<FramebufferInfo>
Get framebuffer info
Sourcepub fn is_available() -> bool
pub fn is_available() -> bool
Check if framebuffer is initialized
Sourcepub fn source() -> FramebufferSource
pub fn source() -> FramebufferSource
Get framebuffer source
Sourcepub fn fill_rect(x: u32, y: u32, width: u32, height: u32, r: u8, g: u8, b: u8)
pub fn fill_rect(x: u32, y: u32, width: u32, height: u32, r: u8, g: u8, b: u8)
Fill rectangle with color
Sourcepub fn swap_buffers()
pub fn swap_buffers()
Swap buffers (for double buffering)
Sourcepub fn set_double_buffering(enable: bool)
pub fn set_double_buffering(enable: bool)
Enable/disable double buffering
Trait Implementations§
impl Send for Framebuffer
impl Sync for Framebuffer
Auto Trait Implementations§
impl Freeze for Framebuffer
impl RefUnwindSafe for Framebuffer
impl Unpin for Framebuffer
impl UnsafeUnpin for Framebuffer
impl UnwindSafe for Framebuffer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more