term.ui: fix conflicting C struct declarations when compiling programs, importing term.ui before term, on windows
parent
509367b293
commit
4f551d76c0
|
@ -0,0 +1,8 @@
|
|||
import term.ui
|
||||
import term
|
||||
|
||||
fn test_term_and_term_ui_can_compile_together() {
|
||||
a := &ui.Context(0)
|
||||
println('${term.bold('hello')} world ${int(a)}')
|
||||
assert true
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
import term
|
||||
import term.ui
|
||||
|
||||
fn test_term_and_term_ui_can_compile_together() {
|
||||
a := &ui.Context(0)
|
||||
println('${term.bold('hello')} world ${int(a)}')
|
||||
assert true
|
||||
}
|
|
@ -15,6 +15,7 @@ struct C.INPUT_RECORD {
|
|||
}
|
||||
|
||||
union C.uChar {
|
||||
mut:
|
||||
UnicodeChar rune
|
||||
AsciiChar byte
|
||||
}
|
||||
|
@ -54,12 +55,14 @@ struct C.FOCUS_EVENT_RECORD {
|
|||
|
||||
[typedef]
|
||||
struct C.COORD {
|
||||
mut:
|
||||
X i16
|
||||
Y i16
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.SMALL_RECT {
|
||||
mut:
|
||||
Left u16
|
||||
Top u16
|
||||
Right u16
|
||||
|
@ -68,6 +71,7 @@ struct C.SMALL_RECT {
|
|||
|
||||
[typedef]
|
||||
struct C.CONSOLE_SCREEN_BUFFER_INFO {
|
||||
mut:
|
||||
dwSize C.COORD
|
||||
dwCursorPosition C.COORD
|
||||
wAttributes u16
|
||||
|
|
Loading…
Reference in New Issue