comparison src/video/win32/SDL_win32video.h @ 1895:c121d94672cb

SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jul 2006 21:04:37 +0000
parents
children f1828a500391
comparison
equal deleted inserted replaced
1894:c69cee13dd76 1895:c121d94672cb
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2006 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22 #include "SDL_config.h"
23
24 #ifndef _SDL_win32video_h
25 #define _SDL_win32video_h
26
27 #include "../SDL_sysvideo.h"
28
29 #define WIN32_LEAN_AND_MEAN
30 #define UNICODE
31 #define WINVER 0x500 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */
32 #include <windows.h>
33
34 #if SDL_VIDEO_RENDER_D3D
35 #include <d3d9.h>
36 #endif
37
38 #include "SDL_win32events.h"
39 #include "SDL_win32gamma.h"
40 #include "SDL_win32keyboard.h"
41 #include "SDL_win32modes.h"
42 #include "SDL_win32mouse.h"
43 #include "SDL_win32window.h"
44
45 #ifdef UNICODE
46 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (wcslen(S)+1)*sizeof(WCHAR))
47 #define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1)
48 #else
49 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (strlen(S)+1))
50 #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1)
51 #endif
52
53 /* Private display data */
54
55 typedef struct SDL_VideoData
56 {
57 #if SDL_VIDEO_RENDER_D3D
58 HANDLE d3dDLL;
59 IDirect3D9 *d3d;
60 #endif
61 int mouse;
62 int keyboard;
63 } SDL_VideoData;
64
65 #endif /* _SDL_win32video_h */
66
67 /* vi: set ts=4 sw=4 expandtab: */