1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//! Core terminal abstraction and application lifecycle.
//!
//! This module provides the [`Application`] trait, which allows building
//! stateful apps easily. The [`Term`](crate::term::Term) is also provided by
//! this module and provides rendering options together with running the
//! provided app implementation and handling the basic lifecycle.
//!
//! # Backend
//!
//! This module also contains backend module, which provides
//! [`Event`](crate::term::backend::Event) enum,
//! [`Backend`](crate::term::backend::Backend) trait and backend
//! implementations - currently those are
//! [`CrosstermBackend`](crate::term::backend::CrosstermBackend) and
//! [`TermalBackend`](crate::term::backend::TermalBackend) if you have the
//! corresponding features enabled (`backend-crossterm` or `backend-termal`).
//!
//! # Example
//!
//! Implementing [`Application`] and running it in Framework mode using
//! [`Term::run`](crate::term::Term::run).
//!
//! ```rust,no_run
//! use termint::prelude::*;
//!
//! struct MyApp;
//!
//! impl Application for MyApp {
//! type Message = ();
//!
//! fn view(&self, _frame: &Frame) -> Element<Self::Message> {
//! let mut main = Block::vertical().title("Termint App");
//! main.push("Hello from the Application trait!".fg(Color::Cyan), 0..);
//! main.into()
//! }
//!
//! fn event(&mut self, event: Event) -> Action {
//! match event {
//! Event::Key(k) if k.code == KeyCode::Char('q') => Action::QUIT,
//! _ => Action::NONE,
//! }
//! }
//! }
//!
//! fn main() -> Result<(), Error> {
//! Term::default().setup()?.run(&mut MyApp)
//! }
//! ```
//!
//! [`Application`]: crate::term::Application
use ;
pub use Action;
pub use Application;
pub use Frame;
pub use Term;
use ;
/// Enables mouse events backend capture.
/// Disable mouse events backend capture.
/// Enables bracketed paste mode, which allows capturing `Event::Paste`.
/// Disables bracketed paste mode.