World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
SDL_system.h
См. документацию.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2020 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 
28 #ifndef SDL_system_h_
29 #define SDL_system_h_
30 
31 #include "SDL_stdinc.h"
32 #include "SDL_keyboard.h"
33 #include "SDL_render.h"
34 #include "SDL_video.h"
35 
36 #include "begin_code.h"
37 /* Set up for C function definitions, even when using C++ */
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 
43 /* Platform specific functions for Windows */
44 #ifdef __WIN32__
45 
49 typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam);
50 extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
51 
58 extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
59 
66 extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
67 
74 extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
75 
76 #endif /* __WIN32__ */
77 
78 
79 /* Platform specific functions for Linux */
80 #ifdef __LINUX__
81 
87 extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
88 
89 #endif /* __LINUX__ */
90 
91 /* Platform specific functions for iOS */
92 #ifdef __IPHONEOS__
93 
94 #define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
95 extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
96 
97 #define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)
98 extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
99 
100 #endif /* __IPHONEOS__ */
101 
102 
103 /* Platform specific functions for Android */
104 #ifdef __ANDROID__
105 
111 extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
112 
121 extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
122 
147 extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
148 
152 extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
153 
157 extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
158 
162 extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
163 
167 extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
168 
173 #define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
174 #define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
175 
182 extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);
183 
191 extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);
192 
199 extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
200 
201 #endif /* __ANDROID__ */
202 
203 /* Platform specific functions for WinRT */
204 #ifdef __WINRT__
205 
209 typedef enum
210 {
214 
217 
223 
228 
229 
233 typedef enum
234 {
237 
240 
243 
247 
248 
264 extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
265 
281 extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
282 
288 extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
289 
290 #endif /* __WINRT__ */
291 
295 extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
296 
297 /* Functions used by iOS application delegates to notify SDL about state changes */
298 extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void);
299 extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void);
300 extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void);
301 extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
302 extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
303 extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void);
304 #ifdef __IPHONEOS__
305 extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
306 #endif
307 
308 /* Ends C function definitions when using C++ */
309 #ifdef __cplusplus
310 }
311 #endif
312 #include "close_code.h"
313 
314 #endif /* SDL_system_h_ */
315 
316 /* vi: set ts=4 sw=4 expandtab: */
SDL_AndroidGetExternalStoragePath
const DECLSPEC char *SDLCALL SDL_AndroidGetExternalStoragePath(void)
Get the path used for external storage for this application.
SDL_AndroidGetExternalStorageState
DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void)
Get the current state of external storage, a bitmask of these values: SDL_ANDROID_EXTERNAL_STORAGE_RE...
SDL_AndroidGetJNIEnv
DECLSPEC void *SDLCALL SDL_AndroidGetJNIEnv(void)
Get the JNI environment for the current thread.
SDL_render.h
SDL_LinuxSetThreadPriority
DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority)
Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available.
SDL_Direct3D9GetAdapterIndex
DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex(int displayIndex)
Returns the D3D9 adapter index that matches the specified display index.
message
GLuint GLsizei const GLchar * message
Definition: SDL_opengl_glext.h:2486
SDL_WinRTGetFSPathUTF8
const DECLSPEC char *SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType)
Retrieves a WinRT defined path on the local file system.
SDL_OnApplicationDidChangeStatusBarOrientation
DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void)
SDL_keyboard.h
SDL_AndroidGetActivity
DECLSPEC void *SDLCALL SDL_AndroidGetActivity(void)
Get the SDL Activity object for the application.
SDL_OnApplicationWillTerminate
DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void)
IDirect3DDevice9
struct IDirect3DDevice9 IDirect3DDevice9
Definition: SDL_system.h:60
SDL_OnApplicationWillEnterForeground
DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void)
SDL_AndroidGetInternalStoragePath
const DECLSPEC char *SDLCALL SDL_AndroidGetInternalStoragePath(void)
Get the path used for internal storage for this application.
SDL_AndroidBackButton
DECLSPEC void SDLCALL SDL_AndroidBackButton(void)
Trigger the Android system back button behavior.
SDL_OnApplicationDidEnterBackground
DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void)
close_code.h
SDL_WindowsMessageHook
void(SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam)
Set a function that is called for every windows message, before TranslateMessage()
Definition: SDL_system.h:49
SDL_WINRT_DEVICEFAMILY_XBOX
@ SDL_WINRT_DEVICEFAMILY_XBOX
XBox family.
Definition: SDL_system.h:245
begin_code.h
SDL_IsAndroidTV
DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void)
Return true if the application is running on Android TV.
SDL_iPhoneSetAnimationCallback
DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window *window, int interval, void(*callback)(void *), void *callbackParam)
SDL_WINRT_DEVICEFAMILY_DESKTOP
@ SDL_WINRT_DEVICEFAMILY_DESKTOP
Desktop family.
Definition: SDL_system.h:239
SDL_WINRT_PATH_INSTALLED_LOCATION
@ SDL_WINRT_PATH_INSTALLED_LOCATION
The installed app's root directory. Files here are likely to be read-only.
Definition: SDL_system.h:213
SDL_WinRT_DeviceFamily
SDL_WinRT_DeviceFamily
WinRT Device Family.
Definition: SDL_system.h:233
SDL_Surface::userdata
void * userdata
Definition: SDL_surface.h:79
SDL_OnApplicationDidBecomeActive
DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void)
SDL_IsChromebook
DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void)
Return true if the application is running on a Chromebook.
SDL_WinRTGetFSPathUNICODE
const DECLSPEC wchar_t *SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType)
Retrieves a WinRT defined path on the local file system.
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
SDL_IsTablet
DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void)
Return true if the current device is a tablet.
SDL_WINRT_PATH_TEMP_FOLDER
@ SDL_WINRT_PATH_TEMP_FOLDER
The app's temporary data store. Unsupported on Windows Phone. Files written here may be deleted at an...
Definition: SDL_system.h:226
SDL_WinRT_Path
SDL_WinRT_Path
WinRT / Windows Phone path types.
Definition: SDL_system.h:209
SDL_OnApplicationWillResignActive
DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void)
SDL_GetAndroidSDKVersion
DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void)
Return API level of the current device.
SDL_WINRT_DEVICEFAMILY_UNKNOWN
@ SDL_WINRT_DEVICEFAMILY_UNKNOWN
Unknown family
Definition: SDL_system.h:236
void
typedef void(SDLCALL *SDL_AudioFilter)(struct SDL_AudioCVT *cvt
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:161
SDL_WINRT_PATH_LOCAL_FOLDER
@ SDL_WINRT_PATH_LOCAL_FOLDER
The app's local data store. Files may be written here.
Definition: SDL_system.h:216
SDL_IsDeXMode
DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void)
Return true is the application is running on a Samsung DeX docking station.
SDL_Window
struct SDL_Window SDL_Window
The type used to identify a window.
Definition: SDL_video.h:90
Uint64
uint64_t Uint64
Definition: SDL_stdinc.h:216
SDL_stdinc.h
SDL_WINRT_PATH_ROAMING_FOLDER
@ SDL_WINRT_PATH_ROAMING_FOLDER
The app's roaming data store. Unsupported on Windows Phone. Files written here may be copied to other...
Definition: SDL_system.h:222
SDL_RenderGetD3D9Device
DECLSPEC IDirect3DDevice9 *SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer *renderer)
Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.
SDL_WinRTGetDeviceFamily
DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily()
Detects the device family of WinRT plattform on runtime.
enabled
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: SDL_opengl_glext.h:2482
SDL_SetWindowsMessageHook
DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata)
SDL_WINRT_DEVICEFAMILY_MOBILE
@ SDL_WINRT_DEVICEFAMILY_MOBILE
Mobile family (for example smartphone)
Definition: SDL_system.h:242
SDL_video.h
SDL_Renderer
struct SDL_Renderer SDL_Renderer
Definition: SDL_render.h:132
SDL_iPhoneSetEventPump
DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled)
Sint64
int64_t Sint64
Definition: SDL_stdinc.h:210
SDL_DXGIGetOutputInfo
DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
Returns the DXGI Adapter and Output indices for the specified display index.
SDL_OnApplicationDidReceiveMemoryWarning
DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void)