INNER CODE UNIT · Rust

window

lemunozm/ruscii · src/app.rs:97

    pub fn window(&self) -> &Window {
        &self.window
    }

    /// Begins running the terminal application.
    ///
    /// This function begins a loop where key events are first registered, the window is cleared,
    /// `frame_action` is called adding characters to the `Canvas`, and the window is redrawn.
    ///
    /// If the time it takes to execute all of these is less than the [`App`] expects according to
    /// the framerate set in the [`Config`], the current thread is put to sleep until the next
    /// frame, thereby limiting FPS.
    ///
    /// Catches all unwinding panics that occur within `frame_action`, allowing terminal recovery.
    pub fn run<F>(&mut self, mut frame_action: F)
    where
        F: FnMut(&mut State, &mut Window),
    {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…