Struct crossterm_winapi::ScreenBufferInfo
source · pub struct ScreenBufferInfo(pub CONSOLE_SCREEN_BUFFER_INFO);
Expand description
Information about a console screen buffer.
This wraps
CONSOLE_SCREEN_BUFFER_INFO
.
Tuple Fields§
§0: CONSOLE_SCREEN_BUFFER_INFO
Implementations§
source§impl ScreenBufferInfo
impl ScreenBufferInfo
sourcepub fn new() -> ScreenBufferInfo
pub fn new() -> ScreenBufferInfo
Create a new console screen buffer without all zeroed properties.
sourcepub fn buffer_size(&self) -> Size
pub fn buffer_size(&self) -> Size
Get the size of the screen buffer.
Will take dwSize
from the current screen buffer and convert it into a Size
.
sourcepub fn terminal_size(&self) -> Size
pub fn terminal_size(&self) -> Size
Get the size of the terminal display window.
Will calculate the width and height from srWindow
and convert it into a Size
.
sourcepub fn terminal_window(&self) -> WindowPositions
pub fn terminal_window(&self) -> WindowPositions
Get the position and size of the terminal display window.
Will take srWindow
and convert it into the WindowPositions
type.
sourcepub fn attributes(&self) -> u16
pub fn attributes(&self) -> u16
Get the current attributes of the characters that are being written to the console.
Will take wAttributes
from the current screen buffer.
sourcepub fn cursor_pos(&self) -> Coord
pub fn cursor_pos(&self) -> Coord
Get the current column and row of the terminal cursor in the screen buffer.
Will take dwCursorPosition
from the current screen buffer.
Trait Implementations§
source§impl Clone for ScreenBufferInfo
impl Clone for ScreenBufferInfo
source§fn clone(&self) -> ScreenBufferInfo
fn clone(&self) -> ScreenBufferInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more