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
use std::time::Duration;
mod vm;
mod execution_config;
mod native_port_handler;
pub use self::vm::Vm;
pub use self::execution_config::ExecutionConfig;
pub use self::native_port_handler::{RawNativePortHandler, NativePortHandler};
pub mod display;
pub static ICON: &[u8] = include_bytes!("../../../assets/pir-8-emu.ico");
pub static HELP_TEXT: &str = include_str!("../../../assets/pir-8-emu.hlp");
lazy_static! {
pub static ref HELP_TEXT_PAGES: Vec<&'static str> = HELP_TEXT.split('\x0C').map(str::trim).collect();
}
pub static MAX_UI_DELAY: Duration = Duration::from_millis(25);
#[repr(transparent)]
#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct QuickscopeWrapper<F: FnOnce()>(pub Option<F>);
impl<F: FnOnce()> Drop for QuickscopeWrapper<F> {
fn drop(&mut self) {
if let Some(f) = self.0.take() {
f();
}
}
}