kkx/kkdisp/src/lib.rs

28 lines
531 B
Rust

use crate::component::Cursed;
use component::{Plan, Widget};
use std::{
io::{Stdout, Write},
time::Duration,
};
use termion::raw::{IntoRawMode, RawTerminal};
use theme::{Color, ColorSet};
use token::Token;
extern crate termion;
mod component;
mod theme;
mod token;
pub struct Display {
// needs to hold the termion display
screen: RawTerminal<Stdout>,
}
impl Display {
pub fn new() -> Result<Self, anyhow::Error> {
Ok(Self {
screen: std::io::stdout().into_raw_mode()?,
})
}
}