Struct framebuffer::Framebuffer [−][src]
pub struct Framebuffer {
pub device: File,
pub frame: MmapMut,
pub var_screen_info: VarScreeninfo,
pub fix_screen_info: FixScreeninfo,
}
Expand description
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
Implementations
Writes a frame to the Framebuffer.
Reads a frame from the framebuffer.
Creates a FixScreeninfo struct and fills it using ioctl.
Creates a VarScreeninfo struct and fills it using ioctl.
pub fn put_var_screeninfo(
device: &File,
screeninfo: &VarScreeninfo
) -> Result<i32, FramebufferError>
pub fn pan_display(
device: &File,
screeninfo: &VarScreeninfo
) -> Result<i32, FramebufferError>
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>
pub fn set_kd_mode_ex<P: AsRef<Path>>(
path_to_device: P,
kd_mode: KdMode
) -> Result<i32, FramebufferError>
Allows setting tty mode from non-terminal session by explicitly specifying device name