annotate include/SDL_compat.h @ 1727:90a3e0fccb88 SDL-1.3

Started on the OpenGL API revamp.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 07 Jul 2006 10:29:16 +0000
parents 6c63fc2bd986
children
rev   line source
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Lesser General Public License for more details.
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 /* This file contains functions for backwards compatibility with SDL 1.2 */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 #ifndef _SDL_compat_h
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 #define _SDL_compat_h
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27
1669
9857d21967bb The test programs compile again.
Sam Lantinga <slouken@libsdl.org>
parents: 1668
diff changeset
28 #include "SDL_video.h"
1712
931d111e737a Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents: 1683
diff changeset
29 #include "SDL_version.h"
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 #include "begin_code.h"
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 /* Set up for C function definitions, even when using C++ */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 #ifdef __cplusplus
1667
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
34 /* *INDENT-OFF* */
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
35 extern "C" {
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
36 /* *INDENT-ON* */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 #endif
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
39 #define SDL_SWSURFACE 0x00000000
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
40 #define SDL_ANYFORMAT 0x00100000
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
41 #define SDL_HWPALETTE 0x00200000
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
42 #define SDL_DOUBLEBUF 0x00400000
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
43 #define SDL_FULLSCREEN 0x00800000
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
44 #define SDL_RESIZABLE 0x01000000
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
45 #define SDL_NOFRAME 0x02000000
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
46 #define SDL_OPENGL 0x04000000
1682
7ae8018b2e5d Default palette entries to white, instead of black.
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
47 #define SDL_ASYNCBLIT 0x08000000 /* Not used */
7ae8018b2e5d Default palette entries to white, instead of black.
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
48 #define SDL_HWACCEL 0x08000000 /* Not used */
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49
1667
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
50 #define SDL_APPMOUSEFOCUS 0x01
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
51 #define SDL_APPINPUTFOCUS 0x02
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
52 #define SDL_APPACTIVE 0x04
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
53
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
54 #define SDL_LOGPAL 0x01
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
55 #define SDL_PHYSPAL 0x02
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56
1669
9857d21967bb The test programs compile again.
Sam Lantinga <slouken@libsdl.org>
parents: 1668
diff changeset
57 #define SDL_ACTIVEEVENT SDL_EVENT_RESERVED1
9857d21967bb The test programs compile again.
Sam Lantinga <slouken@libsdl.org>
parents: 1668
diff changeset
58 #define SDL_VIDEORESIZE SDL_EVENT_RESERVED2
9857d21967bb The test programs compile again.
Sam Lantinga <slouken@libsdl.org>
parents: 1668
diff changeset
59 #define SDL_VIDEOEXPOSE SDL_EVENT_RESERVED3
1724
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1718
diff changeset
60 #define SDL_ACTIVEEVENTMASK SDL_EVENTMASK(SDL_ACTIVEEVENT)
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1718
diff changeset
61 #define SDL_VIDEORESIZEMASK SDL_EVENTMASK(SDL_VIDEORESIZE)
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1718
diff changeset
62 #define SDL_VIDEOEXPOSEMASK SDL_EVENTMASK(SDL_VIDEOEXPOSE)
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1718
diff changeset
63
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1718
diff changeset
64 #define SDL_BUTTON_WHEELUP 4
6c63fc2bd986 Proof of concept done - Win32 GDI implementation mostly complete.
Sam Lantinga <slouken@libsdl.org>
parents: 1718
diff changeset
65 #define SDL_BUTTON_WHEELDOWN 5
1669
9857d21967bb The test programs compile again.
Sam Lantinga <slouken@libsdl.org>
parents: 1668
diff changeset
66
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
67 typedef struct SDL_VideoInfo
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
68 {
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
69 Uint32 hw_available:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
70 Uint32 wm_available:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
71 Uint32 UnusedBits1:6;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
72 Uint32 UnusedBits2:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
73 Uint32 blit_hw:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
74 Uint32 blit_hw_CC:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
75 Uint32 blit_hw_A:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
76 Uint32 blit_sw:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
77 Uint32 blit_sw_CC:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
78 Uint32 blit_sw_A:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
79 Uint32 blit_fill:1;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
80 Uint32 UnusedBits3:16;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
81 Uint32 video_mem;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
82
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
83 SDL_PixelFormat *vfmt;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
84 } SDL_VideoInfo;
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
85
1675
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
86 /* The most common video overlay formats.
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
87 For an explanation of these pixel formats, see:
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
88 http://www.webartz.com/fourcc/indexyuv.htm
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
89
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
90 For information on the relationship between color spaces, see:
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
91 http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
92 */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
93 #define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U (3 planes) */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
94 #define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V (3 planes) */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
95 #define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
96 #define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
97 #define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
98
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
99 /* The YUV hardware video overlay */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
100 typedef struct SDL_Overlay
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
101 {
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
102 Uint32 format; /* Read-only */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
103 int w, h; /* Read-only */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
104 int planes; /* Read-only */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
105 Uint16 *pitches; /* Read-only */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
106 Uint8 **pixels; /* Read-write */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
107
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
108 /* Hardware-specific surface info */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
109 struct private_yuvhwfuncs *hwfuncs;
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
110 struct private_yuvhwdata *hwdata;
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
111
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
112 /* Special flags */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
113 Uint32 hw_overlay:1; /* Flag: This overlay hardware accelerated? */
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
114 Uint32 UnusedBits:31;
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
115 } SDL_Overlay;
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
116
1667
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
117 typedef enum
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
118 {
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
119 SDL_GRAB_QUERY = -1,
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
120 SDL_GRAB_OFF = 0,
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
121 SDL_GRAB_ON = 1
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
122 } SDL_GrabMode;
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
123
1712
931d111e737a Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents: 1683
diff changeset
124 struct SDL_SysWMinfo;
931d111e737a Started framework for Windows video driver
Sam Lantinga <slouken@libsdl.org>
parents: 1683
diff changeset
125
1718
ed4d4f1ea201 Further progress on the new Windows video driver:
Sam Lantinga <slouken@libsdl.org>
parents: 1716
diff changeset
126 #define SDL_SetModuleHandle(x)
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
127 #define SDL_AllocSurface SDL_CreateRGBSurface
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
128
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
129 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
130 extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
131 extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
132 extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo(void);
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
133 extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
134 Uint32 flags);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
135 extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(SDL_PixelFormat * format,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
136 Uint32 flags);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
137 extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode(int width, int height,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
138 int bpp, Uint32 flags);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
139 extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void);
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
140 extern DECLSPEC void SDLCALL SDL_UpdateRects(SDL_Surface * screen,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
141 int numrects, SDL_Rect * rects);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
142 extern DECLSPEC void SDLCALL SDL_UpdateRect(SDL_Surface * screen, Sint32 x,
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
143 Sint32 y, Uint32 w, Uint32 h);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
144 extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface * screen);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
145 extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat(SDL_Surface * surface);
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
146 extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
147 surface);
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
148 extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
149 const char *icon);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
150 extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
151 extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
152 extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
153 extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface * surface);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
154 extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
155 extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags,
1682
7ae8018b2e5d Default palette entries to white, instead of black.
Sam Lantinga <slouken@libsdl.org>
parents: 1675
diff changeset
156 const SDL_Color * colors,
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
157 int firstcolor, int ncolors);
1683
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
158 extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface * surface,
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
159 const SDL_Color * colors,
396a35389351 Finished palettized display handling.
Sam Lantinga <slouken@libsdl.org>
parents: 1682
diff changeset
160 int firstcolor, int ncolors);
1713
3e66ed1690e4 Whoops, forgot to indent
Sam Lantinga <slouken@libsdl.org>
parents: 1712
diff changeset
161 extern DECLSPEC int SDLCALL SDL_GetWMInfo(struct SDL_SysWMinfo *info);
1675
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
162 extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
163 extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
164 extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay(int width,
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
165 int height,
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
166 Uint32 format,
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
167 SDL_Surface *
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
168 display);
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
169 extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay * overlay);
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
170 extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
171 extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
172 SDL_Rect * dstrect);
d33dcfc3fde7 Overlay functions are being replaced by YUV textures.
Sam Lantinga <slouken@libsdl.org>
parents: 1670
diff changeset
173 extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
1727
90a3e0fccb88 Started on the OpenGL API revamp.
Sam Lantinga <slouken@libsdl.org>
parents: 1724
diff changeset
174 extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
1667
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
175
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
176 /* Ends C function definitions when using C++ */
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
177 #ifdef __cplusplus
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
178 /* *INDENT-OFF* */
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
179 }
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
180 /* *INDENT-ON* */
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
181 #endif
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
182 #include "close_code.h"
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
183
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
184 #endif /* _SDL_compat_h */
1670
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
185
eef792d31de8 Work in progress. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1669
diff changeset
186 /* vi: set ts=4 sw=4 expandtab: */