diff include/SDL_mouse.h @ 1722:5daa04d862f1 SDL-1.3

Added a userdata parameter for event filters. Added a function to filter the existing queued events. Added explicit support for relative mouse mode to the API.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 30 Jun 2006 08:18:44 +0000
parents 624e1412fbba
children 6c63fc2bd986
line wrap: on
line diff
--- a/include/SDL_mouse.h	Fri Jun 30 05:50:35 2006 +0000
+++ b/include/SDL_mouse.h	Fri Jun 30 08:18:44 2006 +0000
@@ -75,9 +75,38 @@
 extern DECLSPEC SDL_WindowID SDLCALL SDL_GetMouseFocusWindow(void);
 
 /**
+ * \fn int SDL_SetRelativeMouseMode(SDL_bool enabled)
+ *
+ * \brief Set relative mouse mode for the currently selected mouse.
+ *
+ * \param enabled Whether or not to enable relative mode
+ *
+ * \return 0 on success, or -1 if relative mode is not supported.
+ *
+ * While the mouse is in relative mode, the cursor is hidden, and the
+ * driver will try to report continuous motion in the current window.
+ * Only relative motion events will be delivered, the mouse position
+ * will not change.
+ *
+ * \note This function will flush any pending mouse motion.
+ *
+ * \sa SDL_GetRelativeMouseMode()
+ */
+extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
+
+/**
+ * \fn SDL_bool SDL_GetRelativeMouseMode()
+ *
+ * \brief Query whether relative mouse mode is enabled for the currently selected mouse.
+ *
+ * \sa SDL_SetRelativeMouseMode()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode();
+
+/**
  * \fn Uint8 SDL_GetMouseState(int *x, int *y)
  *
- * \brief Retrieve the current state of the mouse.
+ * \brief Retrieve the current state of the currently selected mouse.
  *
  * The current button state is returned as a button bitmask, which can
  * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
@@ -89,7 +118,7 @@
 /**
  * \fn Uint8 SDL_GetRelativeMouseState(int *x, int *y)
  *
- * \brief Retrieve the current state of the mouse.
+ * \brief Retrieve the state of the currently selected mouse.
  *
  * The current button state is returned as a button bitmask, which can
  * be tested using the SDL_BUTTON(X) macros, and x and y are set to the