:mod:`pygame2.sdl.mouse` -- SDL mouse I/O wrapper module
========================================================

SDL mouse I/O wrapper module

.. module:: pygame2.sdl.mouse
   :synopsis: SDL mouse I/O wrapper module

Module Functions
----------------
.. function:: get_position () -> x, y

  Gets the current mouse position on the main screen.



.. function:: get_rel_position () -> x, y

  Gets the relative mouse movement.

  Gets the relative mouse movement since the last call to this function.



.. function:: get_rel_state () -> buttons, x, y

  Gets the relative mouse state.

  Gets the relative mouse state since the last call to this function.



.. function:: get_state () -> buttons, x, y

  Gets the current mouse state.

  Gets the current mouse state. The returned buttons value
  represents a bitmask with the pressed buttons.



.. function:: set_cursor (cursor) -> None

  Sets the mouse cursor to be shown.

  Sets the mouse cursor to be displayed. The change will be visible
  immediately.



.. function:: set_position (x, y) -> None
              set_position (point) -> None

  Sets the position of the mouse cursor.

  Sets the position of the mouse cursor on the main screen. This
  behaves exactly as the :meth:`warp` method.



.. function:: set_visible (show) -> state

  Toggles whether the cursor is shown on the screen.

  Toggles whether the cursor is shown on the screen. This
  behaves exactly as the :meth:`show_cursor` method.



.. function:: show_cursor (show) -> state

  Toggles whether the cursor is shown on the screen.

  Toggles whether the cursor is shown on the screen. *show* can be a
  boolean or one a value of :const:`ENABLE`, :const:`DISABLE` and
  :const:`QUERY`. :const:`QUERY` will not change the visibility state but
  query, if the cursor is currently shown or not.

  The state returned is a value of :const:`ENABLE` and :const:`DISABLE`,
  indicating, whether the cursor is currently shown or not.



.. function:: warp (x, y) -> None
              warp (point) -> None

  Sets the position of the mouse cursor.

  Sets the position of the mouse cursor on the main screen. This
  also will generate a mouse motion event.



Cursor
------
.. class:: Cursor (data, mask, width, height[, hotx, hoty]) -> Cursor
    Cursor (data, mask, size[, point]) -> Cursor
    

  Creates a new mouse cursor pointer.

  Creates a new mouse cursor pointer from the specified pixel *data*
  and pixel *mask*. The *mask* is used for applying transparency to the
  data defining the mouse cursor.



