[][src]Struct framebuffer::Framebuffer

pub struct Framebuffer {
    pub device: File,
    pub frame: Mmap,
    pub var_screen_info: VarScreeninfo,
    pub fix_screen_info: FixScreeninfo,
}

Struct that should be used to work with the framebuffer. Direct usage of frame should not be necessary.

Fields

device: Fileframe: Mmapvar_screen_info: VarScreeninfofix_screen_info: FixScreeninfo

Methods

impl Framebuffer[src]

pub fn new<P: AsRef<Path>>(
    path_to_device: P
) -> Result<Framebuffer, FramebufferError>
[src]

pub fn write_frame(&mut self, frame: &[u8])[src]

Writes a frame to the Framebuffer.

pub fn get_fix_screeninfo(
    device: &File
) -> Result<FixScreeninfo, FramebufferError>
[src]

Creates a FixScreeninfo struct and fills it using ioctl.

pub fn get_var_screeninfo(
    device: &File
) -> Result<VarScreeninfo, FramebufferError>
[src]

Creates a VarScreeninfo struct and fills it using ioctl.

pub fn put_var_screeninfo(
    device: &File,
    screeninfo: &VarScreeninfo
) -> Result<i32, FramebufferError>
[src]

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]

Allows setting tty mode from non-terminal session by explicitly specifying device name

Trait Implementations

impl Debug for Framebuffer[src]

Auto Trait Implementations

impl Send for Framebuffer

impl Sync for Framebuffer

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]