pub struct Terminal {
pub screen: Screen,
pub encoding: Encoding,
pub music_on_csi_m: bool,
pub music_enabled: bool,
pub sixel_display_mode: bool,
pub syncterm: SyncTerm,
pub mouse: MouseModes,
pub bracketed_paste: bool,
/* private fields */
}Fields§
§screen: Screen§encoding: Encoding§music_on_csi_m: boolTreat ESC [ M with no parameter as the start of ANSI music, as
many BBS doors expect, instead of “delete one line”. ESC [ N and
ESC [ | always start music.
music_enabled: boolWhether music is played at all (it isn’t waited for if not).
sixel_display_mode: boolCSI ? 80 h (DECSDM): sixel pictures go at the top left of the
screen and don’t scroll it.
syncterm: SyncTermSyncTERM’s file cache, pictures and pixel buffers.
mouse: MouseModesThe mouse reporting the BBS has asked for.
bracketed_paste: boolCSI ? 2004 h: pasted text comes between ESC [ 200 ~ and
ESC [ 201 ~, so the BBS can tell it from typing.
Implementations§
Source§impl Terminal
impl Terminal
pub fn new(cols: usize, rows: usize, scrollback: usize) -> Self
Sourcepub fn start_emulation(&mut self)
pub fn start_emulation(&mut self)
Set up the screen for the encoding: a C64 or Atari system gets that machine’s colors and font.
pub fn rip_mut(&mut self) -> Option<&mut Rip>
Sourcepub fn toggle_reveal(&mut self) -> Option<bool>
pub fn toggle_reveal(&mut self) -> Option<bool>
Show a teletext page’s concealed text, or hide it again (Viewdata and Mode 7); the new state, or None for other systems.
pub fn igs_mut(&mut self) -> Option<&mut Igs>
Sourcepub fn paste(&self, text: &str) -> Vec<u8> ⓘ
pub fn paste(&self, text: &str) -> Vec<u8> ⓘ
Pasted text, as the BBS should get it: in brackets if it asked for them (with any escape taken out, so the text can’t end them early).
Sourcepub fn take_replies(&mut self) -> Vec<u8> ⓘ
pub fn take_replies(&mut self) -> Vec<u8> ⓘ
Bytes the terminal wants sent to the remote (e.g. CPR replies).
pub fn take_events(&mut self) -> Vec<TermEvent>
pub fn feed(&mut self, data: &[u8])
Sourcepub fn poll(&mut self, now: Instant)
pub fn poll(&mut self, now: Instant)
Time passing: sound reports the BBS asked for, and reading again after a wait for a sound.
Sourcepub fn next_poll(&self) -> Option<Instant>
pub fn next_poll(&self) -> Option<Instant>
When Terminal::poll has something to do.