Fixed bug 1564 - SDL has no function to open a screen keyboard on Android.
authorSam Lantinga <slouken@libsdl.org>
Sat, 11 Aug 2012 10:15:59 -0700
changeset 6392fa7eb111f994
parent 6391 ae8952e7e769
child 6393 a773384edf20
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.
README.iOS
Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
Xcode-iOS/Demos/src/keyboard.c
Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
android-project/AndroidManifest.xml
android-project/src/org/libsdl/app/SDLActivity.java
include/SDL_keyboard.h
include/SDL_system.h
src/core/android/SDL_android.cpp
src/core/android/SDL_android.h
src/video/SDL_sysvideo.h
src/video/SDL_video.c
src/video/android/SDL_androidkeyboard.c
src/video/android/SDL_androidkeyboard.h
src/video/android/SDL_androidvideo.c
src/video/uikit/SDL_uikitvideo.m
src/video/uikit/SDL_uikitview.h
src/video/uikit/SDL_uikitview.m
test/checkkeys.c
     1.1 --- a/README.iOS	Thu Aug 09 15:43:39 2012 -0400
     1.2 +++ b/README.iOS	Sat Aug 11 10:15:59 2012 -0700
     1.3 @@ -78,15 +78,15 @@
     1.4  Notes -- Keyboard
     1.5  ==============================================================================
     1.6  
     1.7 -SDL for iPhone contains several additional functions related to keyboard visibility.  These functions are not part of the SDL standard API, but are necessary for revealing and hiding the iPhone's virtual onscreen keyboard.
     1.8 +The SDL keyboard API has been extended to support on-screen keyboards:
     1.9  
    1.10 -int SDL_iPhoneKeyboardShow(SDL_Window * window) 
    1.11 +int SDL_ShowScreenKeyboard(SDL_Window * window) 
    1.12  	-- reveals the onscreen keyboard.  Returns 0 on success and -1 on error.
    1.13 -int SDL_iPhoneKeyboardHide(SDL_Window * window) 
    1.14 +int SDL_HideScreenKeyboard(SDL_Window * window) 
    1.15  	-- hides the onscreen keyboard.  Returns 0 on success and -1 on error.
    1.16 -SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window) 
    1.17 +SDL_bool SDL_IsScreenKeyboardShown(SDL_Window * window) 
    1.18  	-- returns whether or not the onscreen keyboard is currently visible.
    1.19 -int SDL_iPhoneKeyboardToggle(SDL_Window * window) 	
    1.20 +int SDL_ToggleScreenKeyboard(SDL_Window * window) 	
    1.21  	-- toggles the visibility of the onscreen keyboard.  Returns 0 on success and -1 on error.
    1.22  
    1.23  ==============================================================================
     2.1 --- a/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj	Thu Aug 09 15:43:39 2012 -0400
     2.2 +++ b/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj	Sat Aug 11 10:15:59 2012 -0700
     2.3 @@ -15,12 +15,12 @@
     2.4  		FD15FD6B0E086911003BDF25 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
     2.5  		FD15FD6C0E086911003BDF25 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
     2.6  		FD15FD6D0E086911003BDF25 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
     2.7 -		FD1B48DD0E313255007AB34E /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL.a */; };
     2.8 -		FD1B49980E313261007AB34E /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL.a */; };
     2.9 -		FD1B499C0E313269007AB34E /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL.a */; };
    2.10 -		FD1B499E0E31326C007AB34E /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL.a */; };
    2.11 -		FD1B49A00E313270007AB34E /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL.a */; };
    2.12 -		FD1B49A20E313273007AB34E /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL.a */; };
    2.13 +		FD1B48DD0E313255007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
    2.14 +		FD1B49980E313261007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
    2.15 +		FD1B499C0E313269007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
    2.16 +		FD1B499E0E31326C007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
    2.17 +		FD1B49A00E313270007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
    2.18 +		FD1B49A20E313273007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
    2.19  		FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
    2.20  		FD5F9CE90E0E0741008E885B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
    2.21  		FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
    2.22 @@ -56,7 +56,7 @@
    2.23  		FDB651FA0E43D1F300F688B5 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
    2.24  		FDB651FB0E43D1F300F688B5 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD787AA00E22A5CC003E8E36 /* Default.png */; };
    2.25  		FDB651FD0E43D1F300F688B5 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
    2.26 -		FDB652000E43D1F300F688B5 /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL.a */; };
    2.27 +		FDB652000E43D1F300F688B5 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
    2.28  		FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
    2.29  		FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
    2.30  		FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
    2.31 @@ -215,7 +215,7 @@
    2.32  			isa = PBXFrameworksBuildPhase;
    2.33  			buildActionMask = 2147483647;
    2.34  			files = (
    2.35 -				FD1B48DD0E313255007AB34E /* libSDL.a in Frameworks */,
    2.36 +				FD1B48DD0E313255007AB34E /* libSDL2.a in Frameworks */,
    2.37  				FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */,
    2.38  				FDF0D7AC0E12D53800247964 /* AudioToolbox.framework in Frameworks */,
    2.39  				1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
    2.40 @@ -230,7 +230,7 @@
    2.41  			isa = PBXFrameworksBuildPhase;
    2.42  			buildActionMask = 2147483647;
    2.43  			files = (
    2.44 -				FD1B49980E313261007AB34E /* libSDL.a in Frameworks */,
    2.45 +				FD1B49980E313261007AB34E /* libSDL2.a in Frameworks */,
    2.46  				FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */,
    2.47  				FDF0D7AA0E12D53500247964 /* AudioToolbox.framework in Frameworks */,
    2.48  				FD15FD690E086911003BDF25 /* Foundation.framework in Frameworks */,
    2.49 @@ -245,7 +245,7 @@
    2.50  			isa = PBXFrameworksBuildPhase;
    2.51  			buildActionMask = 2147483647;
    2.52  			files = (
    2.53 -				FD1B499C0E313269007AB34E /* libSDL.a in Frameworks */,
    2.54 +				FD1B499C0E313269007AB34E /* libSDL2.a in Frameworks */,
    2.55  				FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */,
    2.56  				FDF0D7A80E12D53200247964 /* AudioToolbox.framework in Frameworks */,
    2.57  				FD5F9CEB0E0E0741008E885B /* OpenGLES.framework in Frameworks */,
    2.58 @@ -260,7 +260,7 @@
    2.59  			isa = PBXFrameworksBuildPhase;
    2.60  			buildActionMask = 2147483647;
    2.61  			files = (
    2.62 -				FDB652000E43D1F300F688B5 /* libSDL.a in Frameworks */,
    2.63 +				FDB652000E43D1F300F688B5 /* libSDL2.a in Frameworks */,
    2.64  				FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */,
    2.65  				FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */,
    2.66  				FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */,
    2.67 @@ -275,7 +275,7 @@
    2.68  			isa = PBXFrameworksBuildPhase;
    2.69  			buildActionMask = 2147483647;
    2.70  			files = (
    2.71 -				FD1B499E0E31326C007AB34E /* libSDL.a in Frameworks */,
    2.72 +				FD1B499E0E31326C007AB34E /* libSDL2.a in Frameworks */,
    2.73  				FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */,
    2.74  				FDF0D7960E12D52900247964 /* AudioToolbox.framework in Frameworks */,
    2.75  				FDC202E60E107B1200ABAC90 /* Foundation.framework in Frameworks */,
    2.76 @@ -290,7 +290,7 @@
    2.77  			isa = PBXFrameworksBuildPhase;
    2.78  			buildActionMask = 2147483647;
    2.79  			files = (
    2.80 -				FD1B49A20E313273007AB34E /* libSDL.a in Frameworks */,
    2.81 +				FD1B49A20E313273007AB34E /* libSDL2.a in Frameworks */,
    2.82  				FDC52ED40E2843D6008D768C /* Foundation.framework in Frameworks */,
    2.83  				FDC52ED50E2843D6008D768C /* UIKit.framework in Frameworks */,
    2.84  				FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */,
    2.85 @@ -305,7 +305,7 @@
    2.86  			isa = PBXFrameworksBuildPhase;
    2.87  			buildActionMask = 2147483647;
    2.88  			files = (
    2.89 -				FD1B49A00E313270007AB34E /* libSDL.a in Frameworks */,
    2.90 +				FD1B49A00E313270007AB34E /* libSDL2.a in Frameworks */,
    2.91  				FDF0D69C0E12D05400247964 /* Foundation.framework in Frameworks */,
    2.92  				FDF0D69D0E12D05400247964 /* UIKit.framework in Frameworks */,
    2.93  				FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */,
    2.94 @@ -607,7 +607,7 @@
    2.95  		FD1B489E0E313154007AB34E /* libSDL.a */ = {
    2.96  			isa = PBXReferenceProxy;
    2.97  			fileType = archive.ar;
    2.98 -			path = libSDL.a;
    2.99 +			path = libSDL2.a;
   2.100  			remoteRef = FD1B489D0E313154007AB34E /* PBXContainerItemProxy */;
   2.101  			sourceTree = BUILT_PRODUCTS_DIR;
   2.102  		};
     3.1 --- a/Xcode-iOS/Demos/src/keyboard.c	Thu Aug 09 15:43:39 2012 -0400
     3.2 +++ b/Xcode-iOS/Demos/src/keyboard.c	Sat Aug 11 10:15:59 2012 -0700
     3.3 @@ -12,13 +12,6 @@
     3.4  
     3.5  static SDL_Texture *texture; /* texture where we'll hold our font */
     3.6  
     3.7 -/* iPhone SDL addition keyboard related function definitions */
     3.8 -extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardShow(SDL_Window * window);
     3.9 -extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardHide(SDL_Window * window);
    3.10 -extern DECLSPEC SDL_bool SDLCALL SDL_iPhoneKeyboardIsShown(SDL_Window *
    3.11 -                                                           window);
    3.12 -extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardToggle(SDL_Window * window);
    3.13 -
    3.14  /* function declarations */
    3.15  void cleanup(void);
    3.16  void drawBlank(int x, int y);
    3.17 @@ -296,14 +289,10 @@
    3.18              /* draw our updates to the screen */
    3.19              SDL_RenderPresent(renderer);
    3.20              break;
    3.21 -#ifdef __IPHONEOS__
    3.22          case SDL_MOUSEBUTTONUP:
    3.23 -            /*      mouse up toggles onscreen keyboard visibility
    3.24 -               this function is available ONLY on iPhone OS
    3.25 -             */
    3.26 -            SDL_iPhoneKeyboardToggle(window);
    3.27 +            /*      mouse up toggles onscreen keyboard visibility */
    3.28 +            SDL_ToggleScreenKeyboard(window);
    3.29              break;
    3.30 -#endif
    3.31          }
    3.32      }
    3.33      cleanup();
     4.1 --- a/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj	Thu Aug 09 15:43:39 2012 -0400
     4.2 +++ b/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj	Sat Aug 11 10:15:59 2012 -0700
     4.3 @@ -8,7 +8,7 @@
     4.4  
     4.5  /* Begin PBXBuildFile section */
     4.6  		046CEF7713254F23007AD51D /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
     4.7 -		046CEF7B13254F23007AD51D /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
     4.8 +		046CEF7B13254F23007AD51D /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
     4.9  		046CEF7C13254F23007AD51D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
    4.10  		046CEF7D13254F23007AD51D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
    4.11  		046CEF7E13254F23007AD51D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
    4.12 @@ -17,7 +17,7 @@
    4.13  		046CEF8113254F23007AD51D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
    4.14  		046CEF8213254F23007AD51D /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
    4.15  		046CEF8A13254F63007AD51D /* testgesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 046CEF8913254F63007AD51D /* testgesture.c */; };
    4.16 -		047A63E213285C3200CD7973 /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.17 +		047A63E213285C3200CD7973 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.18  		047A63E313285C3200CD7973 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
    4.19  		047A63E413285C3200CD7973 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
    4.20  		047A63E513285C3200CD7973 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
    4.21 @@ -27,7 +27,7 @@
    4.22  		047A63E913285C3200CD7973 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
    4.23  		047A63F113285CD100CD7973 /* checkkeys.c in Sources */ = {isa = PBXBuildFile; fileRef = 047A63F013285CD100CD7973 /* checkkeys.c */; };
    4.24  		56ED04FE118A8FE400A56AA6 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
    4.25 -		56ED0502118A8FE400A56AA6 /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.26 +		56ED0502118A8FE400A56AA6 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.27  		56ED0503118A8FE400A56AA6 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
    4.28  		56ED0504118A8FE400A56AA6 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
    4.29  		56ED0505118A8FE400A56AA6 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
    4.30 @@ -38,7 +38,7 @@
    4.31  		56ED0511118A904200A56AA6 /* testpower.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED0510118A904200A56AA6 /* testpower.c */; };
    4.32  		AAE7DEDC14CBB1E100DF1A0E /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
    4.33  		AAE7DEDE14CBB1E100DF1A0E /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7840E2D0F1F00EA573E /* common.c */; };
    4.34 -		AAE7DEE114CBB1E100DF1A0E /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.35 +		AAE7DEE114CBB1E100DF1A0E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.36  		AAE7DEE214CBB1E100DF1A0E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
    4.37  		AAE7DEE314CBB1E100DF1A0E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
    4.38  		AAE7DEE414CBB1E100DF1A0E /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
    4.39 @@ -51,7 +51,7 @@
    4.40  		AAE7DFA014CBB54E00DF1A0E /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
    4.41  		AAE7DFA114CBB54E00DF1A0E /* sample.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AADE0E2D33C100EA573E /* sample.bmp */; };
    4.42  		AAE7DFA314CBB54E00DF1A0E /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7840E2D0F1F00EA573E /* common.c */; };
    4.43 -		AAE7DFA614CBB54E00DF1A0E /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.44 +		AAE7DFA614CBB54E00DF1A0E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.45  		AAE7DFA714CBB54E00DF1A0E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
    4.46  		AAE7DFA814CBB54E00DF1A0E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
    4.47  		AAE7DFA914CBB54E00DF1A0E /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
    4.48 @@ -112,24 +112,24 @@
    4.49  		FDAAC62A0E2D5960001DB1D8 /* testgles.c in Sources */ = {isa = PBXBuildFile; fileRef = FDAAC6290E2D5960001DB1D8 /* testgles.c */; };
    4.50  		FDAAC6390E2D59BE001DB1D8 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
    4.51  		FDAAC7780E2D7024001DB1D8 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7840E2D0F1F00EA573E /* common.c */; };
    4.52 -		FDBDE57C0E313445006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.53 -		FDBDE5810E313465006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.54 -		FDBDE5850E313495006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.55 -		FDBDE58C0E3134F3006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.56 -		FDBDE59B0E31356A006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.57 -		FDBDE59F0E31358D006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.58 -		FDBDE5A90E3135C0006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.59 -		FDBDE5AE0E3135E6006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.60 -		FDBDE5B60E3135FE006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.61 -		FDBDE5BC0E31364D006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.62 -		FDBDE5C20E313663006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.63 -		FDBDE5C60E3136F1006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.64 -		FDBDE5C80E313702006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.65 -		FDBDE5CA0E313712006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.66 -		FDBDE5CC0E31372B006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.67 -		FDBDE5CE0E31373E006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.68 -		FDBDE5D40E313789006BAC0B /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.69 -		FDC42FF40F0D866D009C87E1 /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL.a */; };
    4.70 +		FDBDE57C0E313445006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.71 +		FDBDE5810E313465006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.72 +		FDBDE5850E313495006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.73 +		FDBDE58C0E3134F3006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.74 +		FDBDE59B0E31356A006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.75 +		FDBDE59F0E31358D006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.76 +		FDBDE5A90E3135C0006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.77 +		FDBDE5AE0E3135E6006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.78 +		FDBDE5B60E3135FE006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.79 +		FDBDE5BC0E31364D006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.80 +		FDBDE5C20E313663006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.81 +		FDBDE5C60E3136F1006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.82 +		FDBDE5C80E313702006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.83 +		FDBDE5CA0E313712006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.84 +		FDBDE5CC0E31372B006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.85 +		FDBDE5CE0E31373E006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.86 +		FDBDE5D40E313789006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.87 +		FDC42FF40F0D866D009C87E1 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
    4.88  		FDC42FF60F0D866D009C87E1 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
    4.89  		FDC42FF70F0D866D009C87E1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
    4.90  		FDC42FF80F0D866D009C87E1 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
    4.91 @@ -322,7 +322,7 @@
    4.92  			isa = PBXFrameworksBuildPhase;
    4.93  			buildActionMask = 2147483647;
    4.94  			files = (
    4.95 -				046CEF7B13254F23007AD51D /* libSDL.a in Frameworks */,
    4.96 +				046CEF7B13254F23007AD51D /* libSDL2.a in Frameworks */,
    4.97  				046CEF7C13254F23007AD51D /* AudioToolbox.framework in Frameworks */,
    4.98  				046CEF7D13254F23007AD51D /* QuartzCore.framework in Frameworks */,
    4.99  				046CEF7E13254F23007AD51D /* OpenGLES.framework in Frameworks */,
   4.100 @@ -337,7 +337,7 @@
   4.101  			isa = PBXFrameworksBuildPhase;
   4.102  			buildActionMask = 2147483647;
   4.103  			files = (
   4.104 -				047A63E213285C3200CD7973 /* libSDL.a in Frameworks */,
   4.105 +				047A63E213285C3200CD7973 /* libSDL2.a in Frameworks */,
   4.106  				047A63E313285C3200CD7973 /* AudioToolbox.framework in Frameworks */,
   4.107  				047A63E413285C3200CD7973 /* QuartzCore.framework in Frameworks */,
   4.108  				047A63E513285C3200CD7973 /* OpenGLES.framework in Frameworks */,
   4.109 @@ -352,7 +352,7 @@
   4.110  			isa = PBXFrameworksBuildPhase;
   4.111  			buildActionMask = 2147483647;
   4.112  			files = (
   4.113 -				FDBDE5810E313465006BAC0B /* libSDL.a in Frameworks */,
   4.114 +				FDBDE5810E313465006BAC0B /* libSDL2.a in Frameworks */,
   4.115  				FDA8A89F0E2D111A00EA573E /* AudioToolbox.framework in Frameworks */,
   4.116  				FDA8A8A00E2D111A00EA573E /* QuartzCore.framework in Frameworks */,
   4.117  				FDA8A8A10E2D111A00EA573E /* OpenGLES.framework in Frameworks */,
   4.118 @@ -367,7 +367,7 @@
   4.119  			isa = PBXFrameworksBuildPhase;
   4.120  			buildActionMask = 2147483647;
   4.121  			files = (
   4.122 -				56ED0502118A8FE400A56AA6 /* libSDL.a in Frameworks */,
   4.123 +				56ED0502118A8FE400A56AA6 /* libSDL2.a in Frameworks */,
   4.124  				56ED0503118A8FE400A56AA6 /* AudioToolbox.framework in Frameworks */,
   4.125  				56ED0504118A8FE400A56AA6 /* QuartzCore.framework in Frameworks */,
   4.126  				56ED0505118A8FE400A56AA6 /* OpenGLES.framework in Frameworks */,
   4.127 @@ -382,7 +382,7 @@
   4.128  			isa = PBXFrameworksBuildPhase;
   4.129  			buildActionMask = 2147483647;
   4.130  			files = (
   4.131 -				AAE7DEE114CBB1E100DF1A0E /* libSDL.a in Frameworks */,
   4.132 +				AAE7DEE114CBB1E100DF1A0E /* libSDL2.a in Frameworks */,
   4.133  				AAE7DEE214CBB1E100DF1A0E /* AudioToolbox.framework in Frameworks */,
   4.134  				AAE7DEE314CBB1E100DF1A0E /* QuartzCore.framework in Frameworks */,
   4.135  				AAE7DEE414CBB1E100DF1A0E /* OpenGLES.framework in Frameworks */,
   4.136 @@ -397,7 +397,7 @@
   4.137  			isa = PBXFrameworksBuildPhase;
   4.138  			buildActionMask = 2147483647;
   4.139  			files = (
   4.140 -				AAE7DFA614CBB54E00DF1A0E /* libSDL.a in Frameworks */,
   4.141 +				AAE7DFA614CBB54E00DF1A0E /* libSDL2.a in Frameworks */,
   4.142  				AAE7DFA714CBB54E00DF1A0E /* AudioToolbox.framework in Frameworks */,
   4.143  				AAE7DFA814CBB54E00DF1A0E /* QuartzCore.framework in Frameworks */,
   4.144  				AAE7DFA914CBB54E00DF1A0E /* OpenGLES.framework in Frameworks */,
   4.145 @@ -412,7 +412,7 @@
   4.146  			isa = PBXFrameworksBuildPhase;
   4.147  			buildActionMask = 2147483647;
   4.148  			files = (
   4.149 -				FDBDE5850E313495006BAC0B /* libSDL.a in Frameworks */,
   4.150 +				FDBDE5850E313495006BAC0B /* libSDL2.a in Frameworks */,
   4.151  				FDA8AAB10E2D330F00EA573E /* AudioToolbox.framework in Frameworks */,
   4.152  				FDA8AAB20E2D330F00EA573E /* QuartzCore.framework in Frameworks */,
   4.153  				FDA8AAB30E2D330F00EA573E /* OpenGLES.framework in Frameworks */,
   4.154 @@ -427,7 +427,7 @@
   4.155  			isa = PBXFrameworksBuildPhase;
   4.156  			buildActionMask = 2147483647;
   4.157  			files = (
   4.158 -				FDBDE58C0E3134F3006BAC0B /* libSDL.a in Frameworks */,
   4.159 +				FDBDE58C0E3134F3006BAC0B /* libSDL2.a in Frameworks */,
   4.160  				FDAAC3C30E2D47E6001DB1D8 /* AudioToolbox.framework in Frameworks */,
   4.161  				FDAAC3C40E2D47E6001DB1D8 /* QuartzCore.framework in Frameworks */,
   4.162  				FDAAC3C50E2D47E6001DB1D8 /* OpenGLES.framework in Frameworks */,
   4.163 @@ -442,7 +442,7 @@
   4.164  			isa = PBXFrameworksBuildPhase;
   4.165  			buildActionMask = 2147483647;
   4.166  			files = (
   4.167 -				FDBDE59B0E31356A006BAC0B /* libSDL.a in Frameworks */,
   4.168 +				FDBDE59B0E31356A006BAC0B /* libSDL2.a in Frameworks */,
   4.169  				FDAAC5910E2D5429001DB1D8 /* AudioToolbox.framework in Frameworks */,
   4.170  				FDAAC5920E2D5429001DB1D8 /* QuartzCore.framework in Frameworks */,
   4.171  				FDAAC5930E2D5429001DB1D8 /* OpenGLES.framework in Frameworks */,
   4.172 @@ -457,7 +457,7 @@
   4.173  			isa = PBXFrameworksBuildPhase;
   4.174  			buildActionMask = 2147483647;
   4.175  			files = (
   4.176 -				FDBDE59F0E31358D006BAC0B /* libSDL.a in Frameworks */,
   4.177 +				FDBDE59F0E31358D006BAC0B /* libSDL2.a in Frameworks */,
   4.178  				FDAAC5BF0E2D55B5001DB1D8 /* AudioToolbox.framework in Frameworks */,
   4.179  				FDAAC5C00E2D55B5001DB1D8 /* QuartzCore.framework in Frameworks */,
   4.180  				FDAAC5C10E2D55B5001DB1D8 /* OpenGLES.framework in Frameworks */,
   4.181 @@ -472,7 +472,7 @@
   4.182  			isa = PBXFrameworksBuildPhase;
   4.183  			buildActionMask = 2147483647;
   4.184  			files = (
   4.185 -				FDBDE57C0E313445006BAC0B /* libSDL.a in Frameworks */,
   4.186 +				FDBDE57C0E313445006BAC0B /* libSDL2.a in Frameworks */,
   4.187  				FDAAC61C0E2D5914001DB1D8 /* AudioToolbox.framework in Frameworks */,
   4.188  				FDAAC61D0E2D5914001DB1D8 /* QuartzCore.framework in Frameworks */,
   4.189  				FDAAC61E0E2D5914001DB1D8 /* OpenGLES.framework in Frameworks */,
   4.190 @@ -487,7 +487,7 @@
   4.191  			isa = PBXFrameworksBuildPhase;
   4.192  			buildActionMask = 2147483647;
   4.193  			files = (
   4.194 -				FDC42FF40F0D866D009C87E1 /* libSDL.a in Frameworks */,
   4.195 +				FDC42FF40F0D866D009C87E1 /* libSDL2.a in Frameworks */,
   4.196  				FDC42FF60F0D866D009C87E1 /* AudioToolbox.framework in Frameworks */,
   4.197  				FDC42FF70F0D866D009C87E1 /* QuartzCore.framework in Frameworks */,
   4.198  				FDC42FF80F0D866D009C87E1 /* OpenGLES.framework in Frameworks */,
   4.199 @@ -502,7 +502,7 @@
   4.200  			isa = PBXFrameworksBuildPhase;
   4.201  			buildActionMask = 2147483647;
   4.202  			files = (
   4.203 -				FDBDE5A90E3135C0006BAC0B /* libSDL.a in Frameworks */,
   4.204 +				FDBDE5A90E3135C0006BAC0B /* libSDL2.a in Frameworks */,
   4.205  				FDD2C1000E2E4F4B00B7A85F /* AudioToolbox.framework in Frameworks */,
   4.206  				FDD2C1010E2E4F4B00B7A85F /* QuartzCore.framework in Frameworks */,
   4.207  				FDD2C1020E2E4F4B00B7A85F /* OpenGLES.framework in Frameworks */,
   4.208 @@ -517,7 +517,7 @@
   4.209  			isa = PBXFrameworksBuildPhase;
   4.210  			buildActionMask = 2147483647;
   4.211  			files = (
   4.212 -				FDBDE5AE0E3135E6006BAC0B /* libSDL.a in Frameworks */,
   4.213 +				FDBDE5AE0E3135E6006BAC0B /* libSDL2.a in Frameworks */,
   4.214  				FDD2C1770E2E52C000B7A85F /* AudioToolbox.framework in Frameworks */,
   4.215  				FDD2C1780E2E52C000B7A85F /* QuartzCore.framework in Frameworks */,
   4.216  				FDD2C1790E2E52C000B7A85F /* OpenGLES.framework in Frameworks */,
   4.217 @@ -532,7 +532,7 @@
   4.218  			isa = PBXFrameworksBuildPhase;
   4.219  			buildActionMask = 2147483647;
   4.220  			files = (
   4.221 -				FDBDE5B60E3135FE006BAC0B /* libSDL.a in Frameworks */,
   4.222 +				FDBDE5B60E3135FE006BAC0B /* libSDL2.a in Frameworks */,
   4.223  				FDD2C19B0E2E534F00B7A85F /* AudioToolbox.framework in Frameworks */,
   4.224  				FDD2C19C0E2E534F00B7A85F /* QuartzCore.framework in Frameworks */,
   4.225  				FDD2C19D0E2E534F00B7A85F /* OpenGLES.framework in Frameworks */,
   4.226 @@ -547,7 +547,7 @@
   4.227  			isa = PBXFrameworksBuildPhase;
   4.228  			buildActionMask = 2147483647;
   4.229  			files = (
   4.230 -				FDBDE5BC0E31364D006BAC0B /* libSDL.a in Frameworks */,
   4.231 +				FDBDE5BC0E31364D006BAC0B /* libSDL2.a in Frameworks */,
   4.232  				FDD2C4540E2E773800B7A85F /* AudioToolbox.framework in Frameworks */,
   4.233  				FDD2C4550E2E773800B7A85F /* QuartzCore.framework in Frameworks */,
   4.234  				FDD2C4560E2E773800B7A85F /* OpenGLES.framework in Frameworks */,
   4.235 @@ -562,7 +562,7 @@
   4.236  			isa = PBXFrameworksBuildPhase;
   4.237  			buildActionMask = 2147483647;
   4.238  			files = (
   4.239 -				FDBDE5C20E313663006BAC0B /* libSDL.a in Frameworks */,
   4.240 +				FDBDE5C20E313663006BAC0B /* libSDL2.a in Frameworks */,
   4.241  				FDD2C4720E2E77D700B7A85F /* AudioToolbox.framework in Frameworks */,
   4.242  				FDD2C4730E2E77D700B7A85F /* QuartzCore.framework in Frameworks */,
   4.243  				FDD2C4740E2E77D700B7A85F /* OpenGLES.framework in Frameworks */,
   4.244 @@ -577,7 +577,7 @@
   4.245  			isa = PBXFrameworksBuildPhase;
   4.246  			buildActionMask = 2147483647;
   4.247  			files = (
   4.248 -				FDBDE5C60E3136F1006BAC0B /* libSDL.a in Frameworks */,
   4.249 +				FDBDE5C60E3136F1006BAC0B /* libSDL2.a in Frameworks */,
   4.250  				FDD2C5010E2E7F4800B7A85F /* AudioToolbox.framework in Frameworks */,
   4.251  				FDD2C5020E2E7F4800B7A85F /* QuartzCore.framework in Frameworks */,
   4.252  				FDD2C5030E2E7F4800B7A85F /* OpenGLES.framework in Frameworks */,
   4.253 @@ -592,7 +592,7 @@
   4.254  			isa = PBXFrameworksBuildPhase;
   4.255  			buildActionMask = 2147483647;
   4.256  			files = (
   4.257 -				FDBDE5C80E313702006BAC0B /* libSDL.a in Frameworks */,
   4.258 +				FDBDE5C80E313702006BAC0B /* libSDL2.a in Frameworks */,
   4.259  				FDD2C51F0E2E807600B7A85F /* AudioToolbox.framework in Frameworks */,
   4.260  				FDD2C5200E2E807600B7A85F /* QuartzCore.framework in Frameworks */,
   4.261  				FDD2C5210E2E807600B7A85F /* OpenGLES.framework in Frameworks */,
   4.262 @@ -607,7 +607,7 @@
   4.263  			isa = PBXFrameworksBuildPhase;
   4.264  			buildActionMask = 2147483647;
   4.265  			files = (
   4.266 -				FDBDE5CA0E313712006BAC0B /* libSDL.a in Frameworks */,
   4.267 +				FDBDE5CA0E313712006BAC0B /* libSDL2.a in Frameworks */,
   4.268  				FDD2C5440E2E80E400B7A85F /* AudioToolbox.framework in Frameworks */,
   4.269  				FDD2C5450E2E80E400B7A85F /* QuartzCore.framework in Frameworks */,
   4.270  				FDD2C5460E2E80E400B7A85F /* OpenGLES.framework in Frameworks */,
   4.271 @@ -622,7 +622,7 @@
   4.272  			isa = PBXFrameworksBuildPhase;
   4.273  			buildActionMask = 2147483647;
   4.274  			files = (
   4.275 -				FDBDE5CC0E31372B006BAC0B /* libSDL.a in Frameworks */,
   4.276 +				FDBDE5CC0E31372B006BAC0B /* libSDL2.a in Frameworks */,
   4.277  				FDD2C57D0E2E8C7400B7A85F /* AudioToolbox.framework in Frameworks */,
   4.278  				FDD2C57E0E2E8C7400B7A85F /* QuartzCore.framework in Frameworks */,
   4.279  				FDD2C57F0E2E8C7400B7A85F /* OpenGLES.framework in Frameworks */,
   4.280 @@ -637,7 +637,7 @@
   4.281  			isa = PBXFrameworksBuildPhase;
   4.282  			buildActionMask = 2147483647;
   4.283  			files = (
   4.284 -				FDBDE5CE0E31373E006BAC0B /* libSDL.a in Frameworks */,
   4.285 +				FDBDE5CE0E31373E006BAC0B /* libSDL2.a in Frameworks */,
   4.286  				FDD2C5BB0E2E8CFC00B7A85F /* AudioToolbox.framework in Frameworks */,
   4.287  				FDD2C5BC0E2E8CFC00B7A85F /* QuartzCore.framework in Frameworks */,
   4.288  				FDD2C5BD0E2E8CFC00B7A85F /* OpenGLES.framework in Frameworks */,
   4.289 @@ -652,7 +652,7 @@
   4.290  			isa = PBXFrameworksBuildPhase;
   4.291  			buildActionMask = 2147483647;
   4.292  			files = (
   4.293 -				FDBDE5D40E313789006BAC0B /* libSDL.a in Frameworks */,
   4.294 +				FDBDE5D40E313789006BAC0B /* libSDL2.a in Frameworks */,
   4.295  				FDD2C6EA0E2E959E00B7A85F /* AudioToolbox.framework in Frameworks */,
   4.296  				FDD2C6EB0E2E959E00B7A85F /* QuartzCore.framework in Frameworks */,
   4.297  				FDD2C6EC0E2E959E00B7A85F /* OpenGLES.framework in Frameworks */,
   4.298 @@ -711,7 +711,7 @@
   4.299  		FD1B48AD0E3131CA007AB34E /* Products */ = {
   4.300  			isa = PBXGroup;
   4.301  			children = (
   4.302 -				FD1B48B80E3131CA007AB34E /* libSDL.a */,
   4.303 +				FD1B48B80E3131CA007AB34E /* libSDL2.a */,
   4.304  				0466EE7011E565E4000198A4 /* testsdl.app */,
   4.305  			);
   4.306  			name = Products;
   4.307 @@ -1234,10 +1234,10 @@
   4.308  			remoteRef = 0466EE6F11E565E4000198A4 /* PBXContainerItemProxy */;
   4.309  			sourceTree = BUILT_PRODUCTS_DIR;
   4.310  		};
   4.311 -		FD1B48B80E3131CA007AB34E /* libSDL.a */ = {
   4.312 +		FD1B48B80E3131CA007AB34E /* libSDL2.a */ = {
   4.313  			isa = PBXReferenceProxy;
   4.314  			fileType = archive.ar;
   4.315 -			path = libSDL.a;
   4.316 +			path = libSDL2.a;
   4.317  			remoteRef = FD1B48B70E3131CA007AB34E /* PBXContainerItemProxy */;
   4.318  			sourceTree = BUILT_PRODUCTS_DIR;
   4.319  		};
     5.1 --- a/android-project/AndroidManifest.xml	Thu Aug 09 15:43:39 2012 -0400
     5.2 +++ b/android-project/AndroidManifest.xml	Sat Aug 11 10:15:59 2012 -0700
     5.3 @@ -3,6 +3,9 @@
     5.4        package="org.libsdl.app"
     5.5        android:versionCode="1"
     5.6        android:versionName="1.0">
     5.7 +
     5.8 +    <uses-sdk android:minSdkVersion="5" />
     5.9 +
    5.10      <application android:label="@string/app_name" android:icon="@drawable/icon">
    5.11          <activity android:name="SDLActivity"
    5.12                    android:label="@string/app_name">
     6.1 --- a/android-project/src/org/libsdl/app/SDLActivity.java	Thu Aug 09 15:43:39 2012 -0400
     6.2 +++ b/android-project/src/org/libsdl/app/SDLActivity.java	Sat Aug 11 10:15:59 2012 -0700
     6.3 @@ -9,6 +9,7 @@
     6.4  import android.app.*;
     6.5  import android.content.*;
     6.6  import android.view.*;
     6.7 +import android.view.inputmethod.InputMethodManager;
     6.8  import android.os.*;
     6.9  import android.util.Log;
    6.10  import android.graphics.*;
    6.11 @@ -106,13 +107,33 @@
    6.12      }
    6.13  
    6.14      // Messages from the SDLMain thread
    6.15 -    static int COMMAND_CHANGE_TITLE = 1;
    6.16 +    static final int COMMAND_CHANGE_TITLE = 1;
    6.17 +    static final int COMMAND_KEYBOARD_SHOW = 2;
    6.18  
    6.19      // Handler for the messages
    6.20      Handler commandHandler = new Handler() {
    6.21 +        @Override
    6.22          public void handleMessage(Message msg) {
    6.23 -            if (msg.arg1 == COMMAND_CHANGE_TITLE) {
    6.24 +            switch (msg.arg1) {
    6.25 +            case COMMAND_CHANGE_TITLE:
    6.26                  setTitle((String)msg.obj);
    6.27 +                break;
    6.28 +            case COMMAND_KEYBOARD_SHOW:
    6.29 +                InputMethodManager manager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    6.30 +                if (manager != null) {
    6.31 +                    switch (((Integer)msg.obj).intValue()) {
    6.32 +                    case 0:
    6.33 +                        manager.hideSoftInputFromWindow(mSurface.getWindowToken(), 0);
    6.34 +                        break;
    6.35 +                    case 1:
    6.36 +                        manager.showSoftInput(mSurface, 0);
    6.37 +                        break;
    6.38 +                    case 2:
    6.39 +                        manager.toggleSoftInputFromWindow(mSurface.getWindowToken(), 0, 0);
    6.40 +                        break;
    6.41 +                    }
    6.42 +                }
    6.43 +               break;
    6.44              }
    6.45          }
    6.46      };
    6.47 @@ -155,6 +176,10 @@
    6.48          mSingleton.sendCommand(COMMAND_CHANGE_TITLE, title);
    6.49      }
    6.50  
    6.51 +    public static void sendMessage(int command, int param) {
    6.52 +        mSingleton.sendCommand(command, Integer.valueOf(param));
    6.53 +    }
    6.54 +
    6.55      public static Context getContext() {
    6.56          return mSingleton;
    6.57      }
    6.58 @@ -590,4 +615,3 @@
    6.59      }
    6.60  
    6.61  }
    6.62 -
     7.1 --- a/include/SDL_keyboard.h	Thu Aug 09 15:43:39 2012 -0400
     7.2 +++ b/include/SDL_keyboard.h	Sat Aug 11 10:15:59 2012 -0700
     7.3 @@ -171,6 +171,78 @@
     7.4   */
     7.5  extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
     7.6  
     7.7 +/**
     7.8 + *  \brief Returns whether the platform has some screen keyboard support.
     7.9 + *  
    7.10 + *  \param window The window for which screen keyboard should be checked.
    7.11 + *  
    7.12 + *  \return SDL_TRUE if some keyboard support is available else SDL_FALSE.
    7.13 + *  
    7.14 + *  \note Not all screen keyboard functions are supported on all platforms.
    7.15 + *  
    7.16 + *  \sa SDL_ShowScreenKeyboard()
    7.17 + *  \sa SDL_HideScreenKeyboard()
    7.18 + *  \sa SDL_IsScreenKeyboardShown()
    7.19 + *  \sa SDL_ToggleScreenKeyboard()
    7.20 + */
    7.21 +extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(SDL_Window *window);
    7.22 +
    7.23 +/**
    7.24 + *  \brief Requests to show a screen keyboard for given window.
    7.25 + *  
    7.26 + *  \param window The window for which screen keyboard should be shown.
    7.27 + *  
    7.28 + *  \return 0 if request will be processed or -1 on error (e.g. no support).
    7.29 + *  
    7.30 + *  \note Showing screen keyboards is asynchronous on some platforms.
    7.31 + *  
    7.32 + *  \sa SDL_HasScreenKeyboardSupport()
    7.33 + *  \sa SDL_HideScreenKeyboard()
    7.34 + */
    7.35 +extern DECLSPEC int SDLCALL SDL_ShowScreenKeyboard(SDL_Window *window);
    7.36 +
    7.37 +/**
    7.38 + *  \brief Requests to hide a screen keyboard for given window.
    7.39 + *  
    7.40 + *  \param window The window for which screen keyboard should be shown.
    7.41 + *  
    7.42 + *  \return 0 if request will be processed or -1 on error (e.g. no support).
    7.43 + *  
    7.44 + *  \note Hiding screen keyboards is asynchronous on some platforms.
    7.45 + *  
    7.46 + *  \sa SDL_HasScreenKeyboardSupport()
    7.47 + *  \sa SDL_ShowScreenKeyboard()
    7.48 + */
    7.49 +extern DECLSPEC int SDLCALL SDL_HideScreenKeyboard(SDL_Window *window);
    7.50 +
    7.51 +/**
    7.52 + *  \brief Requests to toggle a screen keyboard for given window.
    7.53 + *  
    7.54 + *  \param window The window for which screen keyboard should be toggled.
    7.55 + *  
    7.56 + *  \return 0 if request will be processed or -1 on error (e.g. no support).
    7.57 + *  
    7.58 + *  \note Showing and hiding screen keyboards is asynchronous on some platforms.
    7.59 + *  
    7.60 + *  \sa SDL_HasScreenKeyboardSupport()
    7.61 + *  \sa SDL_IsScreenKeyboardShown()
    7.62 + */
    7.63 +extern DECLSPEC int SDLCALL SDL_ToggleScreenKeyboard(SDL_Window * window);
    7.64 +
    7.65 +/**
    7.66 + *  \brief Returns whether the screen keyboard is shown for given window.
    7.67 + *  
    7.68 + *  \param window The window for which screen keyboard should be queried.
    7.69 + *  
    7.70 + *  \return SDL_TRUE if screen keyboard is shown else SDL_FALSE.
    7.71 + *  
    7.72 + *  \note May always return SDL_FALSE on some platforms (not implemented there).
    7.73 + *  
    7.74 + *  \sa SDL_HasScreenKeyboardSupport()
    7.75 + *  \sa SDL_ShowScreenKeyboard()
    7.76 + *  \sa SDL_HideScreenKeyboard()
    7.77 + */
    7.78 +extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
    7.79  
    7.80  /* Ends C function definitions when using C++ */
    7.81  #ifdef __cplusplus
     8.1 --- a/include/SDL_system.h	Thu Aug 09 15:43:39 2012 -0400
     8.2 +++ b/include/SDL_system.h	Sat Aug 11 10:15:59 2012 -0700
     8.3 @@ -30,6 +30,11 @@
     8.4  
     8.5  #include "SDL_stdinc.h"
     8.6  
     8.7 +#if __IPHONEOS__
     8.8 +#include "SDL_video.h"
     8.9 +#include "SDL_keyboard.h"
    8.10 +#endif
    8.11 +
    8.12  #include "begin_code.h"
    8.13  /* Set up for C function definitions, even when using C++ */
    8.14  #ifdef __cplusplus
    8.15 @@ -40,15 +45,13 @@
    8.16  
    8.17  #if __IPHONEOS__
    8.18  
    8.19 -#include "SDL_video.h"
    8.20 -
    8.21  extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
    8.22  extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
    8.23  
    8.24 -extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardShow(SDL_Window * window);
    8.25 -extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardHide(SDL_Window * window);
    8.26 -extern DECLSPEC SDL_bool SDLCALL SDL_iPhoneKeyboardIsShown(SDL_Window * window);
    8.27 -extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardToggle(SDL_Window * window);
    8.28 +#define SDL_iPhoneKeyboardShow  SDL_ShowScreenKeyboard
    8.29 +#define SDL_iPhoneKeyboardHide  SDL_HideScreenKeyboard
    8.30 +#define SDL_iPhoneKeyboardToggle    SDL_ToggleScreenKeyboard
    8.31 +#define SDL_iPhoneKeyboardIsShown   SDL_IsScreenKeyboardShown
    8.32  
    8.33  #endif
    8.34  
     9.1 --- a/src/core/android/SDL_android.cpp	Thu Aug 09 15:43:39 2012 -0400
     9.2 +++ b/src/core/android/SDL_android.cpp	Sat Aug 11 10:15:59 2012 -0700
     9.3 @@ -735,6 +735,21 @@
     9.4      return Android_JNI_FileClose(ctx, true);
     9.5  }
     9.6  
     9.7 +// sends message to be handled on the UI event dispatch thread
     9.8 +extern "C" int Android_JNI_SendMessage(int command, int param)
     9.9 +{
    9.10 +    JNIEnv *env = Android_JNI_GetEnv();
    9.11 +    if (!env) {
    9.12 +        return -1;
    9.13 +    }
    9.14 +    jmethodID mid = env->GetStaticMethodID(mActivityClass, "sendMessage", "(II)V");
    9.15 +    if (!mid) {
    9.16 +        return -1;
    9.17 +    }
    9.18 +    env->CallStaticVoidMethod(mActivityClass, mid, command, param);
    9.19 +    return 0;
    9.20 +}
    9.21 +
    9.22  #endif /* __ANDROID__ */
    9.23  
    9.24  /* vi: set ts=4 sw=4 expandtab: */
    10.1 --- a/src/core/android/SDL_android.h	Thu Aug 09 15:43:39 2012 -0400
    10.2 +++ b/src/core/android/SDL_android.h	Sat Aug 11 10:15:59 2012 -0700
    10.3 @@ -53,6 +53,9 @@
    10.4  JNIEnv *Android_JNI_GetEnv(void);
    10.5  int Android_JNI_SetupThread(void);
    10.6  
    10.7 +// Generic messages
    10.8 +int Android_JNI_SendMessage(int command, int param);
    10.9 +
   10.10  /* Ends C function definitions when using C++ */
   10.11  #ifdef __cplusplus
   10.12  /* *INDENT-OFF* */
    11.1 --- a/src/video/SDL_sysvideo.h	Thu Aug 09 15:43:39 2012 -0400
    11.2 +++ b/src/video/SDL_sysvideo.h	Sat Aug 11 10:15:59 2012 -0700
    11.3 @@ -233,6 +233,13 @@
    11.4      void (*StopTextInput) (_THIS);
    11.5      void (*SetTextInputRect) (_THIS, SDL_Rect *rect);
    11.6  
    11.7 +    /* Screen keyboard */
    11.8 +    SDL_bool (*SDL_HasScreenKeyboardSupport) (_THIS, SDL_Window *window);
    11.9 +    int (*SDL_ShowScreenKeyboard) (_THIS, SDL_Window *window);
   11.10 +    int (*SDL_HideScreenKeyboard) (_THIS, SDL_Window *window);
   11.11 +    int (*SDL_ToggleScreenKeyboard) (_THIS, SDL_Window *window);
   11.12 +    SDL_bool (*SDL_IsScreenKeyboardShown) (_THIS, SDL_Window *window);
   11.13 +
   11.14      /* Clipboard */
   11.15      int (*SetClipboardText) (_THIS, const char *text);
   11.16      char * (*GetClipboardText) (_THIS);
    12.1 --- a/src/video/SDL_video.c	Thu Aug 09 15:43:39 2012 -0400
    12.2 +++ b/src/video/SDL_video.c	Sat Aug 11 10:15:59 2012 -0700
    12.3 @@ -2753,4 +2753,49 @@
    12.4      }
    12.5  }
    12.6  
    12.7 +SDL_bool
    12.8 +SDL_HasScreenKeyboardSupport(SDL_Window *window)
    12.9 +{
   12.10 +    if (window && _this && _this->SDL_HasScreenKeyboardSupport) {
   12.11 +        return _this->SDL_HasScreenKeyboardSupport(_this, window);
   12.12 +    }
   12.13 +    return SDL_FALSE;
   12.14 +}
   12.15 +
   12.16 +int
   12.17 +SDL_ShowScreenKeyboard(SDL_Window *window)
   12.18 +{
   12.19 +    if (window && _this && _this->SDL_ShowScreenKeyboard) {
   12.20 +        return _this->SDL_ShowScreenKeyboard(_this, window);
   12.21 +    }
   12.22 +    return -1;
   12.23 +}
   12.24 +
   12.25 +int
   12.26 +SDL_HideScreenKeyboard(SDL_Window *window)
   12.27 +{
   12.28 +    if (window && _this && _this->SDL_HideScreenKeyboard) {
   12.29 +        return _this->SDL_HideScreenKeyboard(_this, window);
   12.30 +    }
   12.31 +    return -1;
   12.32 +}
   12.33 +
   12.34 +int
   12.35 +SDL_ToggleScreenKeyboard(SDL_Window *window)
   12.36 +{
   12.37 +    if (window && _this && _this->SDL_ToggleScreenKeyboard) {
   12.38 +        return _this->SDL_ToggleScreenKeyboard(_this, window);
   12.39 +    }
   12.40 +    return -1;
   12.41 +}
   12.42 +
   12.43 +SDL_bool
   12.44 +SDL_IsScreenKeyboardShown(SDL_Window *window)
   12.45 +{
   12.46 +    if (window && _this && _this->SDL_IsScreenKeyboardShown) {
   12.47 +        return _this->SDL_IsScreenKeyboardShown(_this, window);
   12.48 +    }
   12.49 +    return SDL_FALSE;
   12.50 +}
   12.51 +
   12.52  /* vi: set ts=4 sw=4 expandtab: */
    13.1 --- a/src/video/android/SDL_androidkeyboard.c	Thu Aug 09 15:43:39 2012 -0400
    13.2 +++ b/src/video/android/SDL_androidkeyboard.c	Sat Aug 11 10:15:59 2012 -0700
    13.3 @@ -178,6 +178,40 @@
    13.4      return SDL_SendKeyboardKey(SDL_RELEASED, TranslateKeycode(keycode));
    13.5  }
    13.6  
    13.7 +// has to fit Activity constant
    13.8 +#define COMMAND_KEYBOARD_SHOW 2
    13.9 +
   13.10 +SDL_bool
   13.11 +Android_HasScreenKeyboardSupport(_THIS, SDL_Window * window)
   13.12 +{
   13.13 +    return Android_Window ? SDL_TRUE : SDL_FALSE;
   13.14 +}
   13.15 +
   13.16 +int
   13.17 +Android_ShowScreenKeyboard(_THIS, SDL_Window * window)
   13.18 +{
   13.19 +    return Android_Window ? Android_JNI_SendMessage(COMMAND_KEYBOARD_SHOW, 1) : -1;
   13.20 +}
   13.21 +
   13.22 +int
   13.23 +Android_HideScreenKeyboard(_THIS, SDL_Window * window)
   13.24 +{
   13.25 +    
   13.26 +    return Android_Window ? Android_JNI_SendMessage(COMMAND_KEYBOARD_SHOW, 0) : -1;
   13.27 +}
   13.28 +
   13.29 +int
   13.30 +Android_ToggleScreenKeyboard(_THIS, SDL_Window * window)
   13.31 +{
   13.32 +    return Android_Window ? Android_JNI_SendMessage(COMMAND_KEYBOARD_SHOW, 2) : -1;
   13.33 +}
   13.34 +
   13.35 +SDL_bool
   13.36 +Android_IsScreenKeyboardShown(_THIS, SDL_Window * window)
   13.37 +{
   13.38 +    return SDL_FALSE;
   13.39 +}
   13.40 +
   13.41  #endif /* SDL_VIDEO_DRIVER_ANDROID */
   13.42  
   13.43  /* vi: set ts=4 sw=4 expandtab: */
    14.1 --- a/src/video/android/SDL_androidkeyboard.h	Thu Aug 09 15:43:39 2012 -0400
    14.2 +++ b/src/video/android/SDL_androidkeyboard.h	Sat Aug 11 10:15:59 2012 -0700
    14.3 @@ -26,4 +26,10 @@
    14.4  extern int Android_OnKeyDown(int keycode);
    14.5  extern int Android_OnKeyUp(int keycode);
    14.6  
    14.7 +extern SDL_bool Android_HasScreenKeyboardSupport(_THIS, SDL_Window * window);
    14.8 +extern int Android_ShowScreenKeyboard(_THIS, SDL_Window * window);
    14.9 +extern int Android_HideScreenKeyboard(_THIS, SDL_Window * window);
   14.10 +extern int Android_ToggleScreenKeyboard(_THIS, SDL_Window * window);
   14.11 +extern SDL_bool Android_IsScreenKeyboardShown(_THIS, SDL_Window * window);
   14.12 +
   14.13  /* vi: set ts=4 sw=4 expandtab: */
    15.1 --- a/src/video/android/SDL_androidvideo.c	Thu Aug 09 15:43:39 2012 -0400
    15.2 +++ b/src/video/android/SDL_androidvideo.c	Sat Aug 11 10:15:59 2012 -0700
    15.3 @@ -119,6 +119,13 @@
    15.4      device->GL_SwapWindow = Android_GL_SwapWindow;
    15.5      device->GL_DeleteContext = Android_GL_DeleteContext;
    15.6  
    15.7 +    /* Screen keyboard */
    15.8 +    device->SDL_HasScreenKeyboardSupport = Android_HasScreenKeyboardSupport;
    15.9 +    device->SDL_ShowScreenKeyboard = Android_ShowScreenKeyboard;
   15.10 +    device->SDL_HideScreenKeyboard = Android_HideScreenKeyboard;
   15.11 +    device->SDL_ToggleScreenKeyboard = Android_ToggleScreenKeyboard;
   15.12 +    device->SDL_IsScreenKeyboardShown = Android_IsScreenKeyboardShown;
   15.13 +
   15.14      return device;
   15.15  }
   15.16  
    16.1 --- a/src/video/uikit/SDL_uikitvideo.m	Thu Aug 09 15:43:39 2012 -0400
    16.2 +++ b/src/video/uikit/SDL_uikitvideo.m	Sat Aug 11 10:15:59 2012 -0700
    16.3 @@ -89,6 +89,11 @@
    16.4      device->DestroyWindow = UIKit_DestroyWindow;
    16.5      device->GetWindowWMInfo = UIKit_GetWindowWMInfo;
    16.6  
    16.7 +    device->SDL_HasScreenKeyboardSupport = UIKit_HasScreenKeyboardSupport;
    16.8 +    device->SDL_ShowScreenKeyboard = UIKit_ShowScreenKeyboard;
    16.9 +    device->SDL_HideScreenKeyboard = UIKit_HideScreenKeyboard;
   16.10 +    device->SDL_ToggleScreenKeyboard = UIKit_ToggleScreenKeyboard;
   16.11 +    device->SDL_IsScreenKeyboardShown = UIKit_IsScreenKeyboardShown;
   16.12  
   16.13      /* OpenGL (ES) functions */
   16.14      device->GL_MakeCurrent        = UIKit_GL_MakeCurrent;
    17.1 --- a/src/video/uikit/SDL_uikitview.h	Thu Aug 09 15:43:39 2012 -0400
    17.2 +++ b/src/video/uikit/SDL_uikitview.h	Sat Aug 11 10:15:59 2012 -0700
    17.3 @@ -60,6 +60,13 @@
    17.4  - (void)hideKeyboard;
    17.5  - (void)initializeKeyboard;
    17.6  @property (readonly) BOOL keyboardVisible;
    17.7 +
    17.8 +SDL_bool UIKit_HasScreenKeyboardSupport(_THIS, SDL_Window *window);
    17.9 +int UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window);
   17.10 +int UIKit_HideScreenKeyboard(_THIS, SDL_Window *window);
   17.11 +int UIKit_ToggleScreenKeyboard(_THIS, SDL_Window *window);
   17.12 +SDL_bool UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window);
   17.13 +
   17.14  #endif
   17.15  
   17.16  @end
    18.1 --- a/src/video/uikit/SDL_uikitview.m	Thu Aug 09 15:43:39 2012 -0400
    18.2 +++ b/src/video/uikit/SDL_uikitview.m	Sat Aug 11 10:15:59 2012 -0700
    18.3 @@ -343,7 +343,17 @@
    18.4      return view;
    18.5  }
    18.6  
    18.7 -int SDL_iPhoneKeyboardShow(SDL_Window * window)
    18.8 +SDL_bool UIKit_HasScreenKeyboardSupport(_THIS, SDL_Window *window)
    18.9 +{
   18.10 +    SDL_uikitview *view = getWindowView(window);
   18.11 +    if (view == nil) {
   18.12 +        return SDL_FALSE;
   18.13 +    }
   18.14 +
   18.15 +    return SDL_TRUE;
   18.16 +}
   18.17 +
   18.18 +int UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window)
   18.19  {
   18.20      SDL_uikitview *view = getWindowView(window);
   18.21      if (view == nil) {
   18.22 @@ -354,7 +364,7 @@
   18.23      return 0;
   18.24  }
   18.25  
   18.26 -int SDL_iPhoneKeyboardHide(SDL_Window * window)
   18.27 +int UIKit_HideScreenKeyboard(_THIS, SDL_Window *window)
   18.28  {
   18.29      SDL_uikitview *view = getWindowView(window);
   18.30      if (view == nil) {
   18.31 @@ -365,7 +375,7 @@
   18.32      return 0;
   18.33  }
   18.34  
   18.35 -SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window)
   18.36 +SDL_bool UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window)
   18.37  {
   18.38      SDL_uikitview *view = getWindowView(window);
   18.39      if (view == nil) {
   18.40 @@ -375,49 +385,22 @@
   18.41      return view.keyboardVisible;
   18.42  }
   18.43  
   18.44 -int SDL_iPhoneKeyboardToggle(SDL_Window * window)
   18.45 +int UIKit_ToggleScreenKeyboard(_THIS, SDL_Window *window)
   18.46  {
   18.47      SDL_uikitview *view = getWindowView(window);
   18.48      if (view == nil) {
   18.49          return -1;
   18.50      }
   18.51  
   18.52 -    if (SDL_iPhoneKeyboardIsShown(window)) {
   18.53 -        SDL_iPhoneKeyboardHide(window);
   18.54 +    if (UIKit_IsScreenKeyboardShown(_this, window)) {
   18.55 +        UIKit_HideScreenKeyboard(_this, window);
   18.56      }
   18.57      else {
   18.58 -        SDL_iPhoneKeyboardShow(window);
   18.59 +        UIKit_ShowScreenKeyboard(_this, window);
   18.60      }
   18.61      return 0;
   18.62  }
   18.63  
   18.64 -#else
   18.65 -
   18.66 -/* stubs, used if compiled without keyboard support */
   18.67 -
   18.68 -int SDL_iPhoneKeyboardShow(SDL_Window * window)
   18.69 -{
   18.70 -    SDL_SetError("Not compiled with keyboard support");
   18.71 -    return -1;
   18.72 -}
   18.73 -
   18.74 -int SDL_iPhoneKeyboardHide(SDL_Window * window)
   18.75 -{
   18.76 -    SDL_SetError("Not compiled with keyboard support");
   18.77 -    return -1;
   18.78 -}
   18.79 -
   18.80 -SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window)
   18.81 -{
   18.82 -    return 0;
   18.83 -}
   18.84 -
   18.85 -int SDL_iPhoneKeyboardToggle(SDL_Window * window)
   18.86 -{
   18.87 -    SDL_SetError("Not compiled with keyboard support");
   18.88 -    return -1;
   18.89 -}
   18.90 -
   18.91  #endif /* SDL_IPHONE_KEYBOARD */
   18.92  
   18.93  #endif /* SDL_VIDEO_DRIVER_UIKIT */
    19.1 --- a/test/checkkeys.c	Thu Aug 09 15:43:39 2012 -0400
    19.2 +++ b/test/checkkeys.c	Sat Aug 11 10:15:59 2012 -0700
    19.3 @@ -138,10 +138,6 @@
    19.4      SDL_Log("Text: %s", text);
    19.5  }
    19.6  
    19.7 -#if __IPHONEOS__
    19.8 -extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardShow(SDL_Window * window);
    19.9 -#endif
   19.10 -
   19.11  int
   19.12  main(int argc, char *argv[])
   19.13  {
   19.14 @@ -168,9 +164,11 @@
   19.15  #if __IPHONEOS__
   19.16      /* Creating the context creates the view, which we need to show keyboard */
   19.17      SDL_GL_CreateContext(window);
   19.18 -    SDL_iPhoneKeyboardShow(window);
   19.19  #endif
   19.20 -    
   19.21 +
   19.22 +    if (SDL_HasScreenKeyboardSupport(window)) {
   19.23 +        SDL_ShowScreenKeyboard(window);
   19.24 +    }
   19.25  
   19.26      /* Watch keystrokes */
   19.27      done = 0;