1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

thirdparty: update all sokol and fontstash headers with their upstream versions (#16940)

This commit is contained in:
Delyan Angelov
2023-01-11 11:29:38 +02:00
committed by GitHub
parent d1306ffcf5
commit e854051c1f
26 changed files with 3937 additions and 1692 deletions

View File

@@ -50,20 +50,20 @@ pub:
event_userdata_cb fn (&Event, voidptr)
fail_userdata_cb fn (&char, voidptr)
width int // the preferred width of the window / canvas
height int // the preferred height of the window / canvas
sample_count int // MSAA sample count
swap_interval int // the preferred swap interval (ignored on some platforms)
high_dpi bool // whether the rendering canvas is full-resolution on HighDPI displays
fullscreen bool // whether the window should be created in fullscreen mode
alpha bool // whether the framebuffer should have an alpha channel (ignored on some platforms)
window_title &char // the window title as UTF-8 encoded string
enable_clipboard bool // enable clipboard access, default is false
clipboard_size int // max size of clipboard content in bytes
enable_dragndrop bool // enable file dropping (drag'n'drop), default is false
max_dropped_files int // max number of dropped files to process (default: 1)
max_dropped_file_path_length int // max length in bytes of a dropped UTF-8 file path (default: 2048)
icon IconDesc
width int // the preferred width of the window / canvas
height int // the preferred height of the window / canvas
sample_count int // MSAA sample count
swap_interval int // the preferred swap interval (ignored on some platforms)
high_dpi bool // whether the rendering canvas is full-resolution on HighDPI displays
fullscreen bool // whether the window should be created in fullscreen mode
alpha bool // whether the framebuffer should have an alpha channel (ignored on some platforms)
window_title &char // the window title as UTF-8 encoded string
enable_clipboard bool // enable clipboard access, default is false
clipboard_size int // max size of clipboard content in bytes
enable_dragndrop bool // enable file dropping (drag'n'drop), default is false
max_dropped_files int // max number of dropped files to process (default: 1)
max_dropped_file_path_length int // max length in bytes of a dropped UTF-8 file path (default: 2048)
icon IconDesc // the initial window icon to set
// backend-specific options
gl_force_gles2 bool // if true, setup GLES2/WebGL even if GLES3/WebGL2 is available
win32_console_utf8 bool // if true, set the output console codepage to UTF-8
@@ -77,6 +77,9 @@ pub:
ios_keyboard_resizes_canvas bool // if true, showing the iOS keyboard shrinks the canvas
// V patches
__v_native_render bool // V patch to allow for native rendering
pub mut:
allocator C.sapp_allocator // optional memory allocation overrides (default: malloc/free)
logger C.sapp_logger // optional log callback overrides (default: SAPP_LOG(message))
}
pub type Desc = C.sapp_desc
@@ -84,25 +87,25 @@ pub type Desc = C.sapp_desc
[typedef]
pub struct C.sapp_event {
pub:
frame_count u64
@type EventType
key_code KeyCode
char_code u32
key_repeat bool
modifiers u32
mouse_button MouseButton
mouse_x f32
mouse_y f32
mouse_dx f32
mouse_dy f32
scroll_x f32
scroll_y f32
num_touches int
touches [max_touchpoints]TouchPoint
window_width int
window_height int
framebuffer_width int
framebuffer_height int
frame_count u64 // current frame counter, always valid, useful for checking if two events were issued in the same frame
@type EventType // the event type, always valid
key_code KeyCode // the virtual key code, only valid in KEY_UP, KEY_DOWN
char_code u32 // the UTF-32 character code, only valid in CHAR events
key_repeat bool // true if this is a key-repeat event, valid in KEY_UP, KEY_DOWN and CHAR
modifiers u32 // current modifier keys, valid in all key-, char- and mouse-events
mouse_button MouseButton // mouse button that was pressed or released, valid in MOUSE_DOWN, MOUSE_UP
mouse_x f32 // current horizontal mouse position in pixels, always valid except during mouse lock
mouse_y f32 // current vertical mouse position in pixels, always valid except during mouse lock
mouse_dx f32 // relative horizontal mouse movement since last frame, always valid
mouse_dy f32 // relative vertical mouse movement since last frame, always valid
scroll_x f32 // horizontal mouse wheel scroll distance, valid in MOUSE_SCROLL events
scroll_y f32 // vertical mouse wheel scroll distance, valid in MOUSE_SCROLL events
num_touches int // number of valid items in the touches[] array
touches [max_touchpoints]TouchPoint // current touch points, valid in TOUCHES_BEGIN, TOUCHES_MOVED, TOUCHES_ENDED
window_width int // current window- and framebuffer width in pixels, always valid
window_height int // current window- and framebuffer height in pixels, always valid
framebuffer_width int // = window_width * dpi_scale
framebuffer_height int // = window_height * dpi_scale
}
pub type Event = C.sapp_event
@@ -114,11 +117,11 @@ pub fn (e &C.sapp_event) str() string {
[typedef]
pub struct C.sapp_touchpoint {
pub:
identifier u64
pos_x f32
pos_y f32
tool_type TouchToolType
changed bool
identifier u64
pos_x f32
pos_y f32
android_tooltype TouchToolType
changed bool
}
pub type TouchPoint = C.sapp_touchpoint