23 #if SDL_VIDEO_DRIVER_WINDOWS
29 #include "../SDL_sysvideo.h"
30 #include "../SDL_pixels_c.h"
37 static int WIN_VideoInit(
_THIS);
38 static void WIN_VideoQuit(
_THIS);
64 WIN_CreateDevice(
int devindex)
129 #if SDL_VIDEO_OPENGL_WGL
148 device->
free = WIN_DeleteDevice;
154 "windows",
"SDL Windows video driver", WIN_Available, WIN_CreateDevice
179 #define D3D_DEBUG_INFO
195 if (!*pDirect3D9Interface) {
203 *pDirect3D9Interface =
NULL;
210 SDL_Direct3D9GetAdapterIndex(
int displayIndex )
228 for (i=0; i<
count; i++) {
232 if (
SDL_strcmp(
id.DeviceName, displayName) == 0) {
void(* GetDisplayModes)(_THIS, SDL_VideoDisplay *display)
struct IDirect3D9 IDirect3D9
void(* MinimizeWindow)(_THIS, SDL_Window *window)
int(* UpdateWindowFramebuffer)(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects)
SDL_bool(* GetWindowWMInfo)(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
void(* RaiseWindow)(_THIS, SDL_Window *window)
void WIN_SetWindowSize(_THIS, SDL_Window *window)
int(* SetClipboardText)(_THIS, const char *text)
int Win32_ResizeWindowShape(SDL_Window *window)
DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size)
void WIN_QuitModes(_THIS)
void(* HideWindow)(_THIS, SDL_Window *window)
int(* GL_MakeCurrent)(_THIS, SDL_Window *window, SDL_GLContext context)
int(* GetWindowGammaRamp)(_THIS, SDL_Window *window, Uint16 *ramp)
void WIN_RaiseWindow(_THIS, SDL_Window *window)
int WIN_GetWindowGammaRamp(_THIS, SDL_Window *window, Uint16 *ramp)
void(* StopTextInput)(_THIS)
int(* GetDisplayBounds)(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect)
void WIN_DestroyWindow(_THIS, SDL_Window *window)
char * WIN_GetClipboardText(_THIS)
SDL_bool WIN_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
void WIN_MaximizeWindow(_THIS, SDL_Window *window)
DECLSPEC void SDLCALL SDL_free(void *mem)
void(* SetWindowGrab)(_THIS, SDL_Window *window, SDL_bool grabbed)
void(* SetWindowIcon)(_THIS, SDL_Window *window, SDL_Surface *icon)
SDL_WindowShaper * Win32_CreateShaper(SDL_Window *window)
#define IDirect3D9_GetAdapterCount(p)
int(* CreateWindowFrom)(_THIS, SDL_Window *window, const void *data)
typedef UINT(WINAPI *PFNWGLGETCONTEXTGPUIDAMDPROC)(HGLRC hglrc)
#define IDirect3D9_Release(p)
void WIN_OnWindowEnter(_THIS, SDL_Window *window)
void WIN_SetWindowPosition(_THIS, SDL_Window *window)
void * SDL_GetDisplayDriverData(int displayIndex)
#define D3DADAPTER_DEFAULT
int WIN_CreateWindow(_THIS, SDL_Window *window)
int(* GL_SetSwapInterval)(_THIS, int interval)
static SDL_VideoDevice * _this
void WIN_InitMouse(_THIS)
int WIN_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch)
void(* DestroyWindowFramebuffer)(_THIS, SDL_Window *window)
int(* CreateWindow)(_THIS, SDL_Window *window)
void(* GL_UnloadLibrary)(_THIS)
void WIN_GetDisplayModes(_THIS, SDL_VideoDisplay *display)
void WIN_StartTextInput(_THIS)
int WIN_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect)
void WIN_DestroyWindowFramebuffer(_THIS, SDL_Window *window)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
int(* SetWindowShape)(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
void WIN_MinimizeWindow(_THIS, SDL_Window *window)
DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile)
void WIN_SetWindowIcon(_THIS, SDL_Window *window, SDL_Surface *icon)
int(* SetWindowGammaRamp)(_THIS, SDL_Window *window, const Uint16 *ramp)
int WIN_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
void WIN_ShowWindow(_THIS, SDL_Window *window)
void WIN_StopTextInput(_THIS)
DECLSPEC void SDLCALL SDL_UnloadObject(void *handle)
#define WIN_StringToUTF8(S)
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2)
void(* SetWindowPosition)(_THIS, SDL_Window *window)
void WIN_InitKeyboard(_THIS)
SDL_bool WIN_HasClipboardText(_THIS)
#define IDirect3D9_GetAdapterIdentifier(p, a, b, c)
void WIN_QuitKeyboard(_THIS)
void(* PumpEvents)(_THIS)
void WIN_RestoreWindow(_THIS, SDL_Window *window)
void WIN_QuitMouse(_THIS)
SDL_bool D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface)
SDL_WindowShaper *(* CreateShaper)(SDL_Window *window)
int WIN_SetWindowGammaRamp(_THIS, SDL_Window *window, const Uint16 *ramp)
int(* GL_GetSwapInterval)(_THIS)
#define SDL_OutOfMemory()
void(* GL_DeleteContext)(_THIS, SDL_GLContext context)
void(* MaximizeWindow)(_THIS, SDL_Window *window)
void(* DestroyWindow)(_THIS, SDL_Window *window)
void WIN_SetWindowTitle(_THIS, SDL_Window *window)
void WIN_SetTextInputRect(_THIS, SDL_Rect *rect)
void WIN_PumpEvents(_THIS)
void(* SetTextInputRect)(_THIS, SDL_Rect *rect)
void(* SetWindowSize)(_THIS, SDL_Window *window)
int(* SetDisplayMode)(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
void WIN_SetWindowGrab(_THIS, SDL_Window *window, SDL_bool grabbed)
int Win32_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
char *(* GetClipboardText)(_THIS)
SDL_GLContext(* GL_CreateContext)(_THIS, SDL_Window *window)
int(* GL_LoadLibrary)(_THIS, const char *path)
void WIN_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
void(* GL_SwapWindow)(_THIS, SDL_Window *window)
void(* ShowWindow)(_THIS, SDL_Window *window)
SDL_ShapeDriver shape_driver
int(* CreateWindowFramebuffer)(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch)
SDL_bool(* HasClipboardText)(_THIS)
void WIN_SetWindowBordered(_THIS, SDL_Window *window, SDL_bool bordered)
void(* SetWindowTitle)(_THIS, SDL_Window *window)
void(* SetWindowBordered)(_THIS, SDL_Window *window, SDL_bool bordered)
int WIN_CreateWindowFrom(_THIS, SDL_Window *window, const void *data)
void(* StartTextInput)(_THIS)
void(* SetWindowFullscreen)(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
void(* OnWindowEnter)(_THIS, SDL_Window *window)
void WIN_HideWindow(_THIS, SDL_Window *window)
DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, const char *name)
int WIN_SetClipboardText(_THIS, const char *text)
void *(* GL_GetProcAddress)(_THIS, const char *proc)
int(* ResizeWindowShape)(SDL_Window *window)
void(* RestoreWindow)(_THIS, SDL_Window *window)
int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects)
typedef BOOL(WINAPI *PFNWGLSETSTEREOEMITTERSTATE3DLPROC)(HDC hDC