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

sokol: type alias all sapp structs (#12962)

This commit is contained in:
Larpon
2021-12-26 12:02:51 +01:00
committed by GitHub
parent 04be2465dc
commit 2210f89ea3
10 changed files with 33 additions and 42 deletions

View File

@ -16,7 +16,7 @@ fn main() {
pass_action: gfx.create_clear_pass(0.1, 0.1, 0.1, 1.0)
}
title := 'Sokol Drawing Template'
desc := C.sapp_desc{
desc := sapp.Desc{
user_data: state
init_userdata_cb: init
frame_userdata_cb: frame

View File

@ -31,7 +31,7 @@ fn main() {
fons: voidptr(0) // &fontstash.Context(0)
}
title := 'V Metal/GL Text Rendering'
desc := C.sapp_desc{
desc := sapp.Desc{
user_data: state
init_userdata_cb: init
frame_userdata_cb: frame

View File

@ -79,7 +79,7 @@ fn main() {
fons: voidptr(0) // &fontstash.Context(0)
}
title := 'V Metal/GL Text Rendering'
desc := C.sapp_desc{
desc := sapp.Desc{
user_data: state
init_userdata_cb: init
frame_userdata_cb: frame

View File

@ -52,7 +52,7 @@ fn (mut a App) cleanup() {
fn (mut a App) run() {
title := 'V Particle Example'
desc := C.sapp_desc{
desc := sapp.Desc{
width: a.width
height: a.height
user_data: a
@ -117,7 +117,7 @@ fn frame(user_data voidptr) {
app.last = t
}
fn event(ev &C.sapp_event, mut app App) {
fn event(ev &sapp.Event, mut app App) {
if ev.@type == .mouse_move {
app.ps.explode(ev.mouse_x, ev.mouse_y)
}