[−][src]Struct crossterm_winapi::ScreenBufferInfo
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]
Implementations
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
impl Clone for ScreenBufferInfo
[src]
fn clone(&self) -> ScreenBufferInfo
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ScreenBufferInfo
[src]
impl From<CONSOLE_SCREEN_BUFFER_INFO> for ScreenBufferInfo
[src]
fn from(csbi: CONSOLE_SCREEN_BUFFER_INFO) -> Self
[src]
Auto Trait Implementations
impl RefUnwindSafe for ScreenBufferInfo
impl Send for ScreenBufferInfo
impl Sync for ScreenBufferInfo
impl Unpin for ScreenBufferInfo
impl UnwindSafe for ScreenBufferInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,