mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
term.ui: fix conflicting C struct declarations when compiling programs, importing term.ui before term, on windows
This commit is contained in:
parent
509367b293
commit
4f551d76c0
8
vlib/term/ui/1_term_and_ui_compilation_test.v
Normal file
8
vlib/term/ui/1_term_and_ui_compilation_test.v
Normal file
@ -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
|
||||||
|
}
|
8
vlib/term/ui/2_term_and_ui_compilation_test.v
Normal file
8
vlib/term/ui/2_term_and_ui_compilation_test.v
Normal file
@ -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 {
|
union C.uChar {
|
||||||
|
mut:
|
||||||
UnicodeChar rune
|
UnicodeChar rune
|
||||||
AsciiChar byte
|
AsciiChar byte
|
||||||
}
|
}
|
||||||
@ -54,12 +55,14 @@ struct C.FOCUS_EVENT_RECORD {
|
|||||||
|
|
||||||
[typedef]
|
[typedef]
|
||||||
struct C.COORD {
|
struct C.COORD {
|
||||||
|
mut:
|
||||||
X i16
|
X i16
|
||||||
Y i16
|
Y i16
|
||||||
}
|
}
|
||||||
|
|
||||||
[typedef]
|
[typedef]
|
||||||
struct C.SMALL_RECT {
|
struct C.SMALL_RECT {
|
||||||
|
mut:
|
||||||
Left u16
|
Left u16
|
||||||
Top u16
|
Top u16
|
||||||
Right u16
|
Right u16
|
||||||
@ -68,6 +71,7 @@ struct C.SMALL_RECT {
|
|||||||
|
|
||||||
[typedef]
|
[typedef]
|
||||||
struct C.CONSOLE_SCREEN_BUFFER_INFO {
|
struct C.CONSOLE_SCREEN_BUFFER_INFO {
|
||||||
|
mut:
|
||||||
dwSize C.COORD
|
dwSize C.COORD
|
||||||
dwCursorPosition C.COORD
|
dwCursorPosition C.COORD
|
||||||
wAttributes u16
|
wAttributes u16
|
||||||
|
Loading…
Reference in New Issue
Block a user