Struct neko::prelude::Winszed
[−]
#[repr(C)]pub struct Winszed { pub ws_row: u16, pub ws_col: u16, pub ws_xpixel: u16, pub ws_ypixel: u16, }
The enum Winszed
is the size of the tty window.
Fields
ws_row: u16
Rows, in characters.
ws_col: u16
Columns, in characters.
ws_xpixel: u16
Horizontal size, pixels.
ws_ypixel: u16
Vertical size, pixels.
Methods
impl Winszed
fn new(fd: i32) -> Result<Winszed, WinszedError>
The constructor method new
returns the window size.
fn get_row(&self) -> usize
The accessor function get_row
returns the number of rows.
fn get_col(&self) -> usize
The accessor function get_col
returns the number of columns.
fn get_irow(&self) -> isize
The accessor function get_irow
returns the number of rows.
fn get_icol(&self) -> isize
The accessor function get_icol
returns the number of columns.
fn row_by_col(&self) -> usize
The accessor function get_row
returns the multiplication
of row by colum.
fn get_ref_row(&mut self) -> &mut u16
The accessor function get_ref_row
returns a ref on the number of rows.
fn get_xpixel(&self) -> u32
The accessor function get_xpixel
returns the horizontal size.
fn get_ypixel(&self) -> u32
The accessor function get_ypixel
returns the vertical size.
fn from_winsized(fd: i32, winsize: &Winszed) -> Result<(), WinszedError>
The method from_winsized
changes the window size.
Trait Implementations
impl Copy for Winszed
impl Debug for Winszed
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl PartialEq<Winszed> for Winszed
fn eq(&self, other: &Winszed) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Default for Winszed
impl Clone for Winszed
fn clone(&self) -> Winszed
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more