Daily update on 20250721-223448 by Nitload Youmu. Additional Message : Rename StgSHarp.C to StgSharp.Native. Add SDL to repo.
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface SDLLaunchScreenController : UIViewController
|
||||
|
||||
- (instancetype)init;
|
||||
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;
|
||||
- (void)loadView;
|
||||
|
||||
@end
|
||||
|
||||
@interface SDLUIKitDelegate : NSObject <UIApplicationDelegate>
|
||||
|
||||
+ (id)sharedAppDelegate;
|
||||
+ (NSString *)getAppDelegateClassName;
|
||||
|
||||
- (void)hideLaunchScreen;
|
||||
|
||||
/* This property is marked as optional, and is only intended to be used when
|
||||
* the app's UI is storyboard-based. SDL is not storyboard-based, however
|
||||
* several major third-party ad APIs (e.g. Google admob) incorrectly assume this
|
||||
* property always exists, and will crash if it doesn't. */
|
||||
@property(nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#ifndef SDL_uikitclipboard_h_
|
||||
#define SDL_uikitclipboard_h_
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
extern bool UIKit_SetClipboardText(SDL_VideoDevice *_this, const char *text);
|
||||
extern char *UIKit_GetClipboardText(SDL_VideoDevice *_this);
|
||||
extern bool UIKit_HasClipboardText(SDL_VideoDevice *_this);
|
||||
|
||||
extern void UIKit_InitClipboard(SDL_VideoDevice *_this);
|
||||
extern void UIKit_QuitClipboard(SDL_VideoDevice *_this);
|
||||
|
||||
#endif // SDL_uikitclipboard_h_
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#ifndef SDL_uikitevents_h_
|
||||
#define SDL_uikitevents_h_
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
extern void SDL_UpdateLifecycleObserver(void);
|
||||
|
||||
extern Uint64 UIKit_GetEventTimestamp(NSTimeInterval nsTimestamp);
|
||||
extern void UIKit_PumpEvents(SDL_VideoDevice *_this);
|
||||
|
||||
extern void SDL_InitGCKeyboard(void);
|
||||
extern void SDL_QuitGCKeyboard(void);
|
||||
|
||||
extern void SDL_InitGCMouse(void);
|
||||
extern bool SDL_GCMouseRelativeMode(void);
|
||||
extern void SDL_QuitGCMouse(void);
|
||||
|
||||
#endif // SDL_uikitevents_h_
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||
|
||||
extern bool UIKit_ShowingMessageBox(void);
|
||||
extern bool UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonID);
|
||||
|
||||
#endif // SDL_VIDEO_DRIVER_UIKIT
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @author Mark Callow, www.edgewise-consulting.com.
|
||||
*
|
||||
* Thanks to @slime73 on GitHub for their gist showing how to add a CAMetalLayer
|
||||
* backed view.
|
||||
*/
|
||||
|
||||
#ifndef SDL_uikitmetalview_h_
|
||||
#define SDL_uikitmetalview_h_
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
#include "SDL_uikitwindow.h"
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_UIKIT) && (defined(SDL_VIDEO_VULKAN) || defined(SDL_VIDEO_METAL))
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Metal/Metal.h>
|
||||
#import <QuartzCore/CAMetalLayer.h>
|
||||
|
||||
@interface SDL_uikitmetalview : SDL_uikitview
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
scale:(CGFloat)scale;
|
||||
|
||||
@end
|
||||
|
||||
SDL_MetalView UIKit_Metal_CreateView(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
void UIKit_Metal_DestroyView(SDL_VideoDevice *_this, SDL_MetalView view);
|
||||
void *UIKit_Metal_GetLayer(SDL_VideoDevice *_this, SDL_MetalView view);
|
||||
|
||||
#endif // SDL_VIDEO_DRIVER_UIKIT && (SDL_VIDEO_VULKAN || SDL_VIDEO_METAL)
|
||||
|
||||
#endif // SDL_uikitmetalview_h_
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#ifndef SDL_uikitmodes_h_
|
||||
#define SDL_uikitmodes_h_
|
||||
|
||||
#include "SDL_uikitvideo.h"
|
||||
|
||||
@interface SDL_UIKitDisplayData : NSObject
|
||||
|
||||
#ifndef SDL_PLATFORM_VISIONOS
|
||||
- (instancetype)initWithScreen:(UIScreen *)screen;
|
||||
@property(nonatomic, strong) UIScreen *uiscreen;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@interface SDL_UIKitDisplayModeData : NSObject
|
||||
#ifndef SDL_PLATFORM_VISIONOS
|
||||
@property(nonatomic, strong) UIScreenMode *uiscreenmode;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
#ifndef SDL_PLATFORM_VISIONOS
|
||||
extern bool UIKit_IsDisplayLandscape(UIScreen *uiscreen);
|
||||
#endif
|
||||
|
||||
extern bool UIKit_InitModes(SDL_VideoDevice *_this);
|
||||
#ifndef SDL_PLATFORM_VISIONOS
|
||||
extern bool UIKit_AddDisplay(UIScreen *uiscreen, bool send_event);
|
||||
extern void UIKit_DelDisplay(UIScreen *uiscreen, bool send_event);
|
||||
#endif
|
||||
extern bool UIKit_GetDisplayModes(SDL_VideoDevice *_this, SDL_VideoDisplay *display);
|
||||
extern bool UIKit_SetDisplayMode(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_DisplayMode *mode);
|
||||
extern void UIKit_QuitModes(SDL_VideoDevice *_this);
|
||||
extern bool UIKit_GetDisplayUsableBounds(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_Rect *rect);
|
||||
|
||||
// because visionOS does not have a screen
|
||||
// we create a fake display to maintain compatibility.
|
||||
// By default, a window measures 1280x720 pt.
|
||||
// https://developer.apple.com/design/human-interface-guidelines/windows#visionOS
|
||||
#ifdef SDL_PLATFORM_VISIONOS
|
||||
#define SDL_XR_SCREENWIDTH 1280
|
||||
#define SDL_XR_SCREENHEIGHT 720
|
||||
#endif
|
||||
|
||||
#endif // SDL_uikitmodes_h_
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#ifndef SDL_uikitopengles_
|
||||
#define SDL_uikitopengles_
|
||||
|
||||
#if defined(SDL_VIDEO_OPENGL_ES) || defined(SDL_VIDEO_OPENGL_ES2)
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
extern bool UIKit_GL_MakeCurrent(SDL_VideoDevice *_this, SDL_Window *window,
|
||||
SDL_GLContext context);
|
||||
extern bool UIKit_GL_SwapWindow(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern SDL_GLContext UIKit_GL_CreateContext(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern bool UIKit_GL_DestroyContext(SDL_VideoDevice *_this, SDL_GLContext context);
|
||||
extern SDL_FunctionPointer UIKit_GL_GetProcAddress(SDL_VideoDevice *_this, const char *proc);
|
||||
extern bool UIKit_GL_LoadLibrary(SDL_VideoDevice *_this, const char *path);
|
||||
|
||||
extern void UIKit_GL_RestoreCurrentContext(void);
|
||||
|
||||
#endif // SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
|
||||
|
||||
#endif // SDL_uikitopengles_
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#if defined(SDL_VIDEO_OPENGL_ES) || defined(SDL_VIDEO_OPENGL_ES2)
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <OpenGLES/EAGL.h>
|
||||
#import <OpenGLES/ES3/gl.h>
|
||||
|
||||
#import "SDL_uikitview.h"
|
||||
#include "SDL_uikitvideo.h"
|
||||
|
||||
@interface SDL_uikitopenglview : SDL_uikitview
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
scale:(CGFloat)scale
|
||||
retainBacking:(BOOL)retained
|
||||
rBits:(int)rBits
|
||||
gBits:(int)gBits
|
||||
bBits:(int)bBits
|
||||
aBits:(int)aBits
|
||||
depthBits:(int)depthBits
|
||||
stencilBits:(int)stencilBits
|
||||
sRGB:(BOOL)sRGB
|
||||
multisamples:(int)multisamples
|
||||
context:(EAGLContext *)glcontext;
|
||||
|
||||
@property(nonatomic, readonly, weak) EAGLContext *context;
|
||||
|
||||
// The width and height of the drawable in pixels (as opposed to points.)
|
||||
@property(nonatomic, readonly) int backingWidth;
|
||||
@property(nonatomic, readonly) int backingHeight;
|
||||
|
||||
@property(nonatomic, readonly) GLuint drawableRenderbuffer;
|
||||
@property(nonatomic, readonly) GLuint drawableFramebuffer;
|
||||
@property(nonatomic, readonly) GLuint msaaResolveFramebuffer;
|
||||
|
||||
- (void)swapBuffers;
|
||||
|
||||
- (void)updateFrame;
|
||||
|
||||
@end
|
||||
|
||||
#endif // SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_uikitpen_h_
|
||||
#define SDL_uikitpen_h_
|
||||
|
||||
#include "SDL_uikitvideo.h"
|
||||
#include "SDL_uikitwindow.h"
|
||||
|
||||
extern bool UIKit_InitPen(SDL_VideoDevice *_this);
|
||||
extern void UIKit_HandlePenMotion(SDL_uikitview *view, UITouch *pencil);
|
||||
extern void UIKit_HandlePenPress(SDL_uikitview *view, UITouch *pencil);
|
||||
extern void UIKit_HandlePenRelease(SDL_uikitview *view, UITouch *pencil);
|
||||
|
||||
#if !defined(SDL_PLATFORM_TVOS)
|
||||
extern void UIKit_HandlePenHover(SDL_uikitview *view, UIHoverGestureRecognizer *recognizer) API_AVAILABLE(ios(13.0));
|
||||
#endif
|
||||
|
||||
extern void UIKit_QuitPen(SDL_VideoDevice *_this);
|
||||
|
||||
#endif // SDL_uikitpen_h_
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#ifndef SDL_uikitvideo_h_
|
||||
#define SDL_uikitvideo_h_
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
#include <UIKit/UIKit.h>
|
||||
|
||||
@interface SDL_UIKitVideoData : NSObject
|
||||
|
||||
@property(nonatomic, assign) id pasteboardObserver;
|
||||
|
||||
@end
|
||||
|
||||
#ifdef SDL_PLATFORM_VISIONOS
|
||||
CGRect UIKit_ComputeViewFrame(SDL_Window *window);
|
||||
#else
|
||||
CGRect UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen);
|
||||
#endif
|
||||
|
||||
#endif // __OBJC__
|
||||
|
||||
bool UIKit_SuspendScreenSaver(SDL_VideoDevice *_this);
|
||||
|
||||
void UIKit_ForceUpdateHomeIndicator(void);
|
||||
|
||||
bool UIKit_IsSystemVersionAtLeast(double version);
|
||||
|
||||
SDL_SystemTheme UIKit_GetSystemTheme(void);
|
||||
|
||||
#endif // SDL_uikitvideo_h_
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
#if !defined(SDL_PLATFORM_TVOS)
|
||||
@interface SDL_uikitview : UIView <UIPointerInteractionDelegate>
|
||||
#else
|
||||
@interface SDL_uikitview : UIView
|
||||
#endif
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame;
|
||||
|
||||
- (void)setSDLWindow:(SDL_Window *)window;
|
||||
- (SDL_Window *)getSDLWindow;
|
||||
|
||||
#if !defined(SDL_PLATFORM_TVOS)
|
||||
- (void)pencilHovering:(UIHoverGestureRecognizer *)recognizer API_AVAILABLE(ios(13.0));
|
||||
|
||||
- (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction regionForRequest:(UIPointerRegionRequest *)request defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4));
|
||||
- (UIPointerStyle *)pointerInteraction:(UIPointerInteraction *)interaction styleForRegion:(UIPointerRegion *)region API_AVAILABLE(ios(13.4));
|
||||
- (void)indirectPointerHovering:(UIHoverGestureRecognizer *)recognizer API_AVAILABLE(ios(13.4));
|
||||
#endif
|
||||
|
||||
- (CGPoint)touchLocation:(UITouch *)touch shouldNormalize:(BOOL)normalize;
|
||||
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
|
||||
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
|
||||
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
|
||||
|
||||
- (void)safeAreaInsetsDidChange;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
#ifdef SDL_PLATFORM_TVOS
|
||||
#import <GameController/GameController.h>
|
||||
#define SDLRootViewController GCEventViewController
|
||||
#else
|
||||
#define SDLRootViewController UIViewController
|
||||
#endif
|
||||
|
||||
@interface SDLUITextField : UITextField
|
||||
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender;
|
||||
@end
|
||||
|
||||
#ifdef SDL_IPHONE_KEYBOARD
|
||||
@interface SDL_uikitviewcontroller : SDLRootViewController <UITextFieldDelegate>
|
||||
#else
|
||||
@interface SDL_uikitviewcontroller : SDLRootViewController
|
||||
#endif
|
||||
|
||||
@property(nonatomic, assign) SDL_Window *window;
|
||||
|
||||
- (instancetype)initWithSDLWindow:(SDL_Window *)_window;
|
||||
|
||||
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection;
|
||||
|
||||
- (void)setAnimationCallback:(int)interval
|
||||
callback:(void (*)(void *))callback
|
||||
callbackParam:(void *)callbackParam;
|
||||
|
||||
- (void)startAnimation;
|
||||
- (void)stopAnimation;
|
||||
|
||||
- (void)doLoop:(CADisplayLink *)sender;
|
||||
|
||||
- (void)loadView;
|
||||
- (void)viewDidLayoutSubviews;
|
||||
|
||||
#ifndef SDL_PLATFORM_TVOS
|
||||
- (NSUInteger)supportedInterfaceOrientations;
|
||||
- (BOOL)prefersStatusBarHidden;
|
||||
- (BOOL)prefersHomeIndicatorAutoHidden;
|
||||
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures;
|
||||
|
||||
@property(nonatomic, assign) int homeIndicatorHidden;
|
||||
#endif
|
||||
|
||||
#ifdef SDL_IPHONE_KEYBOARD
|
||||
- (bool)startTextInput;
|
||||
- (bool)stopTextInput;
|
||||
- (void)initKeyboard;
|
||||
- (void)deinitKeyboard;
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification;
|
||||
- (void)keyboardWillHide:(NSNotification *)notification;
|
||||
|
||||
- (void)updateKeyboard;
|
||||
|
||||
@property(nonatomic, assign, getter=isTextFieldFocused) BOOL textFieldFocused;
|
||||
@property(nonatomic, assign) SDL_Rect textInputRect;
|
||||
@property(nonatomic, assign) int keyboardHeight;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
#ifdef SDL_IPHONE_KEYBOARD
|
||||
bool UIKit_HasScreenKeyboardSupport(SDL_VideoDevice *_this);
|
||||
bool UIKit_StartTextInput(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID props);
|
||||
bool UIKit_StopTextInput(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
void UIKit_SetTextInputProperties(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID props);
|
||||
bool UIKit_IsScreenKeyboardShown(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
bool UIKit_UpdateTextInputArea(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
#endif
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @author Mark Callow, www.edgewise-consulting.com. Based on Jacob Lifshay's
|
||||
* SDL_x11vulkan.h.
|
||||
*/
|
||||
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#ifndef SDL_uikitvulkan_h_
|
||||
#define SDL_uikitvulkan_h_
|
||||
|
||||
#include "../SDL_vulkan_internal.h"
|
||||
#include "../SDL_sysvideo.h"
|
||||
|
||||
#if defined(SDL_VIDEO_VULKAN) && defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||
|
||||
extern bool UIKit_Vulkan_LoadLibrary(SDL_VideoDevice *_this, const char *path);
|
||||
extern void UIKit_Vulkan_UnloadLibrary(SDL_VideoDevice *_this);
|
||||
extern char const * const *UIKit_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this, Uint32 *count);
|
||||
extern bool UIKit_Vulkan_CreateSurface(SDL_VideoDevice *_this,
|
||||
SDL_Window *window,
|
||||
VkInstance instance,
|
||||
const struct VkAllocationCallbacks *allocator,
|
||||
VkSurfaceKHR *surface);
|
||||
extern void UIKit_Vulkan_DestroySurface(SDL_VideoDevice *_this,
|
||||
VkInstance instance,
|
||||
VkSurfaceKHR surface,
|
||||
const struct VkAllocationCallbacks *allocator);
|
||||
|
||||
#endif
|
||||
|
||||
#endif // SDL_uikitvulkan_h_
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#ifndef SDL_uikitwindow_h_
|
||||
#define SDL_uikitwindow_h_
|
||||
|
||||
#include "../SDL_sysvideo.h"
|
||||
#import "SDL_uikitvideo.h"
|
||||
#import "SDL_uikitview.h"
|
||||
#import "SDL_uikitviewcontroller.h"
|
||||
|
||||
extern bool UIKit_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props);
|
||||
extern void UIKit_SetWindowTitle(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern void UIKit_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern void UIKit_HideWindow(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern void UIKit_RaiseWindow(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern void UIKit_SetWindowBordered(SDL_VideoDevice *_this, SDL_Window *window, bool bordered);
|
||||
extern SDL_FullscreenResult UIKit_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Window *window, SDL_VideoDisplay *display, SDL_FullscreenOp fullscreen);
|
||||
extern void UIKit_UpdatePointerLock(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern void UIKit_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern void UIKit_GetWindowSizeInPixels(SDL_VideoDevice *_this, SDL_Window *window, int *w, int *h);
|
||||
|
||||
extern NSUInteger UIKit_GetSupportedOrientations(SDL_Window *window);
|
||||
|
||||
#define SDL_METALVIEW_TAG 255
|
||||
|
||||
@class UIWindow;
|
||||
|
||||
@interface SDL_UIKitWindowData : NSObject
|
||||
|
||||
@property(nonatomic, strong) UIWindow *uiwindow;
|
||||
@property(nonatomic, strong) SDL_uikitviewcontroller *viewcontroller;
|
||||
|
||||
// Array of SDL_uikitviews owned by this window.
|
||||
@property(nonatomic, copy) NSMutableArray *views;
|
||||
|
||||
@end
|
||||
|
||||
#endif // SDL_uikitwindow_h_
|
||||
Reference in New Issue
Block a user