blob: 4b72ef0ff25a34e28dac412ba1428dc4b9502cdd (
plain) (
blame)
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
|
pub mod grid_state;
pub mod interceptor;
pub mod parser;
pub mod replies;
pub mod store;
pub use grid_state::*;
pub use interceptor::*;
pub use parser::*;
pub use replies::*;
pub use store::*;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum KittyHostSupport {
Supported,
Unsupported,
ProtocolDisabled,
}
impl KittyHostSupport {
pub fn from_host_capability(supported: bool) -> Self {
if supported {
KittyHostSupport::Supported
} else {
KittyHostSupport::Unsupported
}
}
pub fn protocol_is_enabled(&self) -> bool {
*self != KittyHostSupport::ProtocolDisabled
}
pub fn host_supports_graphics(&self) -> bool {
*self == KittyHostSupport::Supported
}
}
|