All Bundles
Cursor
Mouse cursor operations
Operations
CaptureMouse
Capture the mouse and to track input outside an SDL window
function : CaptureMouse(enabled:Bool) ~ Int
Parameters
Name | Type | Description |
---|
enabled | Bool | true to enable capturing, false to disable. |
Return
Type | Description |
---|
Int | 0 on success or -1 if not supported |
GetGlobalMouseState
Get the current state of the mouse in relation to the desktop
function : GetGlobalMouseState(x:IntRef, y:IntRef) ~ Int
Parameters
Name | Type | Description |
---|
x | IntRef | filled in with the current X coord relative to the desktop |
y | IntRef | filled in with the current Y coord relative to the desktop |
Return
Type | Description |
---|
Int | current button state as a bitmask |
GetMouseState
Retrieve the current state of the mouse
function : GetMouseState(x:IntRef, y:IntRef) ~ Int
Parameters
Name | Type | Description |
---|
x | IntRef | coordinate of the mouse cursor position relative to the focus window |
y | IntRef | coordinate of the mouse cursor position relative to the focus window |
Return
Type | Description |
---|
Int | current button state as a bitmask |
WarpMouseGlobal
Move the mouse to the given position in global screen space
function : WarpMouseGlobal(x:Int, y:Int) ~ Int
Parameters
Name | Type | Description |
---|
x | Int | x coordinate |
y | Int | y coordinate |
Return
Type | Description |
---|
Int | 0 on success or a negative error code on failure |