Correct definition of CONSOLE_SCREEN_BUFFER_INFO
This commit is contained in:
parent
853f30052d
commit
05c1e92787
|
@ -20,19 +20,36 @@ pub struct WinConsole<T> {
|
||||||
background: color::Color,
|
background: color::Color,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SHORT = i16;
|
||||||
type WORD = u16;
|
type WORD = u16;
|
||||||
type DWORD = u32;
|
type DWORD = u32;
|
||||||
type BOOL = i32;
|
type BOOL = i32;
|
||||||
type HANDLE = *mut u8;
|
type HANDLE = *mut u8;
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
|
#[repr(C)]
|
||||||
|
struct SMALL_RECT {
|
||||||
|
Left: SHORT,
|
||||||
|
Top: SHORT,
|
||||||
|
Right: SHORT,
|
||||||
|
Bottom: SHORT,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
|
#[repr(C)]
|
||||||
|
struct COORD {
|
||||||
|
X: SHORT,
|
||||||
|
Y: SHORT,
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
struct CONSOLE_SCREEN_BUFFER_INFO {
|
struct CONSOLE_SCREEN_BUFFER_INFO {
|
||||||
dwSize: [libc::c_short; 2],
|
dwSize: COORD,
|
||||||
dwCursorPosition: [libc::c_short; 2],
|
dwCursorPosition: COORD,
|
||||||
wAttributes: WORD,
|
wAttributes: WORD,
|
||||||
srWindow: [libc::c_short; 4],
|
srWindow: SMALL_RECT,
|
||||||
dwMaximumWindowSize: [libc::c_short; 2],
|
dwMaximumWindowSize: COORD,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
|
|
Loading…
Reference in New Issue