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:
Sam Lantinga 2012-08-11 10:15:59 -07:00
parent 5570852b58
commit bf2304785f
19 changed files with 332 additions and 131 deletions

View file

@ -12,13 +12,6 @@
static SDL_Texture *texture; /* texture where we'll hold our font */
/* iPhone SDL addition keyboard related function definitions */
extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardShow(SDL_Window * window);
extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardHide(SDL_Window * window);
extern DECLSPEC SDL_bool SDLCALL SDL_iPhoneKeyboardIsShown(SDL_Window *
window);
extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardToggle(SDL_Window * window);
/* function declarations */
void cleanup(void);
void drawBlank(int x, int y);
@ -296,14 +289,10 @@ main(int argc, char *argv[])
/* draw our updates to the screen */
SDL_RenderPresent(renderer);
break;
#ifdef __IPHONEOS__
case SDL_MOUSEBUTTONUP:
/* mouse up toggles onscreen keyboard visibility
this function is available ONLY on iPhone OS
*/
SDL_iPhoneKeyboardToggle(window);
/* mouse up toggles onscreen keyboard visibility */
SDL_ToggleScreenKeyboard(window);
break;
#endif
}
}
cleanup();