-
Notifications
You must be signed in to change notification settings - Fork 2
Mouse
themixray edited this page Dec 16, 2021
·
11 revisions
Aliases: gprs, getbtns
Get buttons pressed.
pygwin.mouse.getPressed()
Returns dict
Aliases: isprs, btnprs
Is button pressed.
pygwin.mouse.isPressed(x)
- x Button name (left/middle/right)
Returns bool
Aliase: gpos
Get mouse position.
pygwin.mouse.getPosition()
Returns tuple
Aliases: spos, setpos, move
Set mouse position.
pygwin.mouse.setPosition((x,y))
- x Mouse x
- y Mouse y
Returns None
Set mouse visible.
pygwin.mouse.setVisible(x)
- x Make cursor visible
Returns None
Is mouse visible.
pygwin.mouse.getVisible()
Returns bool
Set mouse cursor.
pygwin.mouse.setCursor(constant)
pygwin.mouse.setCursor(size,hotspot,xormasks,andmasks)
- constant Cursor constant
- size Cursor size
- hotspot Cursor hotspot
- xormasks Cursor xormasks
- andmasks Cursor andmasks
Returns None
Constant Description
SYSTEM_CURSOR_HAND hand
SYSTEM_CURSOR_WAIT wait
SYSTEM_CURSOR_ARROW arrow
SYSTEM_CURSOR_IBEAM i-beam
SYSTEM_CURSOR_CROSSHAIR crosshair
SYSTEM_CURSOR_NO slashed circle or crossbones
SYSTEM_CURSOR_SIZEWE double arrow pointing west and east
SYSTEM_CURSOR_SIZENS double arrow pointing north and south
SYSTEM_CURSOR_WAITARROW small wait cursor (or wait if not available)
SYSTEM_CURSOR_SIZENWSE double arrow pointing northwest and southeast
SYSTEM_CURSOR_SIZENESW double arrow pointing northeast and southwest
SYSTEM_CURSOR_SIZEALL four pointed arrow pointing north, south, east, and west
Get mouse cursor.
pygwin.mouse.getCursor()
Returns (size,hotspot,xormasks,andmasks)