Mercurial > sdl-ios-xcode
annotate src/video/win32/SDL_win32video.h @ 1735:8dd28c4ef746 SDL-1.3
SDL_Rect now uses int for position and size.
Added a few more rectangle functions.
Added a dirty rectangle list implementation.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 10 Jul 2006 07:34:50 +0000 |
parents | 0b1070f2f94d |
children |
rev | line source |
---|---|
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 /* |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 Sam Lantinga |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 */ |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 #include "SDL_config.h" |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 #ifndef _SDL_win32video_h |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 #define _SDL_win32video_h |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 #include "../SDL_sysvideo.h" |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 #define WIN32_LEAN_AND_MEAN |
1718
ed4d4f1ea201
Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents:
1712
diff
changeset
|
30 #define UNICODE |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
31 #define WINVER 0x500 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */ |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
32 #include <windows.h> |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
33 |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
34 #if SDL_VIDEO_RENDER_D3D |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
35 #include <d3d9.h> |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
36 #endif |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
37 |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 #include "SDL_win32events.h" |
1733
0b1070f2f94d
Implemented gamma correction on Windows.
Sam Lantinga <slouken@libsdl.org>
parents:
1730
diff
changeset
|
39 #include "SDL_win32gamma.h" |
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1719
diff
changeset
|
40 #include "SDL_win32keyboard.h" |
1725
98a3207ddde8
Implemented Win32 video mode support
Sam Lantinga <slouken@libsdl.org>
parents:
1724
diff
changeset
|
41 #include "SDL_win32modes.h" |
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1719
diff
changeset
|
42 #include "SDL_win32mouse.h" |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 #include "SDL_win32window.h" |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 |
1719
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
45 #ifdef UNICODE |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
46 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (wcslen(S)+1)*sizeof(WCHAR)) |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
47 #define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1) |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
48 #else |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
49 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (strlen(S)+1)) |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
50 #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1) |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
51 #endif |
5b9f50c957ed
You can now create multiple windows on Win32
Sam Lantinga <slouken@libsdl.org>
parents:
1718
diff
changeset
|
52 |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
53 /* Private display data */ |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
54 |
1722
5daa04d862f1
Added a userdata parameter for event filters.
Sam Lantinga <slouken@libsdl.org>
parents:
1720
diff
changeset
|
55 typedef struct SDL_VideoData |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
56 { |
1730
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
57 #if SDL_VIDEO_RENDER_D3D |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
58 HANDLE d3dDLL; |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
59 IDirect3D9 *d3d; |
e70477157db9
Starting support for Direct3D render driver.
Sam Lantinga <slouken@libsdl.org>
parents:
1725
diff
changeset
|
60 #endif |
1720
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1719
diff
changeset
|
61 int mouse; |
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1719
diff
changeset
|
62 int keyboard; |
a1ebb17f9c52
Cleaned up a bunch of warnings, started adding Win32 event support
Sam Lantinga <slouken@libsdl.org>
parents:
1719
diff
changeset
|
63 } SDL_VideoData; |
1712
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
64 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 #endif /* _SDL_win32video_h */ |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
66 |
931d111e737a
Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
67 /* vi: set ts=4 sw=4 expandtab: */ |