sokol: add mouse locking (#10684)
parent
55eeb701a9
commit
9eee6631cc
|
@ -86,6 +86,16 @@ pub fn mouse_shown() bool {
|
|||
return C.sapp_mouse_shown()
|
||||
}
|
||||
|
||||
[inline]
|
||||
pub fn lock_mouse(locked bool) {
|
||||
C.sapp_lock_mouse(locked)
|
||||
}
|
||||
|
||||
[inline]
|
||||
pub fn mouse_locked() bool {
|
||||
return C.sapp_mouse_locked()
|
||||
}
|
||||
|
||||
// return the userdata pointer optionally provided in sapp_desc
|
||||
[inline]
|
||||
pub fn userdata() voidptr {
|
||||
|
|
|
@ -26,9 +26,15 @@ fn C.sapp_keyboard_shown() bool
|
|||
// show or hide the mouse cursor
|
||||
fn C.sapp_show_mouse(visible bool)
|
||||
|
||||
// show or hide the mouse cursor
|
||||
// return true if the mouse cursor is shown
|
||||
fn C.sapp_mouse_shown() bool
|
||||
|
||||
// lock or unlock the mouse cursor
|
||||
fn C.sapp_lock_mouse(locked bool)
|
||||
|
||||
// return true if the mouse cursor is locked
|
||||
fn C.sapp_mouse_locked() bool
|
||||
|
||||
// return the userdata pointer optionally provided in sapp_desc
|
||||
fn C.sapp_userdata() voidptr
|
||||
|
||||
|
|
Loading…
Reference in New Issue