Package pyjsdl :: Module mouse :: Class Mouse

Class Mouse

object --+
         |
        Mouse

pyjsdl.mouse

Instance Methods
 
__init__(self)
Provides methods to access the mouse function.
 
get_pressed(self)
Return state of mouse buttons as a tuple of bool for button1,2,3.
 
get_pos(self)
Return x,y of mouse pointer. If the pointer is not in canvas, returns -1,-1
 
get_rel(self)
Return relative x,y change of mouse position since last call.
 
set_visible(self, visible)
Set visibility of mouse cursor. Return bool of previous state.
 
set_cursor(self, *cursor)
Set mouse cursor. Alternative arguments: * system cursor or cursor object * image url or surface, hotspot (x,y), and optional fallback * size, hotspot, data, mask, and optional fallback Refer to pyjsdl.cursors for details.
 
get_cursor(self)
Return cursor object.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 

Provides methods to access the mouse function.

Module initialization creates pyjsdl.mouse instance.

Overrides: object.__init__