Struct winapi_util::console::ScreenBufferInfo
source · pub struct ScreenBufferInfo(/* private fields */);
Expand description
Represents console screen buffer information such as size, cursor position and styling attributes.
This wraps a CONSOLE_SCREEN_BUFFER_INFO
.
Implementations§
source§impl ScreenBufferInfo
impl ScreenBufferInfo
sourcepub fn size(&self) -> (i16, i16)
pub fn size(&self) -> (i16, i16)
Returns the size of the console screen buffer, in character columns and rows.
This corresponds to dwSize
.
sourcepub fn cursor_position(&self) -> (i16, i16)
pub fn cursor_position(&self) -> (i16, i16)
Returns the position of the cursor in terms of column and row coordinates of the console screen buffer.
This corresponds to dwCursorPosition
.
sourcepub fn attributes(&self) -> u16
pub fn attributes(&self) -> u16
Returns the character attributes associated with this console.
This corresponds to wAttributes
.
See char info
for more details.
sourcepub fn max_window_size(&self) -> (i16, i16)
pub fn max_window_size(&self) -> (i16, i16)
Returns the maximum size of the console window, in character columns and rows, given the current screen buffer size and font and the screen size.
sourcepub fn window_rect(&self) -> SmallRect
pub fn window_rect(&self) -> SmallRect
Returns the console screen buffer coordinates of the upper-left and lower-right corners of the display window.
This corresponds to srWindow
.
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