File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,36 @@ pub struct WinConsole<T> {
2020 background : color:: Color ,
2121}
2222
23+ type SHORT = i16 ;
2324type WORD = u16 ;
2425type DWORD = u32 ;
2526type BOOL = i32 ;
2627type HANDLE = * mut u8 ;
2728
29+ #[ allow( non_snake_case) ]
30+ #[ repr( C ) ]
31+ struct SMALL_RECT {
32+ Left : SHORT ,
33+ Top : SHORT ,
34+ Right : SHORT ,
35+ Bottom : SHORT ,
36+ }
37+
38+ #[ allow( non_snake_case) ]
39+ #[ repr( C ) ]
40+ struct COORD {
41+ X : SHORT ,
42+ Y : SHORT ,
43+ }
44+
2845#[ allow( non_snake_case) ]
2946#[ repr( C ) ]
3047struct CONSOLE_SCREEN_BUFFER_INFO {
31- dwSize : [ libc :: c_short ; 2 ] ,
32- dwCursorPosition : [ libc :: c_short ; 2 ] ,
48+ dwSize : COORD ,
49+ dwCursorPosition : COORD ,
3350 wAttributes : WORD ,
34- srWindow : [ libc :: c_short ; 4 ] ,
35- dwMaximumWindowSize : [ libc :: c_short ; 2 ] ,
51+ srWindow : SMALL_RECT ,
52+ dwMaximumWindowSize : COORD ,
3653}
3754
3855#[ allow( non_snake_case) ]
You can’t perform that action at this time.
0 commit comments