SDL  2.0
SDL_windowsvideo.c
Go to the documentation of this file.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2017 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 #if SDL_VIDEO_DRIVER_WINDOWS
24 
25 #include "SDL_main.h"
26 #include "SDL_video.h"
27 #include "SDL_hints.h"
28 #include "SDL_mouse.h"
29 #include "SDL_system.h"
30 #include "../SDL_sysvideo.h"
31 #include "../SDL_pixels_c.h"
32 
33 #include "SDL_windowsvideo.h"
34 #include "SDL_windowsframebuffer.h"
35 #include "SDL_windowsshape.h"
36 #include "SDL_windowsvulkan.h"
37 
38 /* Initialization/Query functions */
39 static int WIN_VideoInit(_THIS);
40 static void WIN_VideoQuit(_THIS);
41 
42 /* Hints */
45 
46 static void SDLCALL
47 UpdateWindowsEnableMessageLoop(void *userdata, const char *name, const char *oldValue, const char *newValue)
48 {
49  if (newValue && *newValue == '0') {
51  } else {
53  }
54 }
55 
56 static void SDLCALL
57 UpdateWindowFrameUsableWhileCursorHidden(void *userdata, const char *name, const char *oldValue, const char *newValue)
58 {
59  if (newValue && *newValue == '0') {
61  } else {
63  }
64 }
65 
66 
67 /* Windows driver bootstrap functions */
68 
69 static int
70 WIN_Available(void)
71 {
72  return (1);
73 }
74 
75 static void
76 WIN_DeleteDevice(SDL_VideoDevice * device)
77 {
79 
81  if (data->userDLL) {
83  }
84  if (data->shcoreDLL) {
86  }
87 
88  SDL_free(device->driverdata);
89  SDL_free(device);
90 }
91 
92 static SDL_VideoDevice *
93 WIN_CreateDevice(int devindex)
94 {
97 
99 
100  /* Initialize all variables that we clean on shutdown */
101  device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
102  if (device) {
103  data = (struct SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData));
104  } else {
105  data = NULL;
106  }
107  if (!data) {
108  SDL_free(device);
109  SDL_OutOfMemory();
110  return NULL;
111  }
112  device->driverdata = data;
113 
114  data->userDLL = SDL_LoadObject("USER32.DLL");
115  if (data->userDLL) {
116  data->CloseTouchInputHandle = (BOOL (WINAPI *)(HTOUCHINPUT)) SDL_LoadFunction(data->userDLL, "CloseTouchInputHandle");
117  data->GetTouchInputInfo = (BOOL (WINAPI *)(HTOUCHINPUT, UINT, PTOUCHINPUT, int)) SDL_LoadFunction(data->userDLL, "GetTouchInputInfo");
118  data->RegisterTouchWindow = (BOOL (WINAPI *)(HWND, ULONG)) SDL_LoadFunction(data->userDLL, "RegisterTouchWindow");
119  } else {
120  SDL_ClearError();
121  }
122 
123  data->shcoreDLL = SDL_LoadObject("SHCORE.DLL");
124  if (data->shcoreDLL) {
125  data->GetDpiForMonitor = (HRESULT (WINAPI *)(HMONITOR, MONITOR_DPI_TYPE, UINT *, UINT *)) SDL_LoadFunction(data->shcoreDLL, "GetDpiForMonitor");
126  } else {
127  SDL_ClearError();
128  }
129 
130  /* Set the function pointers */
131  device->VideoInit = WIN_VideoInit;
132  device->VideoQuit = WIN_VideoQuit;
138  device->PumpEvents = WIN_PumpEvents;
139 
147  device->ShowWindow = WIN_ShowWindow;
148  device->HideWindow = WIN_HideWindow;
149  device->RaiseWindow = WIN_RaiseWindow;
166 
170 
171 #if SDL_VIDEO_OPENGL_WGL
172  device->GL_LoadLibrary = WIN_GL_LoadLibrary;
173  device->GL_GetProcAddress = WIN_GL_GetProcAddress;
174  device->GL_UnloadLibrary = WIN_GL_UnloadLibrary;
175  device->GL_CreateContext = WIN_GL_CreateContext;
176  device->GL_MakeCurrent = WIN_GL_MakeCurrent;
177  device->GL_SetSwapInterval = WIN_GL_SetSwapInterval;
178  device->GL_GetSwapInterval = WIN_GL_GetSwapInterval;
179  device->GL_SwapWindow = WIN_GL_SwapWindow;
180  device->GL_DeleteContext = WIN_GL_DeleteContext;
181 #elif SDL_VIDEO_OPENGL_EGL
182  /* Use EGL based functions */
183  device->GL_LoadLibrary = WIN_GLES_LoadLibrary;
184  device->GL_GetProcAddress = WIN_GLES_GetProcAddress;
185  device->GL_UnloadLibrary = WIN_GLES_UnloadLibrary;
186  device->GL_CreateContext = WIN_GLES_CreateContext;
187  device->GL_MakeCurrent = WIN_GLES_MakeCurrent;
188  device->GL_SetSwapInterval = WIN_GLES_SetSwapInterval;
189  device->GL_GetSwapInterval = WIN_GLES_GetSwapInterval;
190  device->GL_SwapWindow = WIN_GLES_SwapWindow;
191  device->GL_DeleteContext = WIN_GLES_DeleteContext;
192 #endif
193 #if SDL_VIDEO_VULKAN
194  device->Vulkan_LoadLibrary = WIN_Vulkan_LoadLibrary;
195  device->Vulkan_UnloadLibrary = WIN_Vulkan_UnloadLibrary;
196  device->Vulkan_GetInstanceExtensions = WIN_Vulkan_GetInstanceExtensions;
197  device->Vulkan_CreateSurface = WIN_Vulkan_CreateSurface;
198 #endif
199 
203 
207 
208  device->free = WIN_DeleteDevice;
209 
210  return device;
211 }
212 
213 
215  "windows", "SDL Windows video driver", WIN_Available, WIN_CreateDevice
216 };
217 
218 int
219 WIN_VideoInit(_THIS)
220 {
221  if (WIN_InitModes(_this) < 0) {
222  return -1;
223  }
224 
227 
228  SDL_AddHintCallback(SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP, UpdateWindowsEnableMessageLoop, NULL);
229  SDL_AddHintCallback(SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN, UpdateWindowFrameUsableWhileCursorHidden, NULL);
230 
231  return 0;
232 }
233 
234 void
235 WIN_VideoQuit(_THIS)
236 {
240 }
241 
242 
243 #define D3D_DEBUG_INFO
244 #include <d3d9.h>
245 
246 SDL_bool
247 D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface)
248 {
249  *pD3DDLL = SDL_LoadObject("D3D9.DLL");
250  if (*pD3DDLL) {
251  typedef IDirect3D9 *(WINAPI *Direct3DCreate9_t) (UINT SDKVersion);
252  Direct3DCreate9_t Direct3DCreate9Func;
253 
254 #ifdef USE_D3D9EX
255  typedef HRESULT (WINAPI *Direct3DCreate9Ex_t)(UINT SDKVersion, IDirect3D9Ex **ppD3D);
256  Direct3DCreate9Ex_t Direct3DCreate9ExFunc;
257 
258  Direct3DCreate9ExFunc = (Direct3DCreate9Ex_t)SDL_LoadFunction(*pD3DDLL, "Direct3DCreate9Ex");
259  if (Direct3DCreate9ExFunc) {
260  IDirect3D9Ex *pDirect3D9ExInterface;
261  HRESULT hr = Direct3DCreate9ExFunc(D3D_SDK_VERSION, &pDirect3D9ExInterface);
262  if (SUCCEEDED(hr)) {
263  const GUID IDirect3D9_GUID = { 0x81bdcbca, 0x64d4, 0x426d, { 0xae, 0x8d, 0xad, 0x1, 0x47, 0xf4, 0x27, 0x5c } };
264  hr = IDirect3D9Ex_QueryInterface(pDirect3D9ExInterface, &IDirect3D9_GUID, (void**)pDirect3D9Interface);
265  IDirect3D9Ex_Release(pDirect3D9ExInterface);
266  if (SUCCEEDED(hr)) {
267  return SDL_TRUE;
268  }
269  }
270  }
271 #endif /* USE_D3D9EX */
272 
273  Direct3DCreate9Func = (Direct3DCreate9_t)SDL_LoadFunction(*pD3DDLL, "Direct3DCreate9");
274  if (Direct3DCreate9Func) {
275  *pDirect3D9Interface = Direct3DCreate9Func(D3D_SDK_VERSION);
276  if (*pDirect3D9Interface) {
277  return SDL_TRUE;
278  }
279  }
280 
281  SDL_UnloadObject(*pD3DDLL);
282  *pD3DDLL = NULL;
283  }
284  *pDirect3D9Interface = NULL;
285  return SDL_FALSE;
286 }
287 
288 
289 int
290 SDL_Direct3D9GetAdapterIndex(int displayIndex)
291 {
292  void *pD3DDLL;
293  IDirect3D9 *pD3D;
294  if (!D3D_LoadDLL(&pD3DDLL, &pD3D)) {
295  SDL_SetError("Unable to create Direct3D interface");
296  return D3DADAPTER_DEFAULT;
297  } else {
298  SDL_DisplayData *pData = (SDL_DisplayData *)SDL_GetDisplayDriverData(displayIndex);
299  int adapterIndex = D3DADAPTER_DEFAULT;
300 
301  if (!pData) {
302  SDL_SetError("Invalid display index");
303  adapterIndex = -1; /* make sure we return something invalid */
304  } else {
305  char *displayName = WIN_StringToUTF8(pData->DeviceName);
306  unsigned int count = IDirect3D9_GetAdapterCount(pD3D);
307  unsigned int i;
308  for (i=0; i<count; i++) {
309  D3DADAPTER_IDENTIFIER9 id;
310  IDirect3D9_GetAdapterIdentifier(pD3D, i, 0, &id);
311 
312  if (SDL_strcmp(id.DeviceName, displayName) == 0) {
313  adapterIndex = i;
314  break;
315  }
316  }
317  SDL_free(displayName);
318  }
319 
320  /* free up the D3D stuff we inited */
321  IDirect3D9_Release(pD3D);
322  SDL_UnloadObject(pD3DDLL);
323 
324  return adapterIndex;
325  }
326 }
327 
328 #if HAVE_DXGI_H
329 #define CINTERFACE
330 #define COBJMACROS
331 #include <dxgi.h>
332 
333 static SDL_bool
334 DXGI_LoadDLL(void **pDXGIDLL, IDXGIFactory **pDXGIFactory)
335 {
336  *pDXGIDLL = SDL_LoadObject("DXGI.DLL");
337  if (*pDXGIDLL) {
338  HRESULT (WINAPI *CreateDXGI)(REFIID riid, void **ppFactory);
339 
340  CreateDXGI =
341  (HRESULT (WINAPI *) (REFIID, void**)) SDL_LoadFunction(*pDXGIDLL,
342  "CreateDXGIFactory");
343  if (CreateDXGI) {
344  GUID dxgiGUID = {0x7b7166ec,0x21c7,0x44ae,{0xb2,0x1a,0xc9,0xae,0x32,0x1a,0xe3,0x69}};
345  if (!SUCCEEDED(CreateDXGI(&dxgiGUID, (void**)pDXGIFactory))) {
346  *pDXGIFactory = NULL;
347  }
348  }
349  if (!*pDXGIFactory) {
350  SDL_UnloadObject(*pDXGIDLL);
351  *pDXGIDLL = NULL;
352  return SDL_FALSE;
353  }
354 
355  return SDL_TRUE;
356  } else {
357  *pDXGIFactory = NULL;
358  return SDL_FALSE;
359  }
360 }
361 #endif
362 
363 
364 SDL_bool
365 SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
366 {
367 #if !HAVE_DXGI_H
368  if (adapterIndex) *adapterIndex = -1;
369  if (outputIndex) *outputIndex = -1;
370  SDL_SetError("SDL was compiled without DXGI support due to missing dxgi.h header");
371  return SDL_FALSE;
372 #else
373  SDL_DisplayData *pData = (SDL_DisplayData *)SDL_GetDisplayDriverData(displayIndex);
374  void *pDXGIDLL;
375  char *displayName;
376  int nAdapter, nOutput;
377  IDXGIFactory *pDXGIFactory;
378  IDXGIAdapter *pDXGIAdapter;
379  IDXGIOutput* pDXGIOutput;
380 
381  if (!adapterIndex) {
382  SDL_InvalidParamError("adapterIndex");
383  return SDL_FALSE;
384  }
385 
386  if (!outputIndex) {
387  SDL_InvalidParamError("outputIndex");
388  return SDL_FALSE;
389  }
390 
391  *adapterIndex = -1;
392  *outputIndex = -1;
393 
394  if (!pData) {
395  SDL_SetError("Invalid display index");
396  return SDL_FALSE;
397  }
398 
399  if (!DXGI_LoadDLL(&pDXGIDLL, &pDXGIFactory)) {
400  SDL_SetError("Unable to create DXGI interface");
401  return SDL_FALSE;
402  }
403 
404  displayName = WIN_StringToUTF8(pData->DeviceName);
405  nAdapter = 0;
406  while (*adapterIndex == -1 && SUCCEEDED(IDXGIFactory_EnumAdapters(pDXGIFactory, nAdapter, &pDXGIAdapter))) {
407  nOutput = 0;
408  while (*adapterIndex == -1 && SUCCEEDED(IDXGIAdapter_EnumOutputs(pDXGIAdapter, nOutput, &pDXGIOutput))) {
409  DXGI_OUTPUT_DESC outputDesc;
410  if (SUCCEEDED(IDXGIOutput_GetDesc(pDXGIOutput, &outputDesc))) {
411  char *outputName = WIN_StringToUTF8(outputDesc.DeviceName);
412  if (SDL_strcmp(outputName, displayName) == 0) {
413  *adapterIndex = nAdapter;
414  *outputIndex = nOutput;
415  }
416  SDL_free(outputName);
417  }
418  IDXGIOutput_Release(pDXGIOutput);
419  nOutput++;
420  }
421  IDXGIAdapter_Release(pDXGIAdapter);
422  nAdapter++;
423  }
424  SDL_free(displayName);
425 
426  /* free up the DXGI factory */
427  IDXGIFactory_Release(pDXGIFactory);
428  SDL_UnloadObject(pDXGIDLL);
429 
430  if (*adapterIndex == -1) {
431  return SDL_FALSE;
432  } else {
433  return SDL_TRUE;
434  }
435 #endif
436 }
437 
438 #endif /* SDL_VIDEO_DRIVER_WINDOWS */
439 
440 /* vim: set ts=4 sw=4 expandtab: */
int(* Vulkan_LoadLibrary)(_THIS, const char *path)
Definition: SDL_sysvideo.h:270
struct IDirect3D9 IDirect3D9
int(* GetDisplayDPI)(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi)
Definition: SDL_sysvideo.h:186
#define SDL_ClearError
GLuint id
SDL_bool g_WindowFrameUsableWhileCursorHidden
void(* RestoreWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:227
void WIN_SetWindowSize(_THIS, SDL_Window *window)
int Win32_ResizeWindowShape(SDL_Window *window)
SDL_bool SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
Returns the DXGI Adapter and Output indices for the specified display index.
int(* SetWindowHitTest)(SDL_Window *window, SDL_bool enabled)
Definition: SDL_sysvideo.h:305
void WIN_QuitModes(_THIS)
void WIN_RaiseWindow(_THIS, SDL_Window *window)
GLuint GLuint GLsizei count
Definition: SDL_opengl.h:1571
MONITOR_DPI_TYPE
int WIN_GetWindowGammaRamp(_THIS, SDL_Window *window, Uint16 *ramp)
void(* free)(_THIS)
Definition: SDL_sysvideo.h:390
void WIN_DestroyWindow(_THIS, SDL_Window *window)
char * WIN_GetClipboardText(_THIS)
SDL_bool WIN_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
int(* GL_SetSwapInterval)(_THIS, int interval)
Definition: SDL_sysvideo.h:260
void WIN_MaximizeWindow(_THIS, SDL_Window *window)
void(* ShowWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:222
void(* StartTextInput)(_THIS)
Definition: SDL_sysvideo.h:286
void(* SetWindowSize)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:215
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
SDL_WindowShaper * Win32_CreateShaper(SDL_Window *window)
#define SDL_InvalidParamError(param)
Definition: SDL_error.h:54
#define SDL_LoadObject
#define SDL_UnloadObject
int WIN_InitModes(_THIS)
SDL_bool g_WindowsEnableMessageLoop
void WIN_OnWindowEnter(_THIS, SDL_Window *window)
int(* GL_LoadLibrary)(_THIS, const char *path)
Definition: SDL_sysvideo.h:254
GLuint const GLchar * name
int(* SetDisplayMode)(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
Definition: SDL_sysvideo.h:204
void WIN_SetWindowPosition(_THIS, SDL_Window *window)
void * SDL_GetDisplayDriverData(int displayIndex)
Definition: SDL_video.c:660
int WIN_SetWindowHitTest(SDL_Window *window, SDL_bool enabled)
void(* SetWindowBordered)(_THIS, SDL_Window *window, SDL_bool bordered)
Definition: SDL_sysvideo.h:228
int WIN_CreateWindow(_THIS, SDL_Window *window)
int SDL_Direct3D9GetAdapterIndex(int displayIndex)
Returns the D3D9 adapter index that matches the specified display index.
static SDL_VideoDevice * _this
Definition: SDL_video.c:121
void WIN_InitMouse(_THIS)
int WIN_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch)
void(* HideWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:223
static SDL_AudioDeviceID device
Definition: loopwave.c:37
void SDL_UnregisterApp(void)
void WIN_GetDisplayModes(_THIS, SDL_VideoDisplay *display)
TCHAR DeviceName[32]
void(* RaiseWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:224
int(* SetWindowShape)(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
Definition: SDL_sysvideo.h:61
void(* SetTextInputRect)(_THIS, SDL_Rect *rect)
Definition: SDL_sysvideo.h:288
void WIN_StartTextInput(_THIS)
SDL_bool(* Vulkan_GetInstanceExtensions)(_THIS, SDL_Window *window, unsigned *count, const char **names)
Definition: SDL_sysvideo.h:272
int WIN_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect)
SDL_bool(* GetWindowWMInfo)(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
Definition: SDL_sysvideo.h:247
SDL_GLContext(* GL_CreateContext)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:257
void WIN_DestroyWindowFramebuffer(_THIS, SDL_Window *window)
void WIN_SetWindowResizable(_THIS, SDL_Window *window, SDL_bool resizable)
#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP
A variable controlling whether the windows message loop is processed by SDL.
Definition: SDL_hints.h:239
VideoBootStrap WINDOWS_bootstrap
SDL_bool(* Vulkan_CreateSurface)(_THIS, SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface)
Definition: SDL_sysvideo.h:273
void WIN_MinimizeWindow(_THIS, SDL_Window *window)
#define _THIS
int(* GL_MakeCurrent)(_THIS, SDL_Window *window, SDL_GLContext context)
Definition: SDL_sysvideo.h:258
#define SDL_free
int WIN_SetWindowOpacity(_THIS, SDL_Window *window, float opacity)
HRESULT(WINAPI *GetDpiForMonitor)(HMONITOR hmonitor
void WIN_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon)
void(* Vulkan_UnloadLibrary)(_THIS)
Definition: SDL_sysvideo.h:271
int WIN_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
void WIN_ShowWindow(_THIS, SDL_Window *window)
int(* GetDisplayBounds)(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect)
Definition: SDL_sysvideo.h:181
void(* DestroyWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:234
void WIN_StopTextInput(_THIS)
#define WIN_StringToUTF8(S)
Definition: SDL_windows.h:46
void(* StopTextInput)(_THIS)
Definition: SDL_sysvideo.h:287
void(* SetWindowIcon)(_THIS, SDL_Window *window, SDL_Surface *icon)
Definition: SDL_sysvideo.h:213
void WIN_InitKeyboard(_THIS)
SDL_bool WIN_HasClipboardText(_THIS)
#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN
A variable controlling whether the window frame and title bar are interactive when the cursor is hidd...
Definition: SDL_hints.h:222
void WIN_QuitKeyboard(_THIS)
BOOL(WINAPI *CloseTouchInputHandle)(HTOUCHINPUT)
void WIN_RestoreWindow(_THIS, SDL_Window *window)
void WIN_QuitMouse(_THIS)
SDL_bool D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface)
void(* DestroyWindowFramebuffer)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:237
void(* GL_UnloadLibrary)(_THIS)
Definition: SDL_sysvideo.h:256
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:50
void(* GetDisplayModes)(_THIS, SDL_VideoDisplay *display)
Definition: SDL_sysvideo.h:196
int WIN_SetWindowGammaRamp(_THIS, SDL_Window *window, const Uint16 *ramp)
#define NULL
Definition: begin_code.h:164
int(* CreateSDLWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:210
#define SDL_OutOfMemory()
Definition: SDL_error.h:52
SDL_bool
Definition: SDL_stdinc.h:139
void(* VideoQuit)(_THIS)
Definition: SDL_sysvideo.h:166
#define SUCCEEDED(x)
Definition: SDL_directx.h:51
#define SDL_SetError
void WIN_SetWindowTitle(_THIS, SDL_Window *window)
void WIN_SetTextInputRect(_THIS, SDL_Rect *rect)
SDL_WindowShaper *(* CreateShaper)(SDL_Window *window)
Definition: SDL_sysvideo.h:60
void WIN_PumpEvents(_THIS)
#define SDL_calloc
int(* ResizeWindowShape)(SDL_Window *window)
Definition: SDL_sysvideo.h:62
int(* SetWindowOpacity)(_THIS, SDL_Window *window, float opacity)
Definition: SDL_sysvideo.h:219
void WIN_SetWindowGrab(_THIS, SDL_Window *window, SDL_bool grabbed)
int Win32_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
void(* SetWindowPosition)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:214
int(* GL_SwapWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:262
int(* GetWindowGammaRamp)(_THIS, SDL_Window *window, Uint16 *ramp)
Definition: SDL_sysvideo.h:232
void(* MinimizeWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:226
#define SDL_AddHintCallback
void WIN_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
SDL_bool(* HasClipboardText)(_THIS)
Definition: SDL_sysvideo.h:299
SDL_ShapeDriver shape_driver
Definition: SDL_sysvideo.h:244
int(* VideoInit)(_THIS)
Definition: SDL_sysvideo.h:160
int(* CreateSDLWindowFrom)(_THIS, SDL_Window *window, const void *data)
Definition: SDL_sysvideo.h:211
int WIN_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi)
void(* SetWindowFullscreen)(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
Definition: SDL_sysvideo.h:230
void WIN_SetWindowBordered(_THIS, SDL_Window *window, SDL_bool bordered)
int(* UpdateWindowFramebuffer)(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects)
Definition: SDL_sysvideo.h:236
#define SDL_strcmp
void * SDL_LoadFunction(void *handle, const char *name)
void(* GL_DeleteContext)(_THIS, SDL_GLContext context)
Definition: SDL_sysvideo.h:263
char *(* GetClipboardText)(_THIS)
Definition: SDL_sysvideo.h:298
int WIN_CreateWindowFrom(_THIS, SDL_Window *window, const void *data)
void(* SetWindowTitle)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:212
void(* SetWindowResizable)(_THIS, SDL_Window *window, SDL_bool resizable)
Definition: SDL_sysvideo.h:229
int(* GetDisplayUsableBounds)(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect)
Definition: SDL_sysvideo.h:191
int(* GL_GetSwapInterval)(_THIS)
Definition: SDL_sysvideo.h:261
void(* MaximizeWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:225
int(* SetClipboardText)(_THIS, const char *text)
Definition: SDL_sysvideo.h:297
void WIN_HideWindow(_THIS, SDL_Window *window)
int(* SetWindowGammaRamp)(_THIS, SDL_Window *window, const Uint16 *ramp)
Definition: SDL_sysvideo.h:231
int WIN_SetClipboardText(_THIS, const char *text)
#define SDLCALL
Definition: SDL_internal.h:45
void(* OnWindowEnter)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:238
void(* SetWindowGrab)(_THIS, SDL_Window *window, SDL_bool grabbed)
Definition: SDL_sysvideo.h:233
int(* CreateWindowFramebuffer)(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch)
Definition: SDL_sysvideo.h:235
int SDL_RegisterApp(char *name, Uint32 style, void *hInst)
void *(* GL_GetProcAddress)(_THIS, const char *proc)
Definition: SDL_sysvideo.h:255
int WIN_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect)
int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects)
void(* PumpEvents)(_THIS)
Definition: SDL_sysvideo.h:280