Skip to main content

SimpleDisplayAdapter

Struct SimpleDisplayAdapter 

Source
pub struct SimpleDisplayAdapter {
    fb_virt: usize,
    fb_width: u32,
    fb_height: u32,
    fb_stride: u32,
    fb_bpp: u8,
    display_count: usize,
}
Expand description

Adapter backed by a single physical framebuffer (Limine or VirtIO).

Fields§

§fb_virt: usize

Physical framebuffer info.

§fb_width: u32§fb_height: u32§fb_stride: u32§fb_bpp: u8§display_count: usize

Number of displays (1 for simple adapter).

Implementations§

Source§

impl SimpleDisplayAdapter

Source

pub fn new(virt: usize, width: u32, height: u32, stride: u32, bpp: u8) -> Self

Create from an existing framebuffer.

Source

pub fn from_framebuffer() -> Option<Self>

Create from the global Framebuffer if available.

Trait Implementations§

Source§

impl GraphicsAdapter for SimpleDisplayAdapter

Source§

type Screen = HeapScreen

The screen type created by this adapter.
Source§

fn display_count(&self) -> usize

Number of connected displays.
Source§

fn display_size(&self, display_id: usize) -> (u32, u32)

Resolution of a specific display.
Source§

fn create_framebuffer(&self, width: u32, height: u32) -> HeapScreen

Create an offscreen framebuffer of the given size.
Source§

fn update_plane(&self, display_id: usize, screen: &HeapScreen, damage: Damage)

Present an offscreen buffer to a physical display. Read more
Source§

fn supports_hw_cursor(&self) -> bool

Returns true if the adapter supports hardware cursor planes.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.