annotate include/SDL_compat.h @ 1669:9857d21967bb SDL-1.3

The test programs compile again. The dummy video driver is partially functional now.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 29 May 2006 05:08:33 +0000
parents 4da1ee79c9af
children eef792d31de8
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"
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
29 #include "SDL_syswm.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
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
1667
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
39 #define SDL_SWSURFACE 0x00000000
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
40 #define SDL_HWSURFACE 0x00000001
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
41 #define SDL_ASYNCBLIT 0x00000004
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
42 #define SDL_ANYFORMAT 0x10000000
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
43 #define SDL_HWPALETTE 0x20000000
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
44 #define SDL_DOUBLEBUF 0x40000000
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
45 #define SDL_FULLSCREEN 0x80000000
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
46 #define SDL_OPENGL 0x00000002
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
47 #define SDL_INTERNALOPENGL 0x00000008
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
48 #define SDL_RESIZABLE 0x00000010
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
49 #define SDL_NOFRAME 0x00000020
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
50 #define SDL_HWACCEL 0x00000100
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
51 #define SDL_SRCCOLORKEY 0x00001000
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
52 #define SDL_RLEACCELOK 0x00002000
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
53 #define SDL_RLEACCEL 0x00004000
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
54 #define SDL_SRCALPHA 0x00010000
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
55
1667
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
56 #define SDL_APPMOUSEFOCUS 0x01
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
57 #define SDL_APPINPUTFOCUS 0x02
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
58 #define SDL_APPACTIVE 0x04
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
59
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
60 #define SDL_LOGPAL 0x01
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
61 #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
62
1669
9857d21967bb The test programs compile again.
Sam Lantinga <slouken@libsdl.org>
parents: 1668
diff changeset
63 #define SDL_ACTIVEEVENT SDL_EVENT_RESERVED1
9857d21967bb The test programs compile again.
Sam Lantinga <slouken@libsdl.org>
parents: 1668
diff changeset
64 #define SDL_VIDEORESIZE SDL_EVENT_RESERVED2
9857d21967bb The test programs compile again.
Sam Lantinga <slouken@libsdl.org>
parents: 1668
diff changeset
65 #define SDL_VIDEOEXPOSE SDL_EVENT_RESERVED3
9857d21967bb The test programs compile again.
Sam Lantinga <slouken@libsdl.org>
parents: 1668
diff changeset
66
1667
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
67 typedef enum
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
68 {
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
69 SDL_GRAB_QUERY = -1,
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
70 SDL_GRAB_OFF = 0,
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
71 SDL_GRAB_ON = 1
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
72 } 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
73
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
74 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
75 extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
76 extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
77 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
78 Uint32 flags);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
79 extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(SDL_PixelFormat * format,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
80 Uint32 flags);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
81 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
82 int bpp, Uint32 flags);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
83 extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
84 extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
85 const char *icon);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
86 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
87 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
88 extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
89 extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface * surface);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
90 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
91 extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
92 extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
93 SDL_Color * colors,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
94 int firstcolor, int ncolors);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1667
diff changeset
95 extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo * info);
1667
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
96
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
97 /* Ends C function definitions when using C++ */
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
98 #ifdef __cplusplus
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
99 /* *INDENT-OFF* */
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
100 }
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
101 /* *INDENT-ON* */
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
102 #endif
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
103 #include "close_code.h"
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
104
1fddae038bc8 Implemented many compatibility functions
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
105 #endif /* _SDL_compat_h */