[][src]Module bear_lib_terminal::terminal::state

Wherein are contained functions for checking the terminal's properties: its size, whether cetrain keys are pressed, mouse position, etc.

Examples

This example is not tested
use bear_lib_terminal::terminal;
use bear_lib_terminal::geometry::Size;

terminal::open("terminal::state example", 60, 25);
assert!(terminal::state::size() == Size::new(60, 25));
terminal::close();

Modules

mouse

Checking the state of mouse-related properties, namely the mouse cursor's position, n-clicks and scrolling.

Functions

background

Get the currently selected background colour.

cell_size

Get cell size in pixels.

char

Most-recent-event-produced unicode character.

event

Get last dequeued event.

foreground

Get the currently selected foreground colour.

fullscreen

Check, whether the terminal is currently full-screen.

key_pressed

Check, whether a KeyCode-specified key is currently pressed.

layer

Get the currently selected layer.

size

Get the terminal size in cells.