pub struct CpuWindow {
pub state: CpuWaylandState,
pub event_queue: EventQueue<CpuWaylandState>,
pub buffer: TerminalBuffer,
pub alpha: f32,
}Fields§
§state: CpuWaylandState§event_queue: EventQueue<CpuWaylandState>§buffer: TerminalBuffer§alpha: f32Implementations§
Source§impl CpuWindow
impl CpuWindow
pub fn redraw<F>(&mut self, render_callback: F)where
F: FnMut(&mut TerminalBuffer),
pub fn update(&mut self) -> Result<(), Error>
pub fn get_event_queue(&self) -> WindowEventQueue
Trait Implementations§
Source§impl Backend for CpuWindow
impl Backend for CpuWindow
Source§fn draw<'a, I>(&mut self, content: I) -> Result<(), Self::Error>
fn draw<'a, I>(&mut self, content: I) -> Result<(), Self::Error>
Draw the given content to the terminal screen. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush any buffered content to the terminal screen.
Source§fn get_cursor(&mut self) -> Result<(u16, u16), Self::Error>
fn get_cursor(&mut self) -> Result<(u16, u16), Self::Error>
👎Deprecated: use
get_cursor_position() instead which returns Result<Position>Get the current cursor position on the terminal screen. Read more
Source§fn set_cursor(&mut self, _x: u16, _y: u16) -> Result<(), Self::Error>
fn set_cursor(&mut self, _x: u16, _y: u16) -> Result<(), Self::Error>
👎Deprecated: use
set_cursor_position((x, y)) instead which takes impl Into<Position>Set the cursor position on the terminal screen to the given x and y coordinates. Read more
Source§fn hide_cursor(&mut self) -> Result<(), Self::Error>
fn hide_cursor(&mut self) -> Result<(), Self::Error>
Hide the cursor on the terminal screen. Read more
Source§fn show_cursor(&mut self) -> Result<(), Self::Error>
fn show_cursor(&mut self) -> Result<(), Self::Error>
Show the cursor on the terminal screen. Read more
Source§fn window_size(&mut self) -> Result<WindowSize, Self::Error>
fn window_size(&mut self) -> Result<WindowSize, Self::Error>
Get the size of the terminal screen in columns/rows and pixels as a
WindowSize. Read moreSource§fn append_lines(&mut self, _n: u16) -> Result<(), Self::Error>
fn append_lines(&mut self, _n: u16) -> Result<(), Self::Error>
Insert
n line breaks to the terminal screen. Read moreAuto Trait Implementations§
impl Freeze for CpuWindow
impl !RefUnwindSafe for CpuWindow
impl !Send for CpuWindow
impl !Sync for CpuWindow
impl Unpin for CpuWindow
impl UnsafeUnpin for CpuWindow
impl !UnwindSafe for CpuWindow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more