mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
term.ui: make C. unions and structs public (solve conflicts with term on windows)
This commit is contained in:
parent
584c035120
commit
90197fd58a
@ -1,6 +1,6 @@
|
||||
module ui
|
||||
|
||||
union C.Event {
|
||||
pub union C.Event {
|
||||
KeyEvent C.KEY_EVENT_RECORD
|
||||
MouseEvent C.MOUSE_EVENT_RECORD
|
||||
WindowBufferSizeEvent C.WINDOW_BUFFER_SIZE_RECORD
|
||||
@ -9,19 +9,19 @@ union C.Event {
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.INPUT_RECORD {
|
||||
pub struct C.INPUT_RECORD {
|
||||
EventType u16
|
||||
Event C.Event
|
||||
}
|
||||
|
||||
union C.uChar {
|
||||
pub union C.uChar {
|
||||
mut:
|
||||
UnicodeChar rune
|
||||
AsciiChar u8
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.KEY_EVENT_RECORD {
|
||||
pub struct C.KEY_EVENT_RECORD {
|
||||
bKeyDown int
|
||||
wRepeatCount u16
|
||||
wVirtualKeyCode u16
|
||||
@ -31,7 +31,7 @@ struct C.KEY_EVENT_RECORD {
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.MOUSE_EVENT_RECORD {
|
||||
pub struct C.MOUSE_EVENT_RECORD {
|
||||
dwMousePosition C.COORD
|
||||
dwButtonState u32
|
||||
dwControlKeyState u32
|
||||
@ -39,29 +39,29 @@ struct C.MOUSE_EVENT_RECORD {
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.WINDOW_BUFFER_SIZE_RECORD {
|
||||
pub struct C.WINDOW_BUFFER_SIZE_RECORD {
|
||||
dwSize C.COORD
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.MENU_EVENT_RECORD {
|
||||
pub struct C.MENU_EVENT_RECORD {
|
||||
dwCommandId u32
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.FOCUS_EVENT_RECORD {
|
||||
pub struct C.FOCUS_EVENT_RECORD {
|
||||
bSetFocus int
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.COORD {
|
||||
pub struct C.COORD {
|
||||
mut:
|
||||
X i16
|
||||
Y i16
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.SMALL_RECT {
|
||||
pub struct C.SMALL_RECT {
|
||||
mut:
|
||||
Left u16
|
||||
Top u16
|
||||
@ -70,7 +70,7 @@ mut:
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.CONSOLE_SCREEN_BUFFER_INFO {
|
||||
pub struct C.CONSOLE_SCREEN_BUFFER_INFO {
|
||||
mut:
|
||||
dwSize C.COORD
|
||||
dwCursorPosition C.COORD
|
||||
|
@ -10,7 +10,7 @@ import time
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
|
||||
struct C.winsize {
|
||||
pub struct C.winsize {
|
||||
ws_row u16
|
||||
ws_col u16
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user