⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Framebuffer

Struct Framebuffer 

Source
pub struct Framebuffer { /* private fields */ }
Expand description

Framebuffer configuration

Implementations§

Source§

impl Framebuffer

Source

pub const fn new() -> Self

Source

pub fn configure(&mut self, width: u32, height: u32, buffer: *mut u32)

Source

pub fn configure_with_phys( &mut self, width: u32, height: u32, pitch: u32, bpp: u8, buffer: *mut u32, phys_addr: u64, format: u32, )

Configure with physical address tracking (for user-space mmap).

Source

pub fn width(&self) -> u32

Source

pub fn height(&self) -> u32

Source

pub fn pitch(&self) -> u32

Source

pub fn phys_addr(&self) -> u64

Source

pub fn size(&self) -> u64

Source

pub fn get_info(&self) -> FbInfo

Get framebuffer info for user space.

Source

pub fn buffer_ptr(&self) -> Option<*mut u32>

Get the raw buffer pointer (for compositor back-buffer swap).

Trait Implementations§

Source§

impl Default for Framebuffer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl GraphicsContext for Framebuffer

Source§

fn draw_pixel(&mut self, x: i32, y: i32, color: Color)

Source§

fn draw_rect(&mut self, rect: Rect, color: Color)

Source§

fn fill_rect(&mut self, rect: Rect, color: Color)

Source§

fn clear(&mut self, color: Color)

Source§

impl Send for Framebuffer

Source§

impl Sync for Framebuffer

Auto Trait Implementations§

§

impl Freeze for Framebuffer

§

impl RefUnwindSafe for Framebuffer

§

impl Unpin for Framebuffer

§

impl UnwindSafe for Framebuffer

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.