Fixed bug 1564 - SDL has no function to open a screen keyboard on Android.
Philipp Wiesemann implemented a general on-screen keyboard API for SDL, and I switched iOS code over to use it.
This commit is contained in:
parent
5570852b58
commit
bf2304785f
19 changed files with 332 additions and 131 deletions
|
@ -171,6 +171,78 @@ extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
|
|||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
|
||||
|
||||
/**
|
||||
* \brief Returns whether the platform has some screen keyboard support.
|
||||
*
|
||||
* \param window The window for which screen keyboard should be checked.
|
||||
*
|
||||
* \return SDL_TRUE if some keyboard support is available else SDL_FALSE.
|
||||
*
|
||||
* \note Not all screen keyboard functions are supported on all platforms.
|
||||
*
|
||||
* \sa SDL_ShowScreenKeyboard()
|
||||
* \sa SDL_HideScreenKeyboard()
|
||||
* \sa SDL_IsScreenKeyboardShown()
|
||||
* \sa SDL_ToggleScreenKeyboard()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(SDL_Window *window);
|
||||
|
||||
/**
|
||||
* \brief Requests to show a screen keyboard for given window.
|
||||
*
|
||||
* \param window The window for which screen keyboard should be shown.
|
||||
*
|
||||
* \return 0 if request will be processed or -1 on error (e.g. no support).
|
||||
*
|
||||
* \note Showing screen keyboards is asynchronous on some platforms.
|
||||
*
|
||||
* \sa SDL_HasScreenKeyboardSupport()
|
||||
* \sa SDL_HideScreenKeyboard()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ShowScreenKeyboard(SDL_Window *window);
|
||||
|
||||
/**
|
||||
* \brief Requests to hide a screen keyboard for given window.
|
||||
*
|
||||
* \param window The window for which screen keyboard should be shown.
|
||||
*
|
||||
* \return 0 if request will be processed or -1 on error (e.g. no support).
|
||||
*
|
||||
* \note Hiding screen keyboards is asynchronous on some platforms.
|
||||
*
|
||||
* \sa SDL_HasScreenKeyboardSupport()
|
||||
* \sa SDL_ShowScreenKeyboard()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_HideScreenKeyboard(SDL_Window *window);
|
||||
|
||||
/**
|
||||
* \brief Requests to toggle a screen keyboard for given window.
|
||||
*
|
||||
* \param window The window for which screen keyboard should be toggled.
|
||||
*
|
||||
* \return 0 if request will be processed or -1 on error (e.g. no support).
|
||||
*
|
||||
* \note Showing and hiding screen keyboards is asynchronous on some platforms.
|
||||
*
|
||||
* \sa SDL_HasScreenKeyboardSupport()
|
||||
* \sa SDL_IsScreenKeyboardShown()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ToggleScreenKeyboard(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* \brief Returns whether the screen keyboard is shown for given window.
|
||||
*
|
||||
* \param window The window for which screen keyboard should be queried.
|
||||
*
|
||||
* \return SDL_TRUE if screen keyboard is shown else SDL_FALSE.
|
||||
*
|
||||
* \note May always return SDL_FALSE on some platforms (not implemented there).
|
||||
*
|
||||
* \sa SDL_HasScreenKeyboardSupport()
|
||||
* \sa SDL_ShowScreenKeyboard()
|
||||
* \sa SDL_HideScreenKeyboard()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue