mirror of
https://github.com/vlang/v.git
synced 2025-09-17 00:12:26 +03:00
sokol: fixes
This commit is contained in:
parent
96da5b33c0
commit
3c0b73c2d6
8 changed files with 114 additions and 48 deletions
|
@ -33,6 +33,13 @@ pub enum MouseButton {
|
|||
middle = 2
|
||||
}
|
||||
|
||||
pub enum Modifier {
|
||||
shift = 1 //(1<<0)
|
||||
ctrl = 2 //(1<<1)
|
||||
alt = 4 //(1<<2)
|
||||
super = 8 //(1<<3)
|
||||
}
|
||||
|
||||
pub enum KeyCode {
|
||||
invalid = 0
|
||||
space = 32
|
||||
|
|
|
@ -186,3 +186,8 @@ pub fn win32_get_hwnd() voidptr {
|
|||
return C.sapp_win32_get_hwnd()
|
||||
}
|
||||
|
||||
/* Android: get native activity handle */
|
||||
[inline]
|
||||
pub fn android_get_native_activity() voidptr {
|
||||
return C.sapp_android_get_native_activity()
|
||||
}
|
||||
|
|
|
@ -67,3 +67,5 @@ fn C.sapp_d3d11_get_render_target_view() voidptr
|
|||
fn C.sapp_d3d11_get_depth_stencil_view() voidptr
|
||||
/* Win32: get the HWND window handle */
|
||||
fn C.sapp_win32_get_hwnd() voidptr
|
||||
/* Android: get native activity handle */
|
||||
fn C.sapp_android_get_native_activity() voidptr
|
|
@ -5,7 +5,7 @@ pub:
|
|||
init_cb fn() /* these are the user-provided callbacks without user data */
|
||||
frame_cb fn()
|
||||
cleanup_cb fn()
|
||||
event_cb fn( voidptr) //&sapp_event)
|
||||
event_cb fn(&C.sapp_event) //&sapp_event)
|
||||
fail_cb fn(byteptr)
|
||||
|
||||
user_data voidptr /* these are the user-provided callbacks with user data */
|
||||
|
@ -13,7 +13,7 @@ pub:
|
|||
frame_userdata_cb fn(voidptr)
|
||||
cleanup_userdata_cb fn(voidptr)
|
||||
event_userdata_cb fn(&C.sapp_event, voidptr)
|
||||
fail_userdata_cb fn(voidptr)
|
||||
fail_userdata_cb fn(byteptr,voidptr)
|
||||
|
||||
width int /* the preferred width of the window / canvas */
|
||||
height int /* the preferred height of the window / canvas */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue