minicrossterm/src/kernel/windows_kernel/mod.rs
2018-07-24 18:06:17 +02:00

43 lines
915 B
Rust

//! This module contains the `windows` specific logic.
pub mod ansi_support;
pub mod cursor;
pub mod kernel;
pub mod terminal;
pub mod writing;
pub mod csbi;
pub mod handle;
use self::winapi::um::wincon::{CONSOLE_SCREEN_BUFFER_INFO, COORD, SMALL_RECT};
use shared::traits::Empty;
use winapi;
impl Empty for COORD {
fn empty() -> COORD {
COORD { X: 0, Y: 0 }
}
}
impl Empty for SMALL_RECT {
fn empty() -> SMALL_RECT {
SMALL_RECT {
Top: 0,
Right: 0,
Bottom: 0,
Left: 0,
}
}
}
impl Empty for CONSOLE_SCREEN_BUFFER_INFO {
fn empty() -> CONSOLE_SCREEN_BUFFER_INFO {
CONSOLE_SCREEN_BUFFER_INFO {
dwSize: COORD::empty(),
dwCursorPosition: COORD::empty(),
wAttributes: 0,
srWindow: SMALL_RECT::empty(),
dwMaximumWindowSize: COORD::empty(),
}
}
}