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" 40 #define UIKITVID_DRIVER_NAME "uikit" 43 static int UIKit_VideoInit(
_THIS);
44 static void UIKit_VideoQuit(
_THIS);
60 UIKit_CreateDevice(
int devindex)
89 #if SDL_IPHONE_KEYBOARD 105 device->
free = UIKit_DeleteDevice;
113 UIKITVID_DRIVER_NAME,
"SDL UIKit video driver",
114 UIKit_Available, UIKit_CreateDevice
119 UIKit_VideoInit(
_THIS)
130 UIKit_VideoQuit(
_THIS)
142 UIApplication *app = [UIApplication sharedApplication];
153 return [[UIDevice currentDevice].systemVersion doubleValue] >= version;
163 return screen.bounds;
165 return screen.applicationFrame;
176 void SDL_NSLog(
const char *
text)
int UIKit_InitModes(_THIS)
void UIKit_QuitModes(_THIS)
CGRect UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen)
void UIKit_PumpEvents(_THIS)
void UIKit_SuspendScreenSaver(_THIS)
SDL_bool UIKit_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
int UIKit_CreateWindow(_THIS, SDL_Window *window)
void UIKit_DestroyWindow(_THIS, SDL_Window *window)
SDL_bool(* IsScreenKeyboardShown)(_THIS, SDL_Window *window)
void UIKit_GL_DeleteContext(_THIS, SDL_GLContext context)
void UIKit_GL_GetDrawableSize(_THIS, SDL_Window *window, int *w, int *h)
BOOL UIKit_IsSystemVersionAtLeast(double version)
void(* ShowWindow)(_THIS, SDL_Window *window)
void UIKit_SetWindowTitle(_THIS, SDL_Window *window)
void UIKit_RaiseWindow(_THIS, SDL_Window *window)
void UIKit_HideWindow(_THIS, SDL_Window *window)
void(* GL_SwapWindow)(_THIS, SDL_Window *window)
void UIKit_SetWindowBordered(_THIS, SDL_Window *window, SDL_bool bordered)
int UIKit_GL_LoadLibrary(_THIS, const char *path)
void UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay *display)
int(* GL_LoadLibrary)(_THIS, const char *path)
int(* SetDisplayMode)(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
void(* SetWindowBordered)(_THIS, SDL_Window *window, SDL_bool bordered)
void(* GL_GetDrawableSize)(_THIS, SDL_Window *window, int *w, int *h)
static SDL_VideoDevice * _this
void(* HideWindow)(_THIS, SDL_Window *window)
void(* RaiseWindow)(_THIS, SDL_Window *window)
void(* SetTextInputRect)(_THIS, SDL_Rect *rect)
void * SDL_calloc(size_t nmemb, size_t size)
SDL_bool(* GetWindowWMInfo)(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
SDL_GLContext(* GL_CreateContext)(_THIS, SDL_Window *window)
void UIKit_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
int(* GL_MakeCurrent)(_THIS, SDL_Window *window, SDL_GLContext context)
void(* DestroyWindow)(_THIS, SDL_Window *window)
void UIKit_GL_SwapWindow(_THIS, SDL_Window *window)
#define SDL_HINT_IDLE_TIMER_DISABLED
A variable controlling whether the idle timer is disabled on iOS.
SDL_bool(* HasScreenKeyboardSupport)(_THIS)
SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window *window)
void * UIKit_GL_GetProcAddress(_THIS, const char *proc)
void(* GetDisplayModes)(_THIS, SDL_VideoDisplay *display)
#define SDL_OutOfMemory()
static char text[MAX_TEXT_LENGTH]
void(* ShowScreenKeyboard)(_THIS, SDL_Window *window)
int(* CreateWindow)(_THIS, SDL_Window *window)
The type used to identify a window.
struct SDL_VideoDevice::@28 gl_config
SDL_bool suspend_screensaver
void(* SetWindowFullscreen)(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
void(* GL_DeleteContext)(_THIS, SDL_GLContext context)
void(* SetWindowTitle)(_THIS, SDL_Window *window)
void UIKit_ShowWindow(_THIS, SDL_Window *window)
void(* SuspendScreenSaver)(_THIS)
int UIKit_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
void *(* GL_GetProcAddress)(_THIS, const char *proc)
void(* PumpEvents)(_THIS)
void(* HideScreenKeyboard)(_THIS, SDL_Window *window)
int UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)