SDL_keyboard.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  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. * # CategoryKeyboard
  20. *
  21. * SDL keyboard management.
  22. */
  23. #ifndef SDL_keyboard_h_
  24. #define SDL_keyboard_h_
  25. #include <SDL3/SDL_stdinc.h>
  26. #include <SDL3/SDL_error.h>
  27. #include <SDL3/SDL_keycode.h>
  28. #include <SDL3/SDL_video.h>
  29. #include <SDL3/SDL_begin_code.h>
  30. /* Set up for C function definitions, even when using C++ */
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /**
  35. * This is a unique ID for a keyboard for the time it is connected to the
  36. * system, and is never reused for the lifetime of the application.
  37. *
  38. * If the keyboard is disconnected and reconnected, it will get a new ID.
  39. *
  40. * The ID value starts at 1 and increments from there. The value 0 is an
  41. * invalid ID.
  42. *
  43. * \since This datatype is available since SDL 3.0.0.
  44. */
  45. typedef Uint32 SDL_KeyboardID;
  46. /* Function prototypes */
  47. /**
  48. * Return whether a keyboard is currently connected.
  49. *
  50. * \returns SDL_TRUE if a keyboard is connected, SDL_FALSE otherwise.
  51. *
  52. * \since This function is available since SDL 3.0.0.
  53. *
  54. * \sa SDL_GetKeyboards
  55. */
  56. extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasKeyboard(void);
  57. /**
  58. * Get a list of currently connected keyboards.
  59. *
  60. * Note that this will include any device or virtual driver that includes
  61. * keyboard functionality, including some mice, KVM switches, motherboard
  62. * power buttons, etc. You should wait for input from a device before you
  63. * consider it actively in use.
  64. *
  65. * \param count a pointer filled in with the number of keyboards returned, may
  66. * be NULL.
  67. * \returns a 0 terminated array of keyboards instance IDs or NULL on failure;
  68. * call SDL_GetError() for more information. This should be freed
  69. * with SDL_free() when it is no longer needed.
  70. *
  71. * \since This function is available since SDL 3.0.0.
  72. *
  73. * \sa SDL_GetKeyboardNameForID
  74. * \sa SDL_HasKeyboard
  75. */
  76. extern SDL_DECLSPEC SDL_KeyboardID * SDLCALL SDL_GetKeyboards(int *count);
  77. /**
  78. * Get the name of a keyboard.
  79. *
  80. * This function returns "" if the keyboard doesn't have a name.
  81. *
  82. * \param instance_id the keyboard instance ID.
  83. * \returns the name of the selected keyboard or NULL on failure; call
  84. * SDL_GetError() for more information.
  85. *
  86. * \since This function is available since SDL 3.0.0.
  87. *
  88. * \sa SDL_GetKeyboards
  89. */
  90. extern SDL_DECLSPEC const char * SDLCALL SDL_GetKeyboardNameForID(SDL_KeyboardID instance_id);
  91. /**
  92. * Query the window which currently has keyboard focus.
  93. *
  94. * \returns the window with keyboard focus.
  95. *
  96. * \since This function is available since SDL 3.0.0.
  97. */
  98. extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
  99. /**
  100. * Get a snapshot of the current state of the keyboard.
  101. *
  102. * The pointer returned is a pointer to an internal SDL array. It will be
  103. * valid for the whole lifetime of the application and should not be freed by
  104. * the caller.
  105. *
  106. * A array element with a value of 1 means that the key is pressed and a value
  107. * of 0 means that it is not. Indexes into this array are obtained by using
  108. * SDL_Scancode values.
  109. *
  110. * Use SDL_PumpEvents() to update the state array.
  111. *
  112. * This function gives you the current state after all events have been
  113. * processed, so if a key or button has been pressed and released before you
  114. * process events, then the pressed state will never show up in the
  115. * SDL_GetKeyboardState() calls.
  116. *
  117. * Note: This function doesn't take into account whether shift has been
  118. * pressed or not.
  119. *
  120. * \param numkeys if non-NULL, receives the length of the returned array.
  121. * \returns a pointer to an array of key states.
  122. *
  123. * \since This function is available since SDL 3.0.0.
  124. *
  125. * \sa SDL_PumpEvents
  126. * \sa SDL_ResetKeyboard
  127. */
  128. extern SDL_DECLSPEC const Uint8 * SDLCALL SDL_GetKeyboardState(int *numkeys);
  129. /**
  130. * Clear the state of the keyboard.
  131. *
  132. * This function will generate key up events for all pressed keys.
  133. *
  134. * \since This function is available since SDL 3.0.0.
  135. *
  136. * \sa SDL_GetKeyboardState
  137. */
  138. extern SDL_DECLSPEC void SDLCALL SDL_ResetKeyboard(void);
  139. /**
  140. * Get the current key modifier state for the keyboard.
  141. *
  142. * \returns an OR'd combination of the modifier keys for the keyboard. See
  143. * SDL_Keymod for details.
  144. *
  145. * \since This function is available since SDL 3.0.0.
  146. *
  147. * \sa SDL_GetKeyboardState
  148. * \sa SDL_SetModState
  149. */
  150. extern SDL_DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
  151. /**
  152. * Set the current key modifier state for the keyboard.
  153. *
  154. * The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose
  155. * modifier key states on your application. Simply pass your desired modifier
  156. * states into `modstate`. This value may be a bitwise, OR'd combination of
  157. * SDL_Keymod values.
  158. *
  159. * This does not change the keyboard state, only the key modifier flags that
  160. * SDL reports.
  161. *
  162. * \param modstate the desired SDL_Keymod for the keyboard.
  163. *
  164. * \since This function is available since SDL 3.0.0.
  165. *
  166. * \sa SDL_GetModState
  167. */
  168. extern SDL_DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
  169. /**
  170. * Get the key code corresponding to the given scancode according to the
  171. * current keyboard layout.
  172. *
  173. * If you want to get the keycode as it would be delivered in key events,
  174. * including options specified in SDL_HINT_KEYCODE_OPTIONS, then you should
  175. * pass `key_event` as SDL_TRUE. Otherwise this function simply translates the
  176. * scancode based on the given modifier state.
  177. *
  178. * \param scancode the desired SDL_Scancode to query.
  179. * \param modstate the modifier state to use when translating the scancode to
  180. * a keycode.
  181. * \param key_event SDL_TRUE if the keycode will be used in key events.
  182. * \returns the SDL_Keycode that corresponds to the given SDL_Scancode.
  183. *
  184. * \since This function is available since SDL 3.0.0.
  185. *
  186. * \sa SDL_GetKeyName
  187. * \sa SDL_GetScancodeFromKey
  188. */
  189. extern SDL_DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, SDL_bool key_event);
  190. /**
  191. * Get the scancode corresponding to the given key code according to the
  192. * current keyboard layout.
  193. *
  194. * Note that there may be multiple scancode+modifier states that can generate
  195. * this keycode, this will just return the first one found.
  196. *
  197. * \param key the desired SDL_Keycode to query.
  198. * \param modstate a pointer to the modifier state that would be used when the
  199. * scancode generates this key, may be NULL.
  200. * \returns the SDL_Scancode that corresponds to the given SDL_Keycode.
  201. *
  202. * \since This function is available since SDL 3.0.0.
  203. *
  204. * \sa SDL_GetKeyFromScancode
  205. * \sa SDL_GetScancodeName
  206. */
  207. extern SDL_DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key, SDL_Keymod *modstate);
  208. /**
  209. * Set a human-readable name for a scancode.
  210. *
  211. * \param scancode the desired SDL_Scancode.
  212. * \param name the name to use for the scancode, encoded as UTF-8. The string
  213. * is not copied, so the pointer given to this function must stay
  214. * valid while SDL is being used.
  215. * \returns 0 on success or a negative error code on failure; call
  216. * SDL_GetError() for more information.
  217. *
  218. * \since This function is available since SDL 3.0.0.
  219. *
  220. * \sa SDL_GetScancodeName
  221. */
  222. extern SDL_DECLSPEC int SDLCALL SDL_SetScancodeName(SDL_Scancode scancode, const char *name);
  223. /**
  224. * Get a human-readable name for a scancode.
  225. *
  226. * **Warning**: The returned name is by design not stable across platforms,
  227. * e.g. the name for `SDL_SCANCODE_LGUI` is "Left GUI" under Linux but "Left
  228. * Windows" under Microsoft Windows, and some scancodes like
  229. * `SDL_SCANCODE_NONUSBACKSLASH` don't have any name at all. There are even
  230. * scancodes that share names, e.g. `SDL_SCANCODE_RETURN` and
  231. * `SDL_SCANCODE_RETURN2` (both called "Return"). This function is therefore
  232. * unsuitable for creating a stable cross-platform two-way mapping between
  233. * strings and scancodes.
  234. *
  235. * \param scancode the desired SDL_Scancode to query.
  236. * \returns a pointer to the name for the scancode. If the scancode doesn't
  237. * have a name this function returns an empty string ("").
  238. *
  239. * \since This function is available since SDL 3.0.0.
  240. *
  241. * \sa SDL_GetScancodeFromKey
  242. * \sa SDL_GetScancodeFromName
  243. * \sa SDL_SetScancodeName
  244. */
  245. extern SDL_DECLSPEC const char * SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
  246. /**
  247. * Get a scancode from a human-readable name.
  248. *
  249. * \param name the human-readable scancode name.
  250. * \returns the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't
  251. * recognized; call SDL_GetError() for more information.
  252. *
  253. * \since This function is available since SDL 3.0.0.
  254. *
  255. * \sa SDL_GetKeyFromName
  256. * \sa SDL_GetScancodeFromKey
  257. * \sa SDL_GetScancodeName
  258. */
  259. extern SDL_DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
  260. /**
  261. * Get a human-readable name for a key.
  262. *
  263. * If the key doesn't have a name, this function returns an empty string ("").
  264. *
  265. * \param key the desired SDL_Keycode to query.
  266. * \param uppercase SDL_TRUE if the name should be the letter printed on the
  267. * key on the keyboard, which is usually uppercase, or
  268. * SDL_FALSE to return the name of the key unchanged.
  269. * \returns a UTF-8 encoded string of the key name.
  270. *
  271. * \since This function is available since SDL 3.0.0.
  272. *
  273. * \sa SDL_GetKeyFromName
  274. * \sa SDL_GetKeyFromScancode
  275. * \sa SDL_GetScancodeFromKey
  276. */
  277. extern SDL_DECLSPEC const char * SDLCALL SDL_GetKeyName(SDL_Keycode key, SDL_bool uppercase);
  278. /**
  279. * Get a key code from a human-readable name.
  280. *
  281. * \param name the human-readable key name.
  282. * \param uppercase SDL_TRUE if the name is the letter printed on the key on
  283. * the keyboard, which is usually uppercase, and this
  284. * function should return the unshifted version of the key,
  285. * or SDL_FALSE to return the key unchanged.
  286. * \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
  287. * SDL_GetError() for more information.
  288. *
  289. * \since This function is available since SDL 3.0.0.
  290. *
  291. * \sa SDL_GetKeyFromScancode
  292. * \sa SDL_GetKeyName
  293. * \sa SDL_GetScancodeFromName
  294. */
  295. extern SDL_DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name, SDL_bool uppercase);
  296. /**
  297. * Start accepting Unicode text input events in a window.
  298. *
  299. * This function will enable text input (SDL_EVENT_TEXT_INPUT and
  300. * SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this
  301. * function paired with SDL_StopTextInput().
  302. *
  303. * Text input events are not received by default.
  304. *
  305. * On some platforms using this function shows the screen keyboard.
  306. *
  307. * \param window the window to enable text input.
  308. * \returns 0 on success or a negative error code on failure; call
  309. * SDL_GetError() for more information.
  310. *
  311. * \since This function is available since SDL 3.0.0.
  312. *
  313. * \sa SDL_SetTextInputArea
  314. * \sa SDL_StartTextInputWithProperties
  315. * \sa SDL_StopTextInput
  316. * \sa SDL_TextInputActive
  317. */
  318. extern SDL_DECLSPEC int SDLCALL SDL_StartTextInput(SDL_Window *window);
  319. /**
  320. * Text input type.
  321. *
  322. * These are the valid values for SDL_PROP_TEXTINPUT_TYPE_NUMBER. Not every
  323. * value is valid on every platform, but where a value isn't supported, a
  324. * reasonable fallback will be used.
  325. *
  326. * \since This enum is available since SDL 3.0.0.
  327. *
  328. * \sa SDL_StartTextInputWithProperties
  329. */
  330. typedef enum SDL_TextInputType
  331. {
  332. SDL_TEXTINPUT_TYPE_TEXT, /**< The input is text */
  333. SDL_TEXTINPUT_TYPE_TEXT_NAME, /**< The input is a person's name */
  334. SDL_TEXTINPUT_TYPE_TEXT_EMAIL, /**< The input is an e-mail address */
  335. SDL_TEXTINPUT_TYPE_TEXT_USERNAME, /**< The input is a username */
  336. SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_HIDDEN, /**< The input is a secure password that is hidden */
  337. SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_VISIBLE, /**< The input is a secure password that is visible */
  338. SDL_TEXTINPUT_TYPE_NUMBER, /**< The input is a number */
  339. SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN, /**< The input is a secure PIN that is hidden */
  340. SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_VISIBLE /**< The input is a secure PIN that is visible */
  341. } SDL_TextInputType;
  342. /**
  343. * Auto capitalization type.
  344. *
  345. * These are the valid values for
  346. * SDL_PROP_TEXTINPUT_AUTOCAPITALIZATION_NUMBER. Not every value is valid on
  347. * every platform, but where a value isn't supported, a reasonable fallback
  348. * will be used.
  349. *
  350. * \since This enum is available since SDL 3.0.0.
  351. *
  352. * \sa SDL_StartTextInputWithProperties
  353. */
  354. typedef enum SDL_Capitalization
  355. {
  356. SDL_CAPITALIZE_NONE, /**< No auto-capitalization will be done */
  357. SDL_CAPITALIZE_SENTENCES, /**< The first letter of sentences will be capitalized */
  358. SDL_CAPITALIZE_WORDS, /**< The first letter of words will be capitalized */
  359. SDL_CAPITALIZE_LETTERS /**< All letters will be capitalized */
  360. } SDL_Capitalization;
  361. /**
  362. * Start accepting Unicode text input events in a window, with properties
  363. * describing the input.
  364. *
  365. * This function will enable text input (SDL_EVENT_TEXT_INPUT and
  366. * SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this
  367. * function paired with SDL_StopTextInput().
  368. *
  369. * Text input events are not received by default.
  370. *
  371. * On some platforms using this function shows the screen keyboard.
  372. *
  373. * These are the supported properties:
  374. *
  375. * - `SDL_PROP_TEXTINPUT_TYPE_NUMBER` - an SDL_TextInputType value that
  376. * describes text being input, defaults to SDL_TEXTINPUT_TYPE_TEXT.
  377. * - `SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER` - an SDL_Capitalization value
  378. * that describes how text should be capitalized, defaults to
  379. * SDL_CAPITALIZE_SENTENCES for normal text entry, SDL_CAPITALIZE_WORDS for
  380. * SDL_TEXTINPUT_TYPE_TEXT_NAME, and SDL_CAPITALIZE_NONE for e-mail
  381. * addresses, usernames, and passwords.
  382. * - `SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN` - true to enable auto completion
  383. * and auto correction, defaults to SDL_TRUE.
  384. * - `SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN` - true if multiple lines of text
  385. * are allowed. This defaults to SDL_TRUE if SDL_HINT_RETURN_KEY_HIDES_IME
  386. * is "0" or is not set, and defaults to SDL_FALSE if
  387. * SDL_HINT_RETURN_KEY_HIDES_IME is "1".
  388. *
  389. * On Android you can directly specify the input type:
  390. *
  391. * - `SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER` - the text input type to
  392. * use, overriding other properties. This is documented at
  393. * https://developer.android.com/reference/android/text/InputType
  394. *
  395. * \param window the window to enable text input.
  396. * \param props the properties to use.
  397. * \returns 0 on success or a negative error code on failure; call
  398. * SDL_GetError() for more information.
  399. *
  400. * \since This function is available since SDL 3.0.0.
  401. *
  402. * \sa SDL_SetTextInputArea
  403. * \sa SDL_StartTextInput
  404. * \sa SDL_StopTextInput
  405. * \sa SDL_TextInputActive
  406. */
  407. extern SDL_DECLSPEC int SDLCALL SDL_StartTextInputWithProperties(SDL_Window *window, SDL_PropertiesID props);
  408. #define SDL_PROP_TEXTINPUT_TYPE_NUMBER "SDL.textinput.type"
  409. #define SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER "SDL.textinput.capitalization"
  410. #define SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN "SDL.textinput.autocorrect"
  411. #define SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN "SDL.textinput.multiline"
  412. #define SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER "SDL.textinput.android.inputtype"
  413. /**
  414. * Check whether or not Unicode text input events are enabled for a window.
  415. *
  416. * \param window the window to check.
  417. * \returns SDL_TRUE if text input events are enabled else SDL_FALSE.
  418. *
  419. * \since This function is available since SDL 3.0.0.
  420. *
  421. * \sa SDL_StartTextInput
  422. */
  423. extern SDL_DECLSPEC SDL_bool SDLCALL SDL_TextInputActive(SDL_Window *window);
  424. /**
  425. * Stop receiving any text input events in a window.
  426. *
  427. * If SDL_StartTextInput() showed the screen keyboard, this function will hide
  428. * it.
  429. *
  430. * \param window the window to disable text input.
  431. * \returns 0 on success or a negative error code on failure; call
  432. * SDL_GetError() for more information.
  433. *
  434. * \since This function is available since SDL 3.0.0.
  435. *
  436. * \sa SDL_StartTextInput
  437. */
  438. extern SDL_DECLSPEC int SDLCALL SDL_StopTextInput(SDL_Window *window);
  439. /**
  440. * Dismiss the composition window/IME without disabling the subsystem.
  441. *
  442. * \param window the window to affect.
  443. * \returns 0 on success or a negative error code on failure; call
  444. * SDL_GetError() for more information.
  445. *
  446. * \since This function is available since SDL 3.0.0.
  447. *
  448. * \sa SDL_StartTextInput
  449. * \sa SDL_StopTextInput
  450. */
  451. extern SDL_DECLSPEC int SDLCALL SDL_ClearComposition(SDL_Window *window);
  452. /**
  453. * Set the area used to type Unicode text input.
  454. *
  455. * Native input methods may place a window with word suggestions near the
  456. * cursor, without covering the text being entered.
  457. *
  458. * \param window the window for which to set the text input area.
  459. * \param rect the SDL_Rect representing the text input area, in window
  460. * coordinates, or NULL to clear it.
  461. * \param cursor the offset of the current cursor location relative to
  462. * `rect->x`, in window coordinates.
  463. * \returns 0 on success or a negative error code on failure; call
  464. * SDL_GetError() for more information.
  465. *
  466. * \since This function is available since SDL 3.0.0.
  467. *
  468. * \sa SDL_GetTextInputArea
  469. * \sa SDL_StartTextInput
  470. */
  471. extern SDL_DECLSPEC int SDLCALL SDL_SetTextInputArea(SDL_Window *window, const SDL_Rect *rect, int cursor);
  472. /**
  473. * Get the area used to type Unicode text input.
  474. *
  475. * This returns the values previously set by SDL_SetTextInputArea().
  476. *
  477. * \param window the window for which to query the text input area.
  478. * \param rect a pointer to an SDL_Rect filled in with the text input area,
  479. * may be NULL.
  480. * \param cursor a pointer to the offset of the current cursor location
  481. * relative to `rect->x`, may be NULL.
  482. * \returns 0 on success or a negative error code on failure; call
  483. * SDL_GetError() for more information.
  484. *
  485. * \since This function is available since SDL 3.0.0.
  486. *
  487. * \sa SDL_SetTextInputArea
  488. */
  489. extern SDL_DECLSPEC int SDLCALL SDL_GetTextInputArea(SDL_Window *window, SDL_Rect *rect, int *cursor);
  490. /**
  491. * Check whether the platform has screen keyboard support.
  492. *
  493. * \returns SDL_TRUE if the platform has some screen keyboard support or
  494. * SDL_FALSE if not.
  495. *
  496. * \since This function is available since SDL 3.0.0.
  497. *
  498. * \sa SDL_StartTextInput
  499. * \sa SDL_ScreenKeyboardShown
  500. */
  501. extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
  502. /**
  503. * Check whether the screen keyboard is shown for given window.
  504. *
  505. * \param window the window for which screen keyboard should be queried.
  506. * \returns SDL_TRUE if screen keyboard is shown or SDL_FALSE if not.
  507. *
  508. * \since This function is available since SDL 3.0.0.
  509. *
  510. * \sa SDL_HasScreenKeyboardSupport
  511. */
  512. extern SDL_DECLSPEC SDL_bool SDLCALL SDL_ScreenKeyboardShown(SDL_Window *window);
  513. /* Ends C function definitions when using C++ */
  514. #ifdef __cplusplus
  515. }
  516. #endif
  517. #include <SDL3/SDL_close_code.h>
  518. #endif /* SDL_keyboard_h_ */