diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-10 22:44:13 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-11 20:23:41 -0800 |
commit | ed0b1cfff04903fe26f586340e036c38bbf30b33 (patch) | |
tree | eb4eb3545bee57ed401cb7727c9dc3f106fabe3b /src/lib.rs | |
parent | bbd8ddbfc055e85f8810285e71fd227cdd418221 (diff) | |
download | alacritty-ed0b1cfff04903fe26f586340e036c38bbf30b33.tar.gz alacritty-ed0b1cfff04903fe26f586340e036c38bbf30b33.zip |
Display manages window, renderer, rasterizer
This is part of an ongoing decoupling effort across the codebase and
tidying effort in main.rs. Everything to do with showing the window with
a grid of characters is now managed by the `Display` type. It owns the
window, the font rasterizer, and the renderer. The only info needed from
it are dimensions of characters and the window itself for sizing the
terminal properly. Additionally, the I/O loop has access to wake it up
when new data arrives.
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 23 |
1 files changed, 2 insertions, 21 deletions
@@ -49,7 +49,9 @@ extern crate bitflags; pub mod macros; pub mod ansi; +pub mod cli; pub mod config; +pub mod display; pub mod event; pub mod event_loop; pub mod grid; @@ -63,9 +65,6 @@ pub mod tty; pub mod util; pub mod window; -use std::sync::Arc; -use std::sync::atomic::{AtomicBool, Ordering}; - pub use grid::Grid; pub use term::Term; @@ -80,21 +79,3 @@ pub mod gl { #![allow(non_upper_case_globals)] include!(concat!(env!("OUT_DIR"), "/gl_bindings.rs")); } - -#[derive(Clone)] -pub struct Flag(pub Arc<AtomicBool>); -impl Flag { - pub fn new(initial_value: bool) -> Flag { - Flag(Arc::new(AtomicBool::new(initial_value))) - } - - #[inline] - pub fn get(&self) -> bool { - self.0.load(Ordering::Acquire) - } - - #[inline] - pub fn set(&self, value: bool) { - self.0.store(value, Ordering::Release) - } -} |