SDL_core_unsupported.c 5.5 KB

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