summaryrefslogtreecommitdiff
path: root/src/tui.rs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2024-05-22 22:54:50 +0200
committerJulian T <julian@jtle.dk>2024-05-22 22:54:50 +0200
commitdd11cf4ab199e5d53d03dc95b24007a12727ad70 (patch)
tree710f94ac775ac8e3d279f40638034b847516f0e3 /src/tui.rs
parent829cbaf2d0fe95abc9c65b1e34e209fc32952805 (diff)
Start goprojekt istedet
Diffstat (limited to 'src/tui.rs')
-rw-r--r--src/tui.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/tui.rs b/src/tui.rs
deleted file mode 100644
index 7bae1ab..0000000
--- a/src/tui.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-use crossterm::{execute, terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}};
-
-use ratatui::{
- prelude::CrosstermBackend,
- Terminal,
-};
-
-use std::io::{self, stdout, Stdout};
-
-
-pub type Tui = Terminal<CrosstermBackend<Stdout>>;
-
-pub fn init() -> io::Result<Tui> {
- execute!(stdout(), EnterAlternateScreen)?;
- enable_raw_mode()?;
- Terminal::new(CrosstermBackend::new(stdout()))
-}
-
-pub fn restore() -> io::Result<()> {
- execute!(stdout(), LeaveAlternateScreen)?;
- disable_raw_mode()?;
-
- Ok(())
-}