1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22
23#ifndef SDL_VIDEO_DRIVER_X11
24
25SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata);
26void SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata)
27{
28}
29
30#endif
31
32#ifndef SDL_PLATFORM_LINUX
33
34SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriority(Sint64 threadID, int priority);
35bool SDL_SetLinuxThreadPriority(Sint64 threadID, int priority)
36{
37 (void)threadID;
38 (void)priority;
39 return SDL_Unsupported();
40}
41
42SDL_DECLSPEC bool SDLCALL SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
43bool SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy)
44{
45 (void)threadID;
46 (void)sdlPriority;
47 (void)schedPolicy;
48 return SDL_Unsupported();
49}
50
51#endif
52
53#ifndef SDL_PLATFORM_GDK
54
55SDL_DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
56void SDL_GDKSuspendComplete(void)
57{
58 SDL_Unsupported();
59}
60
61SDL_DECLSPEC bool SDLCALL SDL_GetGDKDefaultUser(void *outUserHandle); /* XUserHandle *outUserHandle */
62bool SDL_GetGDKDefaultUser(void *outUserHandle)
63{
64 return SDL_Unsupported();
65}
66
67SDL_DECLSPEC void SDLCALL SDL_GDKSuspendGPU(SDL_GPUDevice *device);
68void SDL_GDKSuspendGPU(SDL_GPUDevice *device)
69{
70}
71
72SDL_DECLSPEC void SDLCALL SDL_GDKResumeGPU(SDL_GPUDevice *device);
73void SDL_GDKResumeGPU(SDL_GPUDevice *device)
74{
75}
76
77#endif
78
79#if !defined(SDL_PLATFORM_WINDOWS)
80
81SDL_DECLSPEC bool SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
82bool SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
83{
84 (void)name;
85 (void)style;
86 (void)hInst;
87 return SDL_Unsupported();
88}
89
90SDL_DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(void *callback, void *userdata); // SDL_WindowsMessageHook callback
91void SDL_SetWindowsMessageHook(void *callback, void *userdata)
92{
93 (void)callback;
94 (void)userdata;
95 SDL_Unsupported();
96}
97
98SDL_DECLSPEC void SDLCALL SDL_UnregisterApp(void);
99void SDL_UnregisterApp(void)
100{
101 SDL_Unsupported();
102}
103
104#endif
105
106#ifndef SDL_PLATFORM_ANDROID
107
108SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void);
109void SDL_SendAndroidBackButton(void)
110{
111 SDL_Unsupported();
112}
113
114SDL_DECLSPEC void * SDLCALL SDL_GetAndroidActivity(void);
115void *SDL_GetAndroidActivity(void)
116{
117 SDL_Unsupported();
118 return NULL;
119}
120
121SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidCachePath(void);
122const char* SDL_GetAndroidCachePath(void)
123{
124 SDL_Unsupported();
125 return NULL;
126}
127
128
129SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidExternalStoragePath(void);
130const char* SDL_GetAndroidExternalStoragePath(void)
131{
132 SDL_Unsupported();
133 return NULL;
134}
135
136SDL_DECLSPEC Uint32 SDLCALL SDL_GetAndroidExternalStorageState(void);
137Uint32 SDL_GetAndroidExternalStorageState(void)
138{
139 SDL_Unsupported();
140 return 0;
141}
142SDL_DECLSPEC const char * SDLCALL SDL_GetAndroidInternalStoragePath(void);
143const char *SDL_GetAndroidInternalStoragePath(void)
144{
145 SDL_Unsupported();
146 return NULL;
147}
148
149SDL_DECLSPEC void * SDLCALL SDL_GetAndroidJNIEnv(void);
150void *SDL_GetAndroidJNIEnv(void)
151{
152 SDL_Unsupported();
153 return NULL;
154}
155
156typedef void (SDLCALL *SDL_RequestAndroidPermissionCallback)(void *userdata, const char *permission, bool granted);
157SDL_DECLSPEC bool SDLCALL SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata);
158bool SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata)
159{
160 (void)permission;
161 (void)cb;
162 (void)userdata;
163 return SDL_Unsupported();
164}
165
166SDL_DECLSPEC bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int param);
167bool SDL_SendAndroidMessage(Uint32 command, int param)
168{
169 (void)command;
170 (void)param;
171 return SDL_Unsupported();
172}
173
174SDL_DECLSPEC bool SDLCALL SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xoffset, int yoffset);
175bool SDL_ShowAndroidToast(const char* message, int duration, int gravity, int xoffset, int yoffset)
176{
177 (void)message;
178 (void)duration;
179 (void)gravity;
180 (void)xoffset;
181 (void)yoffset;
182 return SDL_Unsupported();
183}
184
185SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
186int SDL_GetAndroidSDKVersion(void)
187{
188 return SDL_Unsupported();
189}
190
191SDL_DECLSPEC bool SDLCALL SDL_IsChromebook(void);
192bool SDL_IsChromebook(void)
193{
194 SDL_Unsupported();
195 return false;
196}
197
198SDL_DECLSPEC bool SDLCALL SDL_IsDeXMode(void);
199bool SDL_IsDeXMode(void)
200{
201 SDL_Unsupported();
202 return false;
203}
204
205SDL_DECLSPEC Sint32 SDLCALL JNI_OnLoad(void *vm, void *reserved);
206Sint32 JNI_OnLoad(void *vm, void *reserved)
207{
208 (void)vm;
209 (void)reserved;
210 SDL_Unsupported();
211 return -1; // JNI_ERR
212}
213#endif
214