[][src]Struct monotron_app::Host

pub struct Host;

Represents the Monotron we're running on. Can be passed to write! and friends.

Methods

impl Host[src]

pub fn getsize() -> (u16, u16)[src]

Get the (width, height) of the Monotron TTY

pub fn init()[src]

Call once at start-up to configure terminal

pub fn deinit()[src]

Disable ncurses

pub fn putchar(ch: u8)[src]

Send a single 8-bit character to the screen.

pub fn puts(str8bit: &[u8])[src]

Send a single 8-bit character to the screen.

pub fn kbhit() -> bool[src]

Return true if there is a keypress waiting (i.e. readc won't block).

pub fn readc() -> u8[src]

Read an 8-bit character from the console.

pub fn wfvbi()[src]

Wait For Vertical Blanking Interval

pub fn move_cursor(row: Row, col: Col)[src]

Move the cursor on the screen.

pub fn play<F>(
    _frequency: F,
    _channel: Channel,
    _waveform: Waveform,
    _volume: u8
) where
    F: Into<Frequency>, 
[src]

Start playing a tone. It will continue.

pub fn set_font(_font: Font) -> Result<(), &'static str>[src]

Move the cursor on the screen.

pub fn get_joystick() -> JoystickState[src]

Get the Joystick state

pub fn set_cursor_visible(_visible: bool)[src]

Show/hide the cursor

Trait Implementations

impl Write for Host[src]

fn write_char(&mut self, c: char) -> Result<(), Error>
1.1.0
[src]

Writes a [char] into this writer, returning whether the write succeeded. Read more

fn write_fmt(&mut self, args: Arguments) -> Result<(), Error>
1.0.0
[src]

Glue for usage of the [write!] macro with implementors of this trait. Read more

Auto Trait Implementations

impl Send for Host

impl Sync for Host

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]