comparison 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
comparison
equal deleted inserted replaced
1721:1cc762cafff8 1722:5daa04d862f1
73 * \brief Get the window which currently has focus for the currently selected mouse. 73 * \brief Get the window which currently has focus for the currently selected mouse.
74 */ 74 */
75 extern DECLSPEC SDL_WindowID SDLCALL SDL_GetMouseFocusWindow(void); 75 extern DECLSPEC SDL_WindowID SDLCALL SDL_GetMouseFocusWindow(void);
76 76
77 /** 77 /**
78 * \fn int SDL_SetRelativeMouseMode(SDL_bool enabled)
79 *
80 * \brief Set relative mouse mode for the currently selected mouse.
81 *
82 * \param enabled Whether or not to enable relative mode
83 *
84 * \return 0 on success, or -1 if relative mode is not supported.
85 *
86 * While the mouse is in relative mode, the cursor is hidden, and the
87 * driver will try to report continuous motion in the current window.
88 * Only relative motion events will be delivered, the mouse position
89 * will not change.
90 *
91 * \note This function will flush any pending mouse motion.
92 *
93 * \sa SDL_GetRelativeMouseMode()
94 */
95 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
96
97 /**
98 * \fn SDL_bool SDL_GetRelativeMouseMode()
99 *
100 * \brief Query whether relative mouse mode is enabled for the currently selected mouse.
101 *
102 * \sa SDL_SetRelativeMouseMode()
103 */
104 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode();
105
106 /**
78 * \fn Uint8 SDL_GetMouseState(int *x, int *y) 107 * \fn Uint8 SDL_GetMouseState(int *x, int *y)
79 * 108 *
80 * \brief Retrieve the current state of the mouse. 109 * \brief Retrieve the current state of the currently selected mouse.
81 * 110 *
82 * The current button state is returned as a button bitmask, which can 111 * The current button state is returned as a button bitmask, which can
83 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the 112 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
84 * mouse cursor position relative to the focus window for the currently 113 * mouse cursor position relative to the focus window for the currently
85 * selected mouse. You can pass NULL for either x or y. 114 * selected mouse. You can pass NULL for either x or y.
87 extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y); 116 extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
88 117
89 /** 118 /**
90 * \fn Uint8 SDL_GetRelativeMouseState(int *x, int *y) 119 * \fn Uint8 SDL_GetRelativeMouseState(int *x, int *y)
91 * 120 *
92 * \brief Retrieve the current state of the mouse. 121 * \brief Retrieve the state of the currently selected mouse.
93 * 122 *
94 * The current button state is returned as a button bitmask, which can 123 * The current button state is returned as a button bitmask, which can
95 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the 124 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
96 * mouse deltas since the last call to SDL_GetRelativeMouseState(). 125 * mouse deltas since the last call to SDL_GetRelativeMouseState().
97 */ 126 */