21 #include "../../SDL_internal.h"
23 #if SDL_VIDEO_DRIVER_UIKIT
25 #import <UIKit/UIKit.h>
30 #include "../SDL_sysvideo.h"
31 #include "../SDL_pixels_c.h"
32 #include "../../events/SDL_events_c.h"
42 #define UIKITVID_DRIVER_NAME "uikit"
49 static int UIKit_VideoInit(
_THIS);
50 static void UIKit_VideoQuit(
_THIS);
85 device->
driverdata = (
void *) CFBridgingRetain(data);
105 #if SDL_IPHONE_KEYBOARD
125 device->
free = UIKit_DeleteDevice;
131 = UIKit_Vulkan_GetInstanceExtensions;
143 UIKITVID_DRIVER_NAME,
"SDL UIKit video driver",
144 UIKit_Available, UIKit_CreateDevice
149 UIKit_VideoInit(
_THIS)
160 UIKit_VideoQuit(
_THIS)
172 UIApplication *app = [UIApplication sharedApplication];
183 return [[UIDevice currentDevice].systemVersion doubleValue] >= version;
189 CGRect
frame = screen.bounds;
191 #if !TARGET_OS_TV && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0)
196 frame = screen.applicationFrame;
210 UIInterfaceOrientation orient = [UIApplication sharedApplication].statusBarOrientation;
211 BOOL isLandscape = UIInterfaceOrientationIsLandscape(orient);
213 if (isLandscape != (frame.size.width > frame.size.height)) {
214 float height = frame.size.width;
215 frame.size.width = frame.size.height;
216 frame.size.height =
height;
231 void SDL_NSLog(
const char *
text)
244 return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);