SDL_mouse.h 20 KB

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