SDL  2.0
SDL_system.h File Reference
#include "SDL_stdinc.h"
#include "SDL_keyboard.h"
#include "SDL_render.h"
#include "SDL_video.h"
#include "begin_code.h"
#include "close_code.h"
+ Include dependency graph for SDL_system.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* 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() More...
 
typedef struct IDirect3DDevice9 IDirect3DDevice9
 

Functions

void SDL_SetWindowsMessageHook (SDL_WindowsMessageHook callback, void *userdata)
 
int SDL_Direct3D9GetAdapterIndex (int displayIndex)
 Returns the D3D9 adapter index that matches the specified display index. More...
 
IDirect3DDevice9SDL_RenderGetD3D9Device (SDL_Renderer *renderer)
 Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer. More...
 
SDL_bool SDL_DXGIGetOutputInfo (int displayIndex, int *adapterIndex, int *outputIndex)
 Returns the DXGI Adapter and Output indices for the specified display index. More...
 
SDL_bool SDL_IsTablet (void)
 Return true if the current device is a tablet. More...
 
void SDL_OnApplicationWillTerminate (void)
 
void SDL_OnApplicationDidReceiveMemoryWarning (void)
 
void SDL_OnApplicationWillResignActive (void)
 
void SDL_OnApplicationDidEnterBackground (void)
 
void SDL_OnApplicationWillEnterForeground (void)
 
void SDL_OnApplicationDidBecomeActive (void)
 

Detailed Description

Include file for platform specific SDL API functions

Definition in file SDL_system.h.

Typedef Documentation

◆ IDirect3DDevice9

Definition at line 58 of file SDL_system.h.

◆ SDL_WindowsMessageHook

typedef void( * 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 at line 49 of file SDL_system.h.

Function Documentation

◆ SDL_Direct3D9GetAdapterIndex()

int SDL_Direct3D9GetAdapterIndex ( int  displayIndex)

Returns the D3D9 adapter index that matches the specified display index.

This adapter index can be passed to IDirect3D9::CreateDevice and controls on which monitor a full screen application will appear.

Referenced by SDLTest_CommonInit().

◆ SDL_DXGIGetOutputInfo()

SDL_bool SDL_DXGIGetOutputInfo ( int  displayIndex,
int *  adapterIndex,
int *  outputIndex 
)

Returns the DXGI Adapter and Output indices for the specified display index.

These can be passed to EnumAdapters and EnumOutputs respectively to get the objects required to create a DX10 or DX11 device and swap chain.

Referenced by SDLTest_CommonInit().

◆ SDL_IsTablet()

SDL_bool SDL_IsTablet ( void  )

Return true if the current device is a tablet.

Definition at line 519 of file SDL.c.

520 {
521 #if __ANDROID__
522  extern SDL_bool SDL_IsAndroidTablet(void);
523  return SDL_IsAndroidTablet();
524 #elif __IPHONEOS__
525  extern SDL_bool SDL_IsIPad(void);
526  return SDL_IsIPad();
527 #else
528  return SDL_FALSE;
529 #endif
530 }

References SDL_FALSE, and SDL_IsAndroidTablet().

◆ SDL_OnApplicationDidBecomeActive()

◆ SDL_OnApplicationDidEnterBackground()

void SDL_OnApplicationDidEnterBackground ( void  )

Definition at line 801 of file SDL_dynapi_procs.h.

References SDL_APP_DIDENTERBACKGROUND, and SDL_SendAppEvent().

◆ SDL_OnApplicationDidReceiveMemoryWarning()

void SDL_OnApplicationDidReceiveMemoryWarning ( void  )

Definition at line 799 of file SDL_dynapi_procs.h.

References SDL_APP_LOWMEMORY, and SDL_SendAppEvent().

◆ SDL_OnApplicationWillEnterForeground()

void SDL_OnApplicationWillEnterForeground ( void  )

Definition at line 4087 of file SDL_video.c.

References SDL_APP_WILLENTERFOREGROUND, and SDL_SendAppEvent().

◆ SDL_OnApplicationWillResignActive()

◆ SDL_OnApplicationWillTerminate()

void SDL_OnApplicationWillTerminate ( void  )

Definition at line 4060 of file SDL_video.c.

4061 {
4063 }

References SDL_APP_TERMINATING, and SDL_SendAppEvent().

◆ SDL_RenderGetD3D9Device()

IDirect3DDevice9* SDL_RenderGetD3D9Device ( SDL_Renderer renderer)

Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.

Once you are done using the device, you should release it to avoid a resource leak.

◆ SDL_SetWindowsMessageHook()

void SDL_SetWindowsMessageHook ( SDL_WindowsMessageHook  callback,
void userdata 
)
SDL_APP_TERMINATING
@ SDL_APP_TERMINATING
Definition: SDL_events.h:63
NULL
#define NULL
Definition: begin_code.h:167
SDL_WINDOWEVENT_FOCUS_LOST
@ SDL_WINDOWEVENT_FOCUS_LOST
Definition: SDL_video.h:165
SDL_IsAndroidTablet
SDL_bool SDL_IsAndroidTablet(void)
SDL_APP_WILLENTERFOREGROUND
@ SDL_APP_WILLENTERFOREGROUND
Definition: SDL_events.h:79
SDL_Window
The type used to identify a window.
Definition: SDL_sysvideo.h:75
_this
static SDL_VideoDevice * _this
Definition: SDL_video.c:121
window
EGLSurface EGLNativeWindowType * window
Definition: eglext.h:1025
SDL_APP_WILLENTERBACKGROUND
@ SDL_APP_WILLENTERBACKGROUND
Definition: SDL_events.h:71
SDL_WINDOWEVENT_MINIMIZED
@ SDL_WINDOWEVENT_MINIMIZED
Definition: SDL_video.h:158
SDL_SendWindowEvent
int SDL_SendWindowEvent(SDL_Window *window, Uint8 windowevent, int data1, int data2)
Definition: SDL_windowevents.c:74
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:162
SDL_FALSE
@ SDL_FALSE
Definition: SDL_stdinc.h:163
SDL_SendAppEvent
int SDL_SendAppEvent(SDL_EventType eventType)
Definition: SDL_events.c:972
SDL_VideoDevice::windows
SDL_Window * windows
Definition: SDL_sysvideo.h:325