SDL 3.0
SDL_mouse.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * \file SDL_mouse.h
24 *
25 * Include file for SDL mouse event handling.
26 */
27
28#ifndef SDL_mouse_h_
29#define SDL_mouse_h_
30
31#include <SDL3/SDL_stdinc.h>
32#include <SDL3/SDL_error.h>
33#include <SDL3/SDL_video.h>
34
35#include <SDL3/SDL_begin_code.h>
36/* Set up for C function definitions, even when using C++ */
37#ifdef __cplusplus
38extern "C" {
39#endif
40
42
43typedef struct SDL_Cursor SDL_Cursor; /**< Implementation dependent */
44
45/**
46 * Cursor types for SDL_CreateSystemCursor().
47 *
48 * \since This enum is available since SDL 3.0.0.
49 */
50typedef enum SDL_SystemCursor
51{
55 SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */
56 SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */
57 SDL_SYSTEM_CURSOR_SIZENWSE, /**< Double arrow pointing northwest and southeast */
58 SDL_SYSTEM_CURSOR_SIZENESW, /**< Double arrow pointing northeast and southwest */
59 SDL_SYSTEM_CURSOR_SIZEWE, /**< Double arrow pointing west and east */
60 SDL_SYSTEM_CURSOR_SIZENS, /**< Double arrow pointing north and south */
61 SDL_SYSTEM_CURSOR_SIZEALL, /**< Four pointed arrow pointing north, south, east, and west */
62 SDL_SYSTEM_CURSOR_NO, /**< Slashed circle or crossbones */
64 SDL_SYSTEM_CURSOR_WINDOW_TOPLEFT, /**< Window resize top-left (or SIZENWSE) */
65 SDL_SYSTEM_CURSOR_WINDOW_TOP, /**< Window resize top (or SIZENS) */
66 SDL_SYSTEM_CURSOR_WINDOW_TOPRIGHT, /**< Window resize top-right (or SIZENESW) */
67 SDL_SYSTEM_CURSOR_WINDOW_RIGHT, /**< Window resize right (or SIZEWE) */
68 SDL_SYSTEM_CURSOR_WINDOW_BOTTOMRIGHT, /**< Window resize bottom-right (or SIZENWSE) */
69 SDL_SYSTEM_CURSOR_WINDOW_BOTTOM, /**< Window resize bottom (or SIZENS) */
70 SDL_SYSTEM_CURSOR_WINDOW_BOTTOMLEFT, /**< Window resize bottom-left (or SIZENESW) */
71 SDL_SYSTEM_CURSOR_WINDOW_LEFT, /**< Window resize left (or SIZEWE) */
74
75/**
76 * Scroll direction types for the Scroll event
77 *
78 * \since This enum is available since SDL 3.0.0.
79 */
81{
82 SDL_MOUSEWHEEL_NORMAL, /**< The scroll direction is normal */
83 SDL_MOUSEWHEEL_FLIPPED /**< The scroll direction is flipped / natural */
85
86/* Function prototypes */
87
88/**
89 * Return whether a mouse is currently connected.
90 *
91 * \returns SDL_TRUE if a mouse is connected, SDL_FALSE otherwise.
92 *
93 * \since This function is available since SDL 3.0.0.
94 *
95 * \sa SDL_GetMice
96 */
97extern DECLSPEC SDL_bool SDLCALL SDL_HasMouse(void);
98
99/**
100 * Get a list of currently connected mice.
101 *
102 * Note that this will include any device or virtual driver that includes
103 * mouse functionality, including some game controllers, KVM switches, etc.
104 * You should wait for input from a device before you consider it actively in
105 * use.
106 *
107 * \param count a pointer filled in with the number of mice returned
108 * \returns a 0 terminated array of mouse instance IDs which should be freed
109 * with SDL_free(), or NULL on error; call SDL_GetError() for more
110 * details.
111 *
112 * \since This function is available since SDL 3.0.0.
113 *
114 * \sa SDL_GetMouseInstanceName
115 * \sa SDL_HasMouse
116 */
117extern DECLSPEC SDL_MouseID *SDLCALL SDL_GetMice(int *count);
118
119/**
120 * Get the name of a mouse.
121 *
122 * This function returns "" if the mouse doesn't have a name.
123 *
124 * \param instance_id the mouse instance ID
125 * \returns the name of the selected mouse, or NULL on failure; call
126 * SDL_GetError() for more information.
127 *
128 * \since This function is available since SDL 3.0.0.
129 *
130 * \sa SDL_GetMice
131 */
132extern DECLSPEC const char *SDLCALL SDL_GetMouseInstanceName(SDL_MouseID instance_id);
133
134/**
135 * Get the window which currently has mouse focus.
136 *
137 * \returns the window with mouse focus.
138 *
139 * \since This function is available since SDL 3.0.0.
140 */
141extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
142
143/**
144 * Retrieve the current state of the mouse.
145 *
146 * The current button state is returned as a button bitmask, which can be
147 * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
148 * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
149 * mouse cursor position relative to the focus window. You can pass NULL for
150 * either `x` or `y`.
151 *
152 * \param x the x coordinate of the mouse cursor position relative to the
153 * focus window
154 * \param y the y coordinate of the mouse cursor position relative to the
155 * focus window
156 * \returns a 32-bit button bitmask of the current button state.
157 *
158 * \since This function is available since SDL 3.0.0.
159 *
160 * \sa SDL_GetGlobalMouseState
161 * \sa SDL_GetRelativeMouseState
162 */
163extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(float *x, float *y);
164
165/**
166 * Get the current state of the mouse in relation to the desktop.
167 *
168 * This works similarly to SDL_GetMouseState(), but the coordinates will be
169 * reported relative to the top-left of the desktop. This can be useful if you
170 * need to track the mouse outside of a specific window and SDL_CaptureMouse()
171 * doesn't fit your needs. For example, it could be useful if you need to
172 * track the mouse while dragging a window, where coordinates relative to a
173 * window might not be in sync at all times.
174 *
175 * Note: SDL_GetMouseState() returns the mouse position as SDL understands it
176 * from the last pump of the event queue. This function, however, queries the
177 * OS for the current mouse position, and as such, might be a slightly less
178 * efficient function. Unless you know what you're doing and have a good
179 * reason to use this function, you probably want SDL_GetMouseState() instead.
180 *
181 * \param x filled in with the current X coord relative to the desktop; can be
182 * NULL
183 * \param y filled in with the current Y coord relative to the desktop; can be
184 * NULL
185 * \returns the current button state as a bitmask which can be tested using
186 * the SDL_BUTTON(X) macros.
187 *
188 * \since This function is available since SDL 3.0.0.
189 *
190 * \sa SDL_CaptureMouse
191 * \sa SDL_GetMouseState
192 */
193extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(float *x, float *y);
194
195/**
196 * Retrieve the relative state of the mouse.
197 *
198 * The current button state is returned as a button bitmask, which can be
199 * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
200 * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
201 * mouse deltas since the last call to SDL_GetRelativeMouseState() or since
202 * event initialization. You can pass NULL for either `x` or `y`.
203 *
204 * \param x a pointer filled with the last recorded x coordinate of the mouse
205 * \param y a pointer filled with the last recorded y coordinate of the mouse
206 * \returns a 32-bit button bitmask of the relative button state.
207 *
208 * \since This function is available since SDL 3.0.0.
209 *
210 * \sa SDL_GetMouseState
211 */
212extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(float *x, float *y);
213
214/**
215 * Move the mouse cursor to the given position within the window.
216 *
217 * This function generates a mouse motion event if relative mode is not
218 * enabled. If relative mode is enabled, you can force mouse events for the
219 * warp by setting the SDL_HINT_MOUSE_RELATIVE_WARP_MOTION hint.
220 *
221 * Note that this function will appear to succeed, but not actually move the
222 * mouse when used over Microsoft Remote Desktop.
223 *
224 * \param window the window to move the mouse into, or NULL for the current
225 * mouse focus
226 * \param x the x coordinate within the window
227 * \param y the y coordinate within the window
228 *
229 * \since This function is available since SDL 3.0.0.
230 *
231 * \sa SDL_WarpMouseGlobal
232 */
233extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
234 float x, float y);
235
236/**
237 * Move the mouse to the given position in global screen space.
238 *
239 * This function generates a mouse motion event.
240 *
241 * A failure of this function usually means that it is unsupported by a
242 * platform.
243 *
244 * Note that this function will appear to succeed, but not actually move the
245 * mouse when used over Microsoft Remote Desktop.
246 *
247 * \param x the x coordinate
248 * \param y the y coordinate
249 * \returns 0 on success or a negative error code on failure; call
250 * SDL_GetError() for more information.
251 *
252 * \since This function is available since SDL 3.0.0.
253 *
254 * \sa SDL_WarpMouseInWindow
255 */
256extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(float x, float y);
257
258/**
259 * Set relative mouse mode.
260 *
261 * While the mouse is in relative mode, the cursor is hidden, the mouse
262 * position is constrained to the window, and SDL will report continuous
263 * relative mouse motion even if the mouse is at the edge of the window.
264 *
265 * This function will flush any pending mouse motion.
266 *
267 * \param enabled SDL_TRUE to enable relative mode, SDL_FALSE to disable.
268 * \returns 0 on success or a negative error code on failure; call
269 * SDL_GetError() for more information.
270 *
271 * \since This function is available since SDL 3.0.0.
272 *
273 * \sa SDL_GetRelativeMouseMode
274 */
275extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
276
277/**
278 * Capture the mouse and to track input outside an SDL window.
279 *
280 * Capturing enables your app to obtain mouse events globally, instead of just
281 * within your window. Not all video targets support this function. When
282 * capturing is enabled, the current window will get all mouse events, but
283 * unlike relative mode, no change is made to the cursor and it is not
284 * restrained to your window.
285 *
286 * This function may also deny mouse input to other windows--both those in
287 * your application and others on the system--so you should use this function
288 * sparingly, and in small bursts. For example, you might want to track the
289 * mouse while the user is dragging something, until the user releases a mouse
290 * button. It is not recommended that you capture the mouse for long periods
291 * of time, such as the entire time your app is running. For that, you should
292 * probably use SDL_SetRelativeMouseMode() or SDL_SetWindowMouseGrab(),
293 * depending on your goals.
294 *
295 * While captured, mouse events still report coordinates relative to the
296 * current (foreground) window, but those coordinates may be outside the
297 * bounds of the window (including negative values). Capturing is only allowed
298 * for the foreground window. If the window loses focus while capturing, the
299 * capture will be disabled automatically.
300 *
301 * While capturing is enabled, the current window will have the
302 * `SDL_WINDOW_MOUSE_CAPTURE` flag set.
303 *
304 * Please note that SDL will attempt to "auto capture" the mouse while the
305 * user is pressing a button; this is to try and make mouse behavior more
306 * consistent between platforms, and deal with the common case of a user
307 * dragging the mouse outside of the window. This means that if you are
308 * calling SDL_CaptureMouse() only to deal with this situation, you do not
309 * have to (although it is safe to do so). If this causes problems for your
310 * app, you can disable auto capture by setting the
311 * `SDL_HINT_MOUSE_AUTO_CAPTURE` hint to zero.
312 *
313 * \param enabled SDL_TRUE to enable capturing, SDL_FALSE to disable.
314 * \returns 0 on success or a negative error code on failure; call
315 * SDL_GetError() for more information.
316 *
317 * \since This function is available since SDL 3.0.0.
318 *
319 * \sa SDL_GetGlobalMouseState
320 */
321extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);
322
323/**
324 * Query whether relative mouse mode is enabled.
325 *
326 * \returns SDL_TRUE if relative mode is enabled or SDL_FALSE otherwise.
327 *
328 * \since This function is available since SDL 3.0.0.
329 *
330 * \sa SDL_SetRelativeMouseMode
331 */
332extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
333
334/**
335 * Create a cursor using the specified bitmap data and mask (in MSB format).
336 *
337 * `mask` has to be in MSB (Most Significant Bit) format.
338 *
339 * The cursor width (`w`) must be a multiple of 8 bits.
340 *
341 * The cursor is created in black and white according to the following:
342 *
343 * - data=0, mask=1: white
344 * - data=1, mask=1: black
345 * - data=0, mask=0: transparent
346 * - data=1, mask=0: inverted color if possible, black if not.
347 *
348 * Cursors created with this function must be freed with SDL_DestroyCursor().
349 *
350 * If you want to have a color cursor, or create your cursor from an
351 * SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can
352 * hide the cursor and draw your own as part of your game's rendering, but it
353 * will be bound to the framerate.
354 *
355 * Also, SDL_CreateSystemCursor() is available, which provides several
356 * readily-available system cursors to pick from.
357 *
358 * \param data the color value for each pixel of the cursor
359 * \param mask the mask value for each pixel of the cursor
360 * \param w the width of the cursor
361 * \param h the height of the cursor
362 * \param hot_x the X-axis location of the upper left corner of the cursor
363 * relative to the actual mouse position
364 * \param hot_y the Y-axis location of the upper left corner of the cursor
365 * relative to the actual mouse position
366 * \returns a new cursor with the specified parameters on success or NULL on
367 * failure; call SDL_GetError() for more information.
368 *
369 * \since This function is available since SDL 3.0.0.
370 *
371 * \sa SDL_CreateColorCursor
372 * \sa SDL_CreateSystemCursor
373 * \sa SDL_DestroyCursor
374 * \sa SDL_SetCursor
375 */
376extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
377 const Uint8 * mask,
378 int w, int h, int hot_x,
379 int hot_y);
380
381/**
382 * Create a color cursor.
383 *
384 * \param surface an SDL_Surface structure representing the cursor image
385 * \param hot_x the x position of the cursor hot spot
386 * \param hot_y the y position of the cursor hot spot
387 * \returns the new cursor on success or NULL on failure; call SDL_GetError()
388 * for more information.
389 *
390 * \since This function is available since SDL 3.0.0.
391 *
392 * \sa SDL_CreateCursor
393 * \sa SDL_CreateSystemCursor
394 * \sa SDL_DestroyCursor
395 * \sa SDL_SetCursor
396 */
397extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
398 int hot_x,
399 int hot_y);
400
401/**
402 * Create a system cursor.
403 *
404 * \param id an SDL_SystemCursor enum value
405 * \returns a cursor on success or NULL on failure; call SDL_GetError() for
406 * more information.
407 *
408 * \since This function is available since SDL 3.0.0.
409 *
410 * \sa SDL_DestroyCursor
411 */
413
414/**
415 * Set the active cursor.
416 *
417 * This function sets the currently active cursor to the specified one. If the
418 * cursor is currently visible, the change will be immediately represented on
419 * the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if
420 * this is desired for any reason.
421 *
422 * \param cursor a cursor to make active
423 * \returns 0 on success or a negative error code on failure; call
424 * SDL_GetError() for more information.
425 *
426 * \since This function is available since SDL 3.0.0.
427 *
428 * \sa SDL_GetCursor
429 */
430extern DECLSPEC int SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
431
432/**
433 * Get the active cursor.
434 *
435 * This function returns a pointer to the current cursor which is owned by the
436 * library. It is not necessary to free the cursor with SDL_DestroyCursor().
437 *
438 * \returns the active cursor or NULL if there is no mouse.
439 *
440 * \since This function is available since SDL 3.0.0.
441 *
442 * \sa SDL_SetCursor
443 */
444extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
445
446/**
447 * Get the default cursor.
448 *
449 * You do not have to call SDL_DestroyCursor() on the return value, but it is
450 * safe to do so.
451 *
452 * \returns the default cursor on success or NULL on failure.
453 *
454 * \since This function is available since SDL 3.0.0.
455 */
456extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
457
458/**
459 * Free a previously-created cursor.
460 *
461 * Use this function to free cursor resources created with SDL_CreateCursor(),
462 * SDL_CreateColorCursor() or SDL_CreateSystemCursor().
463 *
464 * \param cursor the cursor to free
465 *
466 * \since This function is available since SDL 3.0.0.
467 *
468 * \sa SDL_CreateColorCursor
469 * \sa SDL_CreateCursor
470 * \sa SDL_CreateSystemCursor
471 */
472extern DECLSPEC void SDLCALL SDL_DestroyCursor(SDL_Cursor * cursor);
473
474/**
475 * Show the cursor.
476 *
477 * \returns 0 on success or a negative error code on failure; call
478 * SDL_GetError() for more information.
479 *
480 * \since This function is available since SDL 3.0.0.
481 *
482 * \sa SDL_CursorVisible
483 * \sa SDL_HideCursor
484 */
485extern DECLSPEC int SDLCALL SDL_ShowCursor(void);
486
487/**
488 * Hide the cursor.
489 *
490 * \returns 0 on success or a negative error code on failure; call
491 * SDL_GetError() for more information.
492 *
493 * \since This function is available since SDL 3.0.0.
494 *
495 * \sa SDL_CursorVisible
496 * \sa SDL_ShowCursor
497 */
498extern DECLSPEC int SDLCALL SDL_HideCursor(void);
499
500/**
501 * Return whether the cursor is currently being shown.
502 *
503 * \returns `SDL_TRUE` if the cursor is being shown, or `SDL_FALSE` if the
504 * cursor is hidden.
505 *
506 * \since This function is available since SDL 3.0.0.
507 *
508 * \sa SDL_HideCursor
509 * \sa SDL_ShowCursor
510 */
511extern DECLSPEC SDL_bool SDLCALL SDL_CursorVisible(void);
512
513/**
514 * Used as a mask when testing buttons in buttonstate.
515 *
516 * - Button 1: Left mouse button
517 * - Button 2: Middle mouse button
518 * - Button 3: Right mouse button
519 * - Button 4: Side mouse button 1
520 * - Button 5: Side mouse button 2
521 *
522 * \since This macro is available since SDL 3.0.0.
523 */
524#define SDL_BUTTON(X) (1 << ((X)-1))
525#define SDL_BUTTON_LEFT 1
526#define SDL_BUTTON_MIDDLE 2
527#define SDL_BUTTON_RIGHT 3
528#define SDL_BUTTON_X1 4
529#define SDL_BUTTON_X2 5
530#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
531#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
532#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
533#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
534#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
535
536/* Ends C function definitions when using C++ */
537#ifdef __cplusplus
538}
539#endif
540#include <SDL3/SDL_close_code.h>
541
542#endif /* SDL_mouse_h_ */
void SDL_DestroyCursor(SDL_Cursor *cursor)
SDL_Cursor * SDL_GetCursor(void)
int SDL_HideCursor(void)
Uint32 SDL_GetRelativeMouseState(float *x, float *y)
Uint32 SDL_MouseID
Definition SDL_mouse.h:41
SDL_Window * SDL_GetMouseFocus(void)
int SDL_WarpMouseGlobal(float x, float y)
SDL_bool SDL_GetRelativeMouseMode(void)
SDL_SystemCursor
Definition SDL_mouse.h:51
@ SDL_SYSTEM_CURSOR_WINDOW_TOP
Definition SDL_mouse.h:65
@ SDL_SYSTEM_CURSOR_SIZENS
Definition SDL_mouse.h:60
@ SDL_SYSTEM_CURSOR_HAND
Definition SDL_mouse.h:63
@ SDL_SYSTEM_CURSOR_ARROW
Definition SDL_mouse.h:52
@ SDL_SYSTEM_CURSOR_SIZENWSE
Definition SDL_mouse.h:57
@ SDL_SYSTEM_CURSOR_WINDOW_BOTTOM
Definition SDL_mouse.h:69
@ SDL_SYSTEM_CURSOR_WINDOW_RIGHT
Definition SDL_mouse.h:67
@ SDL_SYSTEM_CURSOR_SIZENESW
Definition SDL_mouse.h:58
@ SDL_SYSTEM_CURSOR_IBEAM
Definition SDL_mouse.h:53
@ SDL_SYSTEM_CURSOR_WINDOW_TOPLEFT
Definition SDL_mouse.h:64
@ SDL_SYSTEM_CURSOR_NO
Definition SDL_mouse.h:62
@ SDL_SYSTEM_CURSOR_WAITARROW
Definition SDL_mouse.h:56
@ SDL_SYSTEM_CURSOR_SIZEALL
Definition SDL_mouse.h:61
@ SDL_SYSTEM_CURSOR_WAIT
Definition SDL_mouse.h:54
@ SDL_NUM_SYSTEM_CURSORS
Definition SDL_mouse.h:72
@ SDL_SYSTEM_CURSOR_SIZEWE
Definition SDL_mouse.h:59
@ SDL_SYSTEM_CURSOR_WINDOW_BOTTOMLEFT
Definition SDL_mouse.h:70
@ SDL_SYSTEM_CURSOR_WINDOW_LEFT
Definition SDL_mouse.h:71
@ SDL_SYSTEM_CURSOR_WINDOW_TOPRIGHT
Definition SDL_mouse.h:66
@ SDL_SYSTEM_CURSOR_CROSSHAIR
Definition SDL_mouse.h:55
@ SDL_SYSTEM_CURSOR_WINDOW_BOTTOMRIGHT
Definition SDL_mouse.h:68
SDL_bool SDL_HasMouse(void)
SDL_bool SDL_CursorVisible(void)
Uint32 SDL_GetGlobalMouseState(float *x, float *y)
struct SDL_Cursor SDL_Cursor
Definition SDL_mouse.h:43
SDL_Cursor * SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y)
Uint32 SDL_GetMouseState(float *x, float *y)
void SDL_WarpMouseInWindow(SDL_Window *window, float x, float y)
SDL_MouseID * SDL_GetMice(int *count)
const char * SDL_GetMouseInstanceName(SDL_MouseID instance_id)
SDL_Cursor * SDL_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y)
int SDL_CaptureMouse(SDL_bool enabled)
SDL_Cursor * SDL_CreateSystemCursor(SDL_SystemCursor id)
SDL_MouseWheelDirection
Definition SDL_mouse.h:81
@ SDL_MOUSEWHEEL_NORMAL
Definition SDL_mouse.h:82
@ SDL_MOUSEWHEEL_FLIPPED
Definition SDL_mouse.h:83
int SDL_SetRelativeMouseMode(SDL_bool enabled)
int SDL_SetCursor(SDL_Cursor *cursor)
int SDL_ShowCursor(void)
SDL_Cursor * SDL_GetDefaultCursor(void)
uint8_t Uint8
Definition SDL_stdinc.h:188
int SDL_bool
Definition SDL_stdinc.h:170
uint32_t Uint32
Definition SDL_stdinc.h:224
struct SDL_Window SDL_Window
Definition SDL_video.h:119