[][src]Struct crossterm_winapi::ScreenBufferInfo

pub struct ScreenBufferInfo(pub CONSOLE_SCREEN_BUFFER_INFO);

This type is a wrapper for CONSOLE_SCREEN_BUFFER_INFO and has some methods to extract information from it.

Wraps the underlying type: CONSOLE_SCREEN_BUFFER_INFO link: [https://docs.microsoft.com/en-us/windows/console/console-screen-buffer-info-str]

Methods

impl ScreenBufferInfo[src]

pub fn new() -> ScreenBufferInfo[src]

pub fn buffer_size(&self) -> Size[src]

This will return the buffer size.

Will take dwSize from the current screen buffer and convert it into the Size.

pub fn terminal_size(&self) -> Size[src]

This will return the terminal size.

Will calculate the width and height from srWindow and convert it into a Size.

pub fn terminal_window(&self) -> WindowPositions[src]

This will return the terminal window properties.

Will take srWindow and convert it into the WindowPositions type.

pub fn attributes(&self) -> u16[src]

This will return the terminal window properties.

Will take wAttributes from the current screen buffer.

pub fn cursor_pos(&self) -> Coord[src]

This will return the current cursor position.

Will take dwCursorPosition from the current screen buffer.

Trait Implementations

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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