Mercurial > sdl-ios-xcode
comparison include/SDL_mouse.h @ 2710:44e49d3fa6cf
Final merge of Google Summer of Code 2008 work...
Many-mouse and tablet support
by Szymon Wilczek, mentored by Ryan C. Gordon
Everything concerning the project is noted on the wiki:
http://wilku.ravenlord.ws/doku.php?id=start
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 25 Aug 2008 06:33:00 +0000 |
parents | 545fbf461c5b |
children | abacf2555bb4 |
comparison
equal
deleted
inserted
replaced
2709:fd3f0f1147e7 | 2710:44e49d3fa6cf |
---|---|
70 /** | 70 /** |
71 * \fn SDL_WindowID SDL_GetMouseFocusWindow(void) | 71 * \fn SDL_WindowID SDL_GetMouseFocusWindow(void) |
72 * | 72 * |
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(int index); |
76 | 76 |
77 /** | 77 /** |
78 * \fn int SDL_SetRelativeMouseMode(SDL_bool enabled) | 78 * \fn int SDL_SetRelativeMouseMode(SDL_bool enabled) |
79 * | 79 * |
80 * \brief Set relative mouse mode for the currently selected mouse. | 80 * \brief Set relative mouse mode for the currently selected mouse. |
90 * | 90 * |
91 * \note This function will flush any pending mouse motion. | 91 * \note This function will flush any pending mouse motion. |
92 * | 92 * |
93 * \sa SDL_GetRelativeMouseMode() | 93 * \sa SDL_GetRelativeMouseMode() |
94 */ | 94 */ |
95 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled); | 95 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(int index, |
96 SDL_bool enabled); | |
96 | 97 |
97 /** | 98 /** |
98 * \fn SDL_bool SDL_GetRelativeMouseMode() | 99 * \fn SDL_bool SDL_GetRelativeMouseMode() |
99 * | 100 * |
100 * \brief Query whether relative mouse mode is enabled for the currently selected mouse. | 101 * \brief Query whether relative mouse mode is enabled for the currently selected mouse. |
101 * | 102 * |
102 * \sa SDL_SetRelativeMouseMode() | 103 * \sa SDL_SetRelativeMouseMode() |
103 */ | 104 */ |
104 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void); | 105 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(int index); |
105 | 106 |
106 /** | 107 /** |
107 * \fn Uint8 SDL_GetMouseState(int *x, int *y) | 108 * \fn Uint8 SDL_GetMouseState(int *x, int *y) |
108 * | 109 * |
109 * \brief Retrieve the current state of the currently selected mouse. | 110 * \brief Retrieve the current state of the currently selected mouse. |
111 * The current button state is returned as a button bitmask, which can | 112 * The current button state is returned as a button bitmask, which can |
112 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the | 113 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the |
113 * mouse cursor position relative to the focus window for the currently | 114 * mouse cursor position relative to the focus window for the currently |
114 * selected mouse. You can pass NULL for either x or y. | 115 * selected mouse. You can pass NULL for either x or y. |
115 */ | 116 */ |
116 extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y); | 117 extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int index, int *x, int *y); |
117 | 118 |
118 /** | 119 /** |
119 * \fn Uint8 SDL_GetRelativeMouseState(int *x, int *y) | 120 * \fn Uint8 SDL_GetRelativeMouseState(int *x, int *y) |
120 * | 121 * |
121 * \brief Retrieve the state of the currently selected mouse. | 122 * \brief Retrieve the state of the currently selected mouse. |
122 * | 123 * |
123 * The current button state is returned as a button bitmask, which can | 124 * The current button state is returned as a button bitmask, which can |
124 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the | 125 * be tested using the SDL_BUTTON(X) macros, and x and y are set to the |
125 * mouse deltas since the last call to SDL_GetRelativeMouseState(). | 126 * mouse deltas since the last call to SDL_GetRelativeMouseState(). |
126 */ | 127 */ |
127 extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y); | 128 extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int index, int *x, |
129 int *y); | |
128 | 130 |
129 /** | 131 /** |
130 * \fn void SDL_WarpMouseInWindow(SDL_WindowID windowID, int x, int y) | 132 * \fn void SDL_WarpMouseInWindow(SDL_WindowID windowID, int x, int y) |
131 * | 133 * |
132 * \brief Moves the currently selected mouse to the given position within the window. | 134 * \brief Moves the currently selected mouse to the given position within the window. |
201 /* Used as a mask when testing buttons in buttonstate | 203 /* Used as a mask when testing buttons in buttonstate |
202 Button 1: Left mouse button | 204 Button 1: Left mouse button |
203 Button 2: Middle mouse button | 205 Button 2: Middle mouse button |
204 Button 3: Right mouse button | 206 Button 3: Right mouse button |
205 */ | 207 */ |
208 | |
209 /* FIXME: Where do these functions go in this header? | |
210 Also, add doxygen documentation for these... | |
211 */ | |
212 extern DECLSPEC char *SDLCALL SDL_GetMouseName(int index); | |
213 | |
214 extern DECLSPEC int SDLCALL SDL_GetCursorsNumber(int index); | |
215 | |
216 extern DECLSPEC int SDLCALL SDL_GetCurrentCursor(int index); | |
217 | |
206 #define SDL_BUTTON(X) (1 << ((X)-1)) | 218 #define SDL_BUTTON(X) (1 << ((X)-1)) |
207 #define SDL_BUTTON_LEFT 1 | 219 #define SDL_BUTTON_LEFT 1 |
208 #define SDL_BUTTON_MIDDLE 2 | 220 #define SDL_BUTTON_MIDDLE 2 |
209 #define SDL_BUTTON_RIGHT 3 | 221 #define SDL_BUTTON_RIGHT 3 |
210 #define SDL_BUTTON_X1 4 | 222 #define SDL_BUTTON_X1 4 |