File tree 1 file changed +21
-4
lines changed
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> {
20
20
background : color:: Color ,
21
21
}
22
22
23
+ type SHORT = i16 ;
23
24
type WORD = u16 ;
24
25
type DWORD = u32 ;
25
26
type BOOL = i32 ;
26
27
type HANDLE = * mut u8 ;
27
28
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
+
28
45
#[ allow( non_snake_case) ]
29
46
#[ repr( C ) ]
30
47
struct CONSOLE_SCREEN_BUFFER_INFO {
31
- dwSize : [ libc :: c_short ; 2 ] ,
32
- dwCursorPosition : [ libc :: c_short ; 2 ] ,
48
+ dwSize : COORD ,
49
+ dwCursorPosition : COORD ,
33
50
wAttributes : WORD ,
34
- srWindow : [ libc :: c_short ; 4 ] ,
35
- dwMaximumWindowSize : [ libc :: c_short ; 2 ] ,
51
+ srWindow : SMALL_RECT ,
52
+ dwMaximumWindowSize : COORD ,
36
53
}
37
54
38
55
#[ allow( non_snake_case) ]
You can’t perform that action at this time.
0 commit comments