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