SDL standard library
Embed:
(wiki syntax)
Show/hide line numbers
SDL_system.h
Go to the documentation of this file.
00001 /* 00002 Simple DirectMedia Layer 00003 Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org> 00004 00005 This software is provided 'as-is', without any express or implied 00006 warranty. In no event will the authors be held liable for any damages 00007 arising from the use of this software. 00008 00009 Permission is granted to anyone to use this software for any purpose, 00010 including commercial applications, and to alter it and redistribute it 00011 freely, subject to the following restrictions: 00012 00013 1. The origin of this software must not be misrepresented; you must not 00014 claim that you wrote the original software. If you use this software 00015 in a product, an acknowledgment in the product documentation would be 00016 appreciated but is not required. 00017 2. Altered source versions must be plainly marked as such, and must not be 00018 misrepresented as being the original software. 00019 3. This notice may not be removed or altered from any source distribution. 00020 */ 00021 00022 /** 00023 * \file SDL_system.h 00024 * 00025 * Include file for platform specific SDL API functions 00026 */ 00027 00028 #ifndef _SDL_system_h 00029 #define _SDL_system_h 00030 00031 #include "SDL_stdinc.h" 00032 #include "SDL_keyboard.h" 00033 #include "SDL_render.h" 00034 #include "SDL_video.h" 00035 00036 #include "begin_code.h" 00037 /* Set up for C function definitions, even when using C++ */ 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 00043 /* Platform specific functions for Windows */ 00044 #ifdef __WIN32__ 00045 00046 /* Returns the D3D9 adapter index that matches the specified display index. 00047 This adapter index can be passed to IDirect3D9::CreateDevice and controls 00048 on which monitor a full screen application will appear. 00049 */ 00050 extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex ); 00051 00052 /* Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer. 00053 Once you are done using the device, you should release it to avoid a resource leak. 00054 */ 00055 typedef struct IDirect3DDevice9 IDirect3DDevice9; 00056 extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer); 00057 00058 /* Returns the DXGI Adapter and Output indices for the specified display index. 00059 These can be passed to EnumAdapters and EnumOutputs respectively to get the objects 00060 required to create a DX10 or DX11 device and swap chain. 00061 */ 00062 extern DECLSPEC void SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex ); 00063 00064 #endif /* __WIN32__ */ 00065 00066 00067 /* Platform specific functions for iOS */ 00068 #if defined(__IPHONEOS__) && __IPHONEOS__ 00069 00070 extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); 00071 extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled); 00072 00073 #endif /* __IPHONEOS__ */ 00074 00075 00076 /* Platform specific functions for Android */ 00077 #if defined(__ANDROID__) && __ANDROID__ 00078 00079 /* Get the JNI environment for the current thread 00080 This returns JNIEnv*, but the prototype is void* so we don't need jni.h 00081 */ 00082 extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(); 00083 00084 /* Get the SDL Activity object for the application 00085 This returns jobject, but the prototype is void* so we don't need jni.h 00086 The jobject returned by SDL_AndroidGetActivity is a local reference. 00087 It is the caller's responsibility to properly release it 00088 (using env->Push/PopLocalFrame or manually with env->DeleteLocalRef) 00089 */ 00090 extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(); 00091 00092 /* See the official Android developer guide for more information: 00093 http://developer.android.com/guide/topics/data/data-storage.html 00094 */ 00095 #define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01 00096 #define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02 00097 00098 /* Get the path used for internal storage for this application. 00099 This path is unique to your application and cannot be written to 00100 by other applications. 00101 */ 00102 extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(); 00103 00104 /* Get the current state of external storage, a bitmask of these values: 00105 SDL_ANDROID_EXTERNAL_STORAGE_READ 00106 SDL_ANDROID_EXTERNAL_STORAGE_WRITE 00107 If external storage is currently unavailable, this will return 0. 00108 */ 00109 extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(); 00110 00111 /* Get the path used for external storage for this application. 00112 This path is unique to your application, but is public and can be 00113 written to by other applications. 00114 */ 00115 extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(); 00116 00117 #endif /* __ANDROID__ */ 00118 00119 /* Ends C function definitions when using C++ */ 00120 #ifdef __cplusplus 00121 } 00122 #endif 00123 #include "close_code.h" 00124 00125 #endif /* _SDL_system_h */ 00126 00127 /* vi: set ts=4 sw=4 expandtab: */
Generated on Tue Jul 12 2022 13:56:25 by 1.7.2