[−][src]Struct framebuffer::Framebuffer
Struct that should be used to work with the framebuffer. Direct usage of frame
should not be
necessary.
Fields
device: File
frame: MmapMut
var_screen_info: VarScreeninfo
fix_screen_info: FixScreeninfo
Methods
impl Framebuffer
[src]
pub fn new<P: AsRef<Path>>(
path_to_device: P
) -> Result<Framebuffer, FramebufferError>
[src]
path_to_device: P
) -> Result<Framebuffer, FramebufferError>
pub fn write_frame(&mut self, frame: &[u8])
[src]
Writes a frame to the Framebuffer.
pub fn read_frame(&self) -> &[u8]
[src]
Reads a frame from the framebuffer.
pub fn get_fix_screeninfo(
device: &File
) -> Result<FixScreeninfo, FramebufferError>
[src]
device: &File
) -> Result<FixScreeninfo, FramebufferError>
Creates a FixScreeninfo struct and fills it using ioctl.
pub fn get_var_screeninfo(
device: &File
) -> Result<VarScreeninfo, FramebufferError>
[src]
device: &File
) -> Result<VarScreeninfo, FramebufferError>
Creates a VarScreeninfo struct and fills it using ioctl.
pub fn put_var_screeninfo(
device: &File,
screeninfo: &VarScreeninfo
) -> Result<i32, FramebufferError>
[src]
device: &File,
screeninfo: &VarScreeninfo
) -> Result<i32, FramebufferError>
pub fn set_kd_mode(kd_mode: KdMode) -> Result<i32, FramebufferError>
[src]
Sets the tty graphics mode. Make sure to change it back to KdMode::Text after the program is done!
pub fn set_kd_mode_ex<P: AsRef<Path>>(
path_to_device: P,
kd_mode: KdMode
) -> Result<i32, FramebufferError>
[src]
path_to_device: P,
kd_mode: KdMode
) -> Result<i32, FramebufferError>
Allows setting tty mode from non-terminal session by explicitly specifying device name
Trait Implementations
Auto Trait Implementations
impl Send for Framebuffer
impl Sync for Framebuffer
impl Unpin for Framebuffer
impl UnwindSafe for Framebuffer
impl RefUnwindSafe for Framebuffer
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
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>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,