1#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
22pub struct Width(pub u16);
23#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
24pub struct Height(pub u16);
25
26#[cfg(unix)]
27mod unix;
28#[cfg(unix)]
29#[allow(deprecated)]
30pub use crate::unix::{terminal_size, terminal_size_of, terminal_size_using_fd};
31
32#[cfg(windows)]
33mod windows;
34#[cfg(windows)]
35#[allow(deprecated)]
36pub use crate::windows::{terminal_size, terminal_size_of, terminal_size_using_handle};
37
38#[cfg(not(any(unix, windows)))]
39pub fn terminal_size() -> Option<(Width, Height)> {
40 None
41}