summaryrefslogtreecommitdiff
path: root/src/contrib/SDL-3.2.20/test/testnative.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-08-30 16:53:58 -0700
committer3gg <3gg@shellblade.net>2025-08-30 16:53:58 -0700
commit6aaedb813fa11ba0679c3051bc2eb28646b9506c (patch)
tree34acbfc9840e02cb4753e6306ea7ce978bf8b58e /src/contrib/SDL-3.2.20/test/testnative.h
parent8f228ade99dd3d4c8da9b78ade1815c9adf85c8f (diff)
Update to SDL3
Diffstat (limited to 'src/contrib/SDL-3.2.20/test/testnative.h')
-rw-r--r--src/contrib/SDL-3.2.20/test/testnative.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/contrib/SDL-3.2.20/test/testnative.h b/src/contrib/SDL-3.2.20/test/testnative.h
new file mode 100644
index 0000000..85666d7
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/test/testnative.h
@@ -0,0 +1,46 @@
1/*
2 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely.
11*/
12
13/* Definitions for platform dependent windowing functions to test SDL
14 integration with native windows
15*/
16
17#include <SDL3/SDL.h>
18
19#include "SDL_build_config.h"
20
21typedef struct
22{
23 const char *tag;
24 void *(*CreateNativeWindow)(int w, int h);
25 void (*DestroyNativeWindow)(void *window);
26} NativeWindowFactory;
27
28#ifdef SDL_VIDEO_DRIVER_WINDOWS
29#define TEST_NATIVE_WINDOWS
30extern NativeWindowFactory WindowsWindowFactory;
31#endif
32
33#ifdef SDL_VIDEO_DRIVER_WAYLAND
34#define TEST_NATIVE_WAYLAND
35extern NativeWindowFactory WaylandWindowFactory;
36#endif
37
38#ifdef SDL_VIDEO_DRIVER_X11
39#define TEST_NATIVE_X11
40extern NativeWindowFactory X11WindowFactory;
41#endif
42
43#ifdef SDL_VIDEO_DRIVER_COCOA
44#define TEST_NATIVE_COCOA
45extern NativeWindowFactory CocoaWindowFactory;
46#endif