Eyetracker |

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
pygaze._mouse.osmouse.OSMouse Class Reference
Inheritance diagram for pygaze._mouse.osmouse.OSMouse:

## Public Member Functions
| __init__ (self, mousebuttonlist=settings.MOUSEBUTTONLIST, timeout=settings.MOUSETIMEOUT, visible=False)
| set_mousebuttonlist (self, mousebuttonlist=None)
| set_timeout (self, timeout=None)
| set_visible (self, visible=True)
| set_pos (self, pos=(0, 0))
| get_pos (self)
| get_clicked (self, mousebuttonlist=u 'default', timeout=u 'default')
| get_pressed (self)
Public Member Functions inherited from pygaze._mouse.basemouse.BaseMouse
| __init__ (self)

## Public Attributes
| experiment = settings.osexperiment
str | uniform_coordinates = u'yes'
| mouse

## Protected Member Functions
| _from_pos (self, pos)
| _to_pos (self, pos)

## Constructor & Destructor Documentation

## ◆ __init__()

pygaze._mouse.osmouse.OSMouse.__init__ | ( |  | self,
|  |  | mousebuttonlist = settings.MOUSEBUTTONLIST,
|  |  | timeout = settings.MOUSETIMEOUT,
|  |  | visible = False )

## Member Function Documentation

## ◆ _from_pos()

pygaze._mouse.osmouse.OSMouse._from_pos | ( |  | self,
|  |  | pos )
| protected

    Convert OpenSesame coordinates to PyGaze coordinates.

## ◆ _to_pos()

pygaze._mouse.osmouse.OSMouse._to_pos | ( |  | self,
|  |  | pos )
| protected

    Convert PyGaze coordinates to OpenSesame coordinates.

## ◆ get_clicked()

pygaze._mouse.osmouse.OSMouse.get_clicked | ( |  | self,
|  |  | mousebuttonlist = u'default',
|  |  | timeout = u'default' )

            Waits for mouse clicks

            arguments

            None

            keyword arguments

            mousebuttonlist --  list of mouse buttons that are allowed (e.g.
                            [1,3] for left and right button); None to
                            allow all buttons or 'default' to use the
                            mbuttonlist property (default = 'default')
            timeout --  time in milliseconds after which None is returned
                        when no click is registered; None for no timeout or
                        'default' to use the timeout property (default =
                        'default')

            returns

            mousebutton, clickpos, clicktime    --  mousebutton is an integer,
                                        indicating which button has
                                        been pressed or None when no
                                        button has been pressed;
                                        clickpos is an (x,y) position
                                        tuple or None when no click
                                        was registered;
                                        clicktime is the time
                                        (measured from expbegintime) a
                                        buttonpress or a timeout
                                        occured

Reimplemented from pygaze._mouse.basemouse.BaseMouse.

## ◆ get_pos()

pygaze._mouse.osmouse.OSMouse.get_pos | ( |  | self | ) |

            Returns mouse position

            arguments

            None

            keyword arguments

            None

            returns

            mpos        --  a (x,y) position tuple, assuming top left is (0,0)

Reimplemented from pygaze._mouse.basemouse.BaseMouse.

## ◆ get_pressed()

pygaze._mouse.osmouse.OSMouse.get_pressed | ( |  | self | ) |

            Returns the current state of the mouse buttons

            arguments

            None

            keyword arguments

            None

            returns

            statelist   --  a list of Booleans indicating which mousebutton is
                        down (e.g. [1,0,0] when only button 1 is pressed on
                        a three-button-mouse)

Reimplemented from pygaze._mouse.basemouse.BaseMouse.

## ◆ set_mousebuttonlist()

pygaze._mouse.osmouse.OSMouse.set_mousebuttonlist | ( |  | self,
|  |  | mousebuttonlist = None )

            Set a list of accepted mouse buttons

            arguments

            None

            keyword arguments

            mousebuttonlist --  list of mouse buttons that are allowed (e.g.
                            [1,3] for left and right button) or None to
                            allow all buttons (default = None)

            returns

            None        --   sets mbuttonlist property

Reimplemented from pygaze._mouse.basemouse.BaseMouse.

## ◆ set_pos()

pygaze._mouse.osmouse.OSMouse.set_pos | ( |  | self,
|  |  | pos = (0,0) )

            Set the mouse position

            arguments

            None

            keyword arguments

            pos     --  an (x,y) position tuple, assuming top left is (0,0)
                        (default = (0,0))

            returns

            None        --  sets the mouse position

Reimplemented from pygaze._mouse.basemouse.BaseMouse.

## ◆ set_timeout()

pygaze._mouse.osmouse.OSMouse.set_timeout | ( |  | self,
|  |  | timeout = None )

            Set a timeout (in milliseconds)

            arguments

            None

            keyword arguments

            timeout --  time in milliseconds after which None is returned
                        on a call to get_clicked method when no click is
                        registered (default = None)

            returns
            None        --  sets timeout property

Reimplemented from pygaze._mouse.basemouse.BaseMouse.

## ◆ set_visible()

pygaze._mouse.osmouse.OSMouse.set_visible | ( |  | self,
|  |  | visible = True )

            Sets the visibility of the cursor

            arguments

            None

            keyword arguments

            visible --  Boolean indicating if mouse should be visible or not
                        (default = False)

            returns

            None        --  sets visible property

Reimplemented from pygaze._mouse.basemouse.BaseMouse.

## Member Data Documentation

## ◆ experiment

pygaze._mouse.osmouse.OSMouse.experiment = settings.osexperiment

## ◆ mouse

pygaze._mouse.osmouse.OSMouse.mouse

Initial value:
= mouse(self.experiment, buttonlist=mousebuttonlist,
timeout=timeout)

## ◆ uniform_coordinates

str pygaze._mouse.osmouse.OSMouse.uniform_coordinates = u'yes'

The documentation for this class was generated from the following file:

- C:/Users/lurax/eyetrackingTobii/pygaze/_mouse/osmouse.py