include/SDL_compat.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 29 May 2006 05:08:33 +0000
branchSDL-1.3
changeset 1669 9857d21967bb
parent 1668 4da1ee79c9af
child 1670 eef792d31de8
permissions -rw-r--r--
The test programs compile again.
The dummy video driver is partially functional now.
     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 
    23 /* This file contains functions for backwards compatibility with SDL 1.2 */
    24 
    25 #ifndef _SDL_compat_h
    26 #define _SDL_compat_h
    27 
    28 #include "SDL_video.h"
    29 #include "SDL_syswm.h"
    30 
    31 #include "begin_code.h"
    32 /* Set up for C function definitions, even when using C++ */
    33 #ifdef __cplusplus
    34 /* *INDENT-OFF* */
    35 extern "C" {
    36 /* *INDENT-ON* */
    37 #endif
    38 
    39 #define SDL_SWSURFACE	0x00000000
    40 #define SDL_HWSURFACE	0x00000001
    41 #define SDL_ASYNCBLIT	0x00000004
    42 #define SDL_ANYFORMAT	0x10000000
    43 #define SDL_HWPALETTE	0x20000000
    44 #define SDL_DOUBLEBUF	0x40000000
    45 #define SDL_FULLSCREEN	0x80000000
    46 #define SDL_OPENGL      0x00000002
    47 #define SDL_INTERNALOPENGL 0x00000008
    48 #define SDL_RESIZABLE	0x00000010
    49 #define SDL_NOFRAME	0x00000020
    50 #define SDL_HWACCEL	0x00000100
    51 #define SDL_SRCCOLORKEY	0x00001000
    52 #define SDL_RLEACCELOK	0x00002000
    53 #define SDL_RLEACCEL	0x00004000
    54 #define SDL_SRCALPHA	0x00010000
    55 
    56 #define SDL_APPMOUSEFOCUS	0x01
    57 #define SDL_APPINPUTFOCUS	0x02
    58 #define SDL_APPACTIVE		0x04
    59 
    60 #define SDL_LOGPAL 0x01
    61 #define SDL_PHYSPAL 0x02
    62 
    63 #define SDL_ACTIVEEVENT	SDL_EVENT_RESERVED1
    64 #define SDL_VIDEORESIZE	SDL_EVENT_RESERVED2
    65 #define SDL_VIDEOEXPOSE	SDL_EVENT_RESERVED3
    66 
    67 typedef enum
    68 {
    69     SDL_GRAB_QUERY = -1,
    70     SDL_GRAB_OFF = 0,
    71     SDL_GRAB_ON = 1
    72 } SDL_GrabMode;
    73 
    74 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
    75 extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
    76 extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
    77 extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp,
    78                                             Uint32 flags);
    79 extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(SDL_PixelFormat * format,
    80                                                  Uint32 flags);
    81 extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode(int width, int height,
    82                                                       int bpp, Uint32 flags);
    83 extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void);
    84 extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title,
    85                                                const char *icon);
    86 extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon);
    87 extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
    88 extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
    89 extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface * surface);
    90 extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
    91 extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
    92 extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags,
    93                                            SDL_Color * colors,
    94                                            int firstcolor, int ncolors);
    95 extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo * info);
    96 
    97 /* Ends C function definitions when using C++ */
    98 #ifdef __cplusplus
    99 /* *INDENT-OFF* */
   100 }
   101 /* *INDENT-ON* */
   102 #endif
   103 #include "close_code.h"
   104 
   105 #endif /* _SDL_compat_h */