use crate::input::KeyCode;

pub(crate) const INVALID_HANDLE_VALUE: usize = usize::MAX;
pub(crate) const STD_INPUT_HANDLE: i32 = -10;
pub(crate) const STD_OUTPUT_HANDLE: i32 = -11;
pub(crate) const FALSE: u32 = 0;
pub(crate) const TRUE: u32 = 1;
pub(crate) const COMMON_LVB_UNDERSCORE: u16 = 0x8000;
pub(crate) const KEY_EVENT: u16 = 0x0001;
pub(crate) const MOUSE_EVENT: u16 = 0x0002;
pub(crate) const WINDOW_BUFFER_SIZE_EVENT: u16 = 0x0004;
pub(crate) const FROM_LEFT_1ST_BUTTON_PRESSED: u32 = 0x0001;
pub(crate) const RIGHTMOST_BUTTON_PRESSED: u32 = 0x0002;
pub(crate) const RIGHT_ALT_PRESSED: u32 = 0x0001;
pub(crate) const DOUBLE_CLICK: u32 = 0x0002;
pub(crate) const MOUSE_MOVED: u32 = 0x0001;
pub(crate) const MOUSE_WHEELED: u32 = 0x0004;
pub(crate) const MOUSE_HWHEELED: u32 = 0x0008;
pub(crate) const LEFT_ALT_PRESSED: u32 = 0x0002;
pub(crate) const RIGHT_CTRL_PRESSED: u32 = 0x0004;
pub(crate) const LEFT_CTRL_PRESSED: u32 = 0x0008;
pub(crate) const SHIFT_PRESSED: u32 = 0x0010;
pub(crate) const ENABLE_WINDOW_INPUT: u32 = 0x0008;
pub(crate) const ENABLE_MOUSE_INPUT: u32 = 0x0010;
pub(crate) const ENABLE_EXTENDED_FLAGS: u32 = 0x0080;
pub(crate) const ENABLE_VIRTUAL_TERMINAL_PROCESSING: u32 = 0x0004;
//pub(crate) const ENABLE_PROCESSED_OUTPUT : u32 = 0x0001;
pub(crate) const CF_UNICODETEXT: u32 = 13;
pub(crate) const CF_TEXT: u32 = 1;
pub(crate) const GMEM_MOVEABLE: u32 = 0x0002;

pub(crate) const TRANSLATION_MATRIX: [KeyCode; 256] = [
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::Backspace,
    KeyCode::Tab,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::Enter,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::Escape,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::Space,
    KeyCode::PageUp,
    KeyCode::PageDown,
    KeyCode::End,
    KeyCode::Home,
    KeyCode::Left,
    KeyCode::Up,
    KeyCode::Right,
    KeyCode::Down,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::Insert,
    KeyCode::Delete,
    KeyCode::None,
    KeyCode::N0,
    KeyCode::N1,
    KeyCode::N2,
    KeyCode::N3,
    KeyCode::N4,
    KeyCode::N5,
    KeyCode::N6,
    KeyCode::N7,
    KeyCode::N8,
    KeyCode::N9,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::A,
    KeyCode::B,
    KeyCode::C,
    KeyCode::D,
    KeyCode::E,
    KeyCode::F,
    KeyCode::G,
    KeyCode::H,
    KeyCode::I,
    KeyCode::J,
    KeyCode::K,
    KeyCode::L,
    KeyCode::M,
    KeyCode::N,
    KeyCode::O,
    KeyCode::P,
    KeyCode::Q,
    KeyCode::R,
    KeyCode::S,
    KeyCode::T,
    KeyCode::U,
    KeyCode::V,
    KeyCode::W,
    KeyCode::X,
    KeyCode::Y,
    KeyCode::Z,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::F1,
    KeyCode::F2,
    KeyCode::F3,
    KeyCode::F4,
    KeyCode::F5,
    KeyCode::F6,
    KeyCode::F7,
    KeyCode::F8,
    KeyCode::F9,
    KeyCode::F10,
    KeyCode::F11,
    KeyCode::F12,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
    KeyCode::None,
];

pub(crate) static APPCUI_COLOR_SCEHMA: [u32; 16] = [
    0x_00_00_00, // Black
    0x_80_00_00, // Dark Blue
    0x_00_80_00, // Dark Green
    0x_80_80_00, // Teal
    0x_00_00_80, // Dark Red
    0x_80_00_80, // Magenta
    0x_00_80_80, // Olive
    0x_C0_C0_C0, // Silver
    0x_80_80_80, // Gray
    0x_FF_00_00, // Blue
    0x_00_FF_00, // Green
    0x_FF_FF_00, // Aqua
    0x_00_00_FF, // Red
    0x_FF_00_FF, // Pink
    0x_00_FF_FF, // Yellow
    0x_FF_FF_FF, // White   
];
