Package pyj2d :: Module mouse :: Class Mouse

Class Mouse

object --+
         |
        Mouse

pyj2d.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 frame, returns -1,-1.
 
get_rel(self)
Return relative x,y change of mouse position since last call.
 
set_visible(self, visible)
Set mouse cursor visibility according to visible bool argument. Return previous cursor visibility state.
 
set_cursor(self, *cursor)
Set mouse cursor. Alternative arguments: * JVM system cursor or cursor object * image or surface, hotspot (x,y), and optional name * size, hotspot, data, mask, and optional name Refer to pyj2d.cursors for details.
 
get_cursor(self)
Return cursor object. Cursor type and name accessed with object getType and getName methods.

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 pyj2d.mouse instance.

Overrides: object.__init__