Constructor

new()

Methods

Inherited Variables

Inherited Methods

Defined by Mouse

canLock():Bool

Unlocks the cursor position and displays it.

hideSystemCursor():Void

Hides the system cursor (without locking)

isLocked():Bool

Returns the status of the cursor lock

lock():Void

Locks the cursor position and hides it. For catching movements, use the moveX/moveY arguments of your moveListener handler.

@:value({ leaveListener : null })notify(?downListener:(button:Int, x:Int, y:Int) ‑> Void, ?upListener:(button:Int, x:Int, y:Int) ‑> Void, ?moveListener:(x:Int, y:Int, moveX:Int, moveY:Int) ‑> Void, ?wheelListener:(delta:Int) ‑> Void, ?leaveListener:() ‑> Void):Void

Creates event handlers from passed functions.

Parameters:

downListener

(optional) function with button:Int,x:Int,y:Int arguments, fired when a mouse is pressed down. button:Int is 0 for left button, 1 for right and 2 for middle.

upListener

(optional) function with button:Int,x:Int,y:Int arguments, fired when a mouse is released.

moveListener

(optional) function with x:Int,y:Int,moveX:Int,moveY:Int arguments, fired when a mouse is moved. moveX/moveY is the difference between the current coordinates and the last position of the mouse.

wheelListener

(optional) function with delta:Int argument, fired when the wheel rotates. It can have a value of 1 or -1 depending on the rotation.

leaveListener

(optional) function without` arguments, when fired mouse leave canvas.

notifyOnLockChange(change:() ‑> Void, error:() ‑> Void):Void

Creates event handlers from passed functions.

Parameters:

change

function fired when the lock is turned on / off.

error

function fired when a toggle error occurs.

@:value({ leaveListener : null })notifyWindowed(windowId:Int, ?downListener:(Int, Int, Int) ‑> Void, ?upListener:(Int, Int, Int) ‑> Void, ?moveListener:(Int, Int, Int, Int) ‑> Void, ?wheelListener:Int ‑> Void, ?leaveListener:() ‑> Void):Void

Creates event handlers from passed functions like notify function, but only for window with windowId:Int id argument. The windows are not supported by all the targets.

@:value({ leaveListener : null })remove(?downListener:(button:Int, x:Int, y:Int) ‑> Void, ?upListener:(button:Int, x:Int, y:Int) ‑> Void, ?moveListener:(x:Int, y:Int, moveX:Int, moveY:Int) ‑> Void, ?wheelListener:(delta:Int) ‑> Void, ?leaveListener:() ‑> Void):Void

Removes event handlers from the passed functions that were passed to notify function.

removeFromLockChange(change:() ‑> Void, error:() ‑> Void):Void

Removes event handlers from the passed functions that were passed to notifyOnLockChange function.

@:value({ leaveListener : null })removeWindowed(windowId:Int, ?downListener:(Int, Int, Int) ‑> Void, ?upListener:(Int, Int, Int) ‑> Void, ?moveListener:(Int, Int, Int, Int) ‑> Void, ?wheelListener:Int ‑> Void, ?leaveListener:() ‑> Void):Void

Removes event handlers for windowId:Int from the passed functions that were passed to notifyWindowed function.

setSystemCursor(cursor:MouseCursor):Void

Set the native system cursor

Parameters:

cursor

The native cursor to show.

showSystemCursor():Void

Show the system cursor

unlock():Void

Unlock the cursor position and hides it. For catching movements, use the moveX/moveY arguments of your moveListener handler.

Defined by Controller

_id():Int