[−][src]Struct monotron_app::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]
_frequency: F,
_channel: Channel,
_waveform: Waveform,
_volume: u8
) where
F: Into<Frequency>,
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_str(&mut self, s: &str) -> Result
[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
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,