src/video/win32/SDL_win32video.h
changeset 4755 436183eb30c8
parent 4752 dc7bdcf06367
parent 4504 9faebccfefb3
child 4759 863ba7d1f029
     1.1 --- a/src/video/win32/SDL_win32video.h	Tue Jul 13 15:05:45 2010 -0400
     1.2 +++ b/src/video/win32/SDL_win32video.h	Sun Jul 18 13:48:23 2010 -0400
     1.3 @@ -1,92 +1,95 @@
     1.4 -/*
     1.5 -    SDL - Simple DirectMedia Layer
     1.6 -    Copyright (C) 1997-2010 Sam Lantinga
     1.7 -
     1.8 -    This library is free software; you can redistribute it and/or
     1.9 -    modify it under the terms of the GNU Lesser General Public
    1.10 -    License as published by the Free Software Foundation; either
    1.11 -    version 2.1 of the License, or (at your option) any later version.
    1.12 -
    1.13 -    This library is distributed in the hope that it will be useful,
    1.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 -    Lesser General Public License for more details.
    1.17 -
    1.18 -    You should have received a copy of the GNU Lesser General Public
    1.19 -    License along with this library; if not, write to the Free Software
    1.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.21 -
    1.22 -    Sam Lantinga
    1.23 -    slouken@libsdl.org
    1.24 -*/
    1.25 -#include "SDL_config.h"
    1.26 -
    1.27 -#ifndef _SDL_win32video_h
    1.28 -#define _SDL_win32video_h
    1.29 -
    1.30 -#include "../SDL_sysvideo.h"
    1.31 -
    1.32 -#define WIN32_LEAN_AND_MEAN
    1.33 -#define STRICT
    1.34 -#define UNICODE
    1.35 -#undef WINVER
    1.36 -#define WINVER  0x500           /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */
    1.37 -#include <windows.h>
    1.38 -
    1.39 -#if SDL_VIDEO_RENDER_D3D
    1.40 -//#include <d3d9.h>
    1.41 -#define D3D_DEBUG_INFO
    1.42 -#include "d3d9.h"
    1.43 -#endif
    1.44 -
    1.45 -#if SDL_VIDEO_RENDER_DDRAW
    1.46 -/* WIN32_LEAN_AND_MEAN was defined, so we have to include this by hand */
    1.47 -#include <objbase.h>
    1.48 -#include "ddraw.h"
    1.49 -#endif
    1.50 -
    1.51 -#include "SDL_win32events.h"
    1.52 -#include "SDL_win32gamma.h"
    1.53 -#include "SDL_win32keyboard.h"
    1.54 -#include "SDL_win32modes.h"
    1.55 -#include "SDL_win32mouse.h"
    1.56 -#include "SDL_win32opengl.h"
    1.57 -#include "SDL_win32window.h"
    1.58 -
    1.59 -#ifdef UNICODE
    1.60 -#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (SDL_wcslen(S)+1)*sizeof(WCHAR))
    1.61 -#define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1)
    1.62 -#else
    1.63 -#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (SDL_strlen(S)+1))
    1.64 -#define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1)
    1.65 -#endif
    1.66 -
    1.67 -/* Private display data */
    1.68 -
    1.69 -typedef struct SDL_VideoData
    1.70 -{
    1.71 -#if SDL_VIDEO_RENDER_D3D
    1.72 -    HANDLE d3dDLL;
    1.73 -    IDirect3D9 *d3d;
    1.74 -#endif
    1.75 -#if SDL_VIDEO_RENDER_DDRAW
    1.76 -    HANDLE ddrawDLL;
    1.77 -    IDirectDraw *ddraw;
    1.78 -#endif
    1.79 -
    1.80 -    const SDL_scancode *key_layout;
    1.81 -    
    1.82 -    SDL_bool ime_com_initialized;
    1.83 -    struct ITfThreadMgr *ime_thread_mgr;
    1.84 -    SDL_bool ime_initialized;
    1.85 -    SDL_bool ime_enabled;
    1.86 -    SDL_bool ime_available;
    1.87 -    HWND ime_hwnd_main;
    1.88 -    HWND ime_hwnd_current;
    1.89 -    HIMC ime_himc;
    1.90 -
    1.91 -} SDL_VideoData;
    1.92 -
    1.93 -#endif /* _SDL_win32video_h */
    1.94 -
    1.95 -/* vi: set ts=4 sw=4 expandtab: */
    1.96 +/*
    1.97 +    SDL - Simple DirectMedia Layer
    1.98 +    Copyright (C) 1997-2010 Sam Lantinga
    1.99 +
   1.100 +    This library is free software; you can redistribute it and/or
   1.101 +    modify it under the terms of the GNU Lesser General Public
   1.102 +    License as published by the Free Software Foundation; either
   1.103 +    version 2.1 of the License, or (at your option) any later version.
   1.104 +
   1.105 +    This library is distributed in the hope that it will be useful,
   1.106 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1.107 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1.108 +    Lesser General Public License for more details.
   1.109 +
   1.110 +    You should have received a copy of the GNU Lesser General Public
   1.111 +    License along with this library; if not, write to the Free Software
   1.112 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   1.113 +
   1.114 +    Sam Lantinga
   1.115 +    slouken@libsdl.org
   1.116 +*/
   1.117 +#include "SDL_config.h"
   1.118 +
   1.119 +#ifndef _SDL_win32video_h
   1.120 +#define _SDL_win32video_h
   1.121 +
   1.122 +#include "../SDL_sysvideo.h"
   1.123 +
   1.124 +#define WIN32_LEAN_AND_MEAN
   1.125 +#define STRICT
   1.126 +#define UNICODE
   1.127 +#undef WINVER
   1.128 +#define WINVER  0x500           /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */
   1.129 +#include <windows.h>
   1.130 +
   1.131 +#if SDL_VIDEO_RENDER_D3D
   1.132 +//#include <d3d9.h>
   1.133 +#define D3D_DEBUG_INFO
   1.134 +#include "d3d9.h"
   1.135 +#endif
   1.136 +
   1.137 +#if SDL_VIDEO_RENDER_DDRAW
   1.138 +/* WIN32_LEAN_AND_MEAN was defined, so we have to include this by hand */
   1.139 +#include <objbase.h>
   1.140 +#include "ddraw.h"
   1.141 +#endif
   1.142 +
   1.143 +#include "SDL_win32clipboard.h"
   1.144 +#include "SDL_win32events.h"
   1.145 +#include "SDL_win32gamma.h"
   1.146 +#include "SDL_win32keyboard.h"
   1.147 +#include "SDL_win32modes.h"
   1.148 +#include "SDL_win32mouse.h"
   1.149 +#include "SDL_win32opengl.h"
   1.150 +#include "SDL_win32window.h"
   1.151 +
   1.152 +#ifdef UNICODE
   1.153 +#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (SDL_wcslen(S)+1)*sizeof(WCHAR))
   1.154 +#define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1)
   1.155 +#else
   1.156 +#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (SDL_strlen(S)+1))
   1.157 +#define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1)
   1.158 +#endif
   1.159 +extern void WIN_SetError(const char *prefix);
   1.160 +
   1.161 +/* Private display data */
   1.162 +
   1.163 +typedef struct SDL_VideoData
   1.164 +{
   1.165 +#if SDL_VIDEO_RENDER_D3D
   1.166 +    HANDLE d3dDLL;
   1.167 +    IDirect3D9 *d3d;
   1.168 +#endif
   1.169 +#if SDL_VIDEO_RENDER_DDRAW
   1.170 +    HANDLE ddrawDLL;
   1.171 +    IDirectDraw *ddraw;
   1.172 +#endif
   1.173 +
   1.174 +    const SDL_scancode *key_layout;
   1.175 +    DWORD clipboard_count;
   1.176 +
   1.177 +    SDL_bool ime_com_initialized;
   1.178 +    struct ITfThreadMgr *ime_thread_mgr;
   1.179 +    SDL_bool ime_initialized;
   1.180 +    SDL_bool ime_enabled;
   1.181 +    SDL_bool ime_available;
   1.182 +    HWND ime_hwnd_main;
   1.183 +    HWND ime_hwnd_current;
   1.184 +    HIMC ime_himc;
   1.185 +
   1.186 +} SDL_VideoData;
   1.187 +
   1.188 +#endif /* _SDL_win32video_h */
   1.189 +
   1.190 +/* vi: set ts=4 sw=4 expandtab: */