annotate src/video/win32/SDL_win32video.h @ 4755:436183eb30c8

Merge with main repo (mainly for non-printable character fix)
author dewyatt
date Sun, 18 Jul 2010 13:48:23 -0400
parents dc7bdcf06367 9faebccfefb3
children 863ba7d1f029
rev   line source
4755
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
1 /*
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
2 SDL - Simple DirectMedia Layer
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
3 Copyright (C) 1997-2010 Sam Lantinga
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
4
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
5 This library is free software; you can redistribute it and/or
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
6 modify it under the terms of the GNU Lesser General Public
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
7 License as published by the Free Software Foundation; either
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
9
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
10 This library is distributed in the hope that it will be useful,
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
13 Lesser General Public License for more details.
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
14
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
15 You should have received a copy of the GNU Lesser General Public
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
16 License along with this library; if not, write to the Free Software
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
18
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
19 Sam Lantinga
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
20 slouken@libsdl.org
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
21 */
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
22 #include "SDL_config.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
23
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
24 #ifndef _SDL_win32video_h
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
25 #define _SDL_win32video_h
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
26
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
27 #include "../SDL_sysvideo.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
28
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
29 #define WIN32_LEAN_AND_MEAN
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
30 #define STRICT
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
31 #define UNICODE
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
32 #undef WINVER
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
33 #define WINVER 0x500 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
34 #include <windows.h>
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
35
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
36 #if SDL_VIDEO_RENDER_D3D
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
37 //#include <d3d9.h>
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
38 #define D3D_DEBUG_INFO
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
39 #include "d3d9.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
40 #endif
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
41
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
42 #if SDL_VIDEO_RENDER_DDRAW
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
43 /* WIN32_LEAN_AND_MEAN was defined, so we have to include this by hand */
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
44 #include <objbase.h>
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
45 #include "ddraw.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
46 #endif
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
47
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
48 #include "SDL_win32clipboard.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
49 #include "SDL_win32events.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
50 #include "SDL_win32gamma.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
51 #include "SDL_win32keyboard.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
52 #include "SDL_win32modes.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
53 #include "SDL_win32mouse.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
54 #include "SDL_win32opengl.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
55 #include "SDL_win32window.h"
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
56
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
57 #ifdef UNICODE
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
58 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (SDL_wcslen(S)+1)*sizeof(WCHAR))
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
59 #define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1)
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
60 #else
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
61 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (SDL_strlen(S)+1))
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
62 #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1)
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
63 #endif
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
64 extern void WIN_SetError(const char *prefix);
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
65
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
66 /* Private display data */
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
67
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
68 typedef struct SDL_VideoData
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
69 {
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
70 #if SDL_VIDEO_RENDER_D3D
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
71 HANDLE d3dDLL;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
72 IDirect3D9 *d3d;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
73 #endif
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
74 #if SDL_VIDEO_RENDER_DDRAW
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
75 HANDLE ddrawDLL;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
76 IDirectDraw *ddraw;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
77 #endif
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
78
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
79 const SDL_scancode *key_layout;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
80 DWORD clipboard_count;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
81
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
82 SDL_bool ime_com_initialized;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
83 struct ITfThreadMgr *ime_thread_mgr;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
84 SDL_bool ime_initialized;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
85 SDL_bool ime_enabled;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
86 SDL_bool ime_available;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
87 HWND ime_hwnd_main;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
88 HWND ime_hwnd_current;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
89 HIMC ime_himc;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
90
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
91 } SDL_VideoData;
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
92
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
93 #endif /* _SDL_win32video_h */
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
94
436183eb30c8 Merge with main repo (mainly for non-printable character fix)
dewyatt
parents: 4752 4504
diff changeset
95 /* vi: set ts=4 sw=4 expandtab: */