vt100_ctt/
callbacks.rs

1/// This trait is used with `Parser::process_cb` to handle extra escape
2/// sequences that don't have an impact on the terminal screen directly.
3pub trait Callbacks {
4    /// This callback is called when the terminal requests an audible bell
5    /// (typically with `^G`).
6    fn audible_bell(&mut self, _: &mut crate::Screen) {}
7    /// This callback is called when the terminal requests an visual bell
8    /// (typically with `\eg`).
9    fn visual_bell(&mut self, _: &mut crate::Screen) {}
10    /// This callback is called when the terminal requests a resize
11    /// (typically with `\e[8;<rows>;<cols>t`).
12    fn resize(&mut self, _: &mut crate::Screen, _request: (u16, u16)) {}
13    /// This callback is called when the terminal receives invalid input
14    /// (such as an invalid UTF-8 character or an unused control character).
15    fn error(&mut self, _: &mut crate::Screen) {}
16}