Mercurial > sdl-ios-xcode
diff src/video/uikit/SDL_uikitview.m @ 3685:64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 21 Jan 2010 06:21:52 +0000 |
parents | b93965a16fe0 |
children | 3e69e077cb95 b15e7017409b |
line wrap: on
line diff
--- a/src/video/uikit/SDL_uikitview.m Thu Jan 21 05:49:41 2010 +0000 +++ b/src/video/uikit/SDL_uikitview.m Thu Jan 21 06:21:52 2010 +0000 @@ -272,9 +272,8 @@ /* iPhone keyboard addition functions */ #if SDL_IPHONE_KEYBOARD -int SDL_iPhoneKeyboardShow(SDL_WindowID windowID) { +int SDL_iPhoneKeyboardShow(SDL_Window * window) { - SDL_Window *window = SDL_GetWindowFromID(windowID); SDL_WindowData *data; SDL_uikitview *view; @@ -296,9 +295,8 @@ } } -int SDL_iPhoneKeyboardHide(SDL_WindowID windowID) { +int SDL_iPhoneKeyboardHide(SDL_Window * window) { - SDL_Window *window = SDL_GetWindowFromID(windowID); SDL_WindowData *data; SDL_uikitview *view; @@ -320,9 +318,8 @@ } } -SDL_bool SDL_iPhoneKeyboardIsShown(SDL_WindowID windowID) { +SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window) { - SDL_Window *window = SDL_GetWindowFromID(windowID); SDL_WindowData *data; SDL_uikitview *view; @@ -343,9 +340,8 @@ } } -int SDL_iPhoneKeyboardToggle(SDL_WindowID windowID) { +int SDL_iPhoneKeyboardToggle(SDL_Window * window) { - SDL_Window *window = SDL_GetWindowFromID(windowID); SDL_WindowData *data; SDL_uikitview *view; @@ -362,11 +358,11 @@ return -1; } else { - if (SDL_iPhoneKeyboardIsShown(windowID)) { - SDL_iPhoneKeyboardHide(windowID); + if (SDL_iPhoneKeyboardIsShown(window)) { + SDL_iPhoneKeyboardHide(window); } else { - SDL_iPhoneKeyboardShow(windowID); + SDL_iPhoneKeyboardShow(window); } return 0; } @@ -376,21 +372,21 @@ /* stubs, used if compiled without keyboard support */ -int SDL_iPhoneKeyboardShow(SDL_WindowID windowID) { +int SDL_iPhoneKeyboardShow(SDL_Window * window) { SDL_SetError("Not compiled with keyboard support"); return -1; } -int SDL_iPhoneKeyboardHide(SDL_WindowID windowID) { +int SDL_iPhoneKeyboardHide(SDL_Window * window) { SDL_SetError("Not compiled with keyboard support"); return -1; } -SDL_bool SDL_iPhoneKeyboardIsShown(SDL_WindowID windowID) { +SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window) { return 0; } -int SDL_iPhoneKeyboardToggle(SDL_WindowID windowID) { +int SDL_iPhoneKeyboardToggle(SDL_Window * window) { SDL_SetError("Not compiled with keyboard support"); return -1; }