pub trait GraphicsDevice: Device {
// Required methods
fn get_display_name(&self) -> &'static str;
fn get_framebuffer_config(&self) -> Result<FramebufferConfig, &'static str>;
fn get_framebuffer_address(&self) -> Result<usize, &'static str>;
fn flush_framebuffer(
&self,
x: u32,
y: u32,
width: u32,
height: u32,
) -> Result<(), &'static str>;
fn init_graphics(&self) -> Result<(), &'static str>;
}Expand description
Graphics device interface
This trait defines the interface for graphics devices. It provides methods for framebuffer management and display operations.
Required Methods§
Sourcefn get_display_name(&self) -> &'static str
fn get_display_name(&self) -> &'static str
Get the device display name
Sourcefn get_framebuffer_config(&self) -> Result<FramebufferConfig, &'static str>
fn get_framebuffer_config(&self) -> Result<FramebufferConfig, &'static str>
Get framebuffer configuration
Sourcefn get_framebuffer_address(&self) -> Result<usize, &'static str>
fn get_framebuffer_address(&self) -> Result<usize, &'static str>
Get framebuffer memory address
Sourcefn flush_framebuffer(
&self,
x: u32,
y: u32,
width: u32,
height: u32,
) -> Result<(), &'static str>
fn flush_framebuffer( &self, x: u32, y: u32, width: u32, height: u32, ) -> Result<(), &'static str>
Flush framebuffer region to display
Sourcefn init_graphics(&self) -> Result<(), &'static str>
fn init_graphics(&self) -> Result<(), &'static str>
Initialize the graphics device (idempotent)