include/SDL_compat.h
branchSDL-1.3
changeset 1667 1fddae038bc8
parent 1662 782fd950bd46
child 1668 4da1ee79c9af
     1.1 --- a/include/SDL_compat.h	Sun May 28 21:56:07 2006 +0000
     1.2 +++ b/include/SDL_compat.h	Mon May 29 03:53:21 2006 +0000
     1.3 @@ -30,54 +30,52 @@
     1.4  #include "begin_code.h"
     1.5  /* Set up for C function definitions, even when using C++ */
     1.6  #ifdef __cplusplus
     1.7 -extern "C"
     1.8 -{
     1.9 +/* *INDENT-OFF* */
    1.10 +extern "C" {
    1.11 +/* *INDENT-ON* */
    1.12  #endif
    1.13  
    1.14 -    extern DECLSPEC char *SDLCALL SDL_AudioDriverName (char *namebuf,
    1.15 -                                                       int maxlen);
    1.16 -    extern DECLSPEC char *SDLCALL SDL_VideoDriverName (char *namebuf,
    1.17 -                                                       int maxlen);
    1.18 -    extern DECLSPEC int SDLCALL SDL_VideoModeOK (int width, int height,
    1.19 -                                                 int bpp, Uint32 flags);
    1.20 -    extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes (SDL_PixelFormat *
    1.21 -                                                      format, Uint32 flags);
    1.22 -    extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode (int width,
    1.23 -                                                           int height,
    1.24 -                                                           int bpp,
    1.25 -                                                           Uint32 flags);
    1.26 +#define SDL_SWSURFACE	0x00000000
    1.27 +#define SDL_HWSURFACE	0x00000001
    1.28 +#define SDL_ASYNCBLIT	0x00000004
    1.29 +#define SDL_ANYFORMAT	0x10000000
    1.30 +#define SDL_HWPALETTE	0x20000000
    1.31 +#define SDL_DOUBLEBUF	0x40000000
    1.32 +#define SDL_FULLSCREEN	0x80000000
    1.33 +#define SDL_OPENGL      0x00000002
    1.34 +#define SDL_INTERNALOPENGL 0x00000008
    1.35 +#define SDL_RESIZABLE	0x00000010
    1.36 +#define SDL_NOFRAME	0x00000020
    1.37 +#define SDL_HWACCEL	0x00000100
    1.38 +#define SDL_SRCCOLORKEY	0x00001000
    1.39 +#define SDL_RLEACCELOK	0x00002000
    1.40 +#define SDL_RLEACCEL	0x00004000
    1.41 +#define SDL_SRCALPHA	0x00010000
    1.42  
    1.43 -/* Ends C function definitions when using C++ */
    1.44 -#ifdef __cplusplus
    1.45 -}
    1.46 -#endif
    1.47 -#include "close_code.h"
    1.48 +#define SDL_APPMOUSEFOCUS	0x01
    1.49 +#define SDL_APPINPUTFOCUS	0x02
    1.50 +#define SDL_APPACTIVE		0x04
    1.51 +
    1.52 +#define SDL_LOGPAL 0x01
    1.53 +#define SDL_PHYSPAL 0x02
    1.54  
    1.55 -#endif                          /* _SDL_compat_h */
    1.56 +typedef enum
    1.57 +{
    1.58 +    SDL_GRAB_QUERY = -1,
    1.59 +    SDL_GRAB_OFF = 0,
    1.60 +    SDL_GRAB_ON = 1
    1.61 +} SDL_GrabMode;
    1.62  
    1.63 +extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version (void);
    1.64 +extern DECLSPEC char *SDLCALL SDL_AudioDriverName (char *namebuf, int maxlen);
    1.65 +extern DECLSPEC char *SDLCALL SDL_VideoDriverName (char *namebuf, int maxlen);
    1.66 +extern DECLSPEC int SDLCALL SDL_VideoModeOK (int width, int height, int bpp,
    1.67 +                                             Uint32 flags);
    1.68 +extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes (SDL_PixelFormat * format,
    1.69 +                                                  Uint32 flags);
    1.70 +extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode (int width, int height,
    1.71 +                                                       int bpp, Uint32 flags);
    1.72  extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface (void);
    1.73 -
    1.74 -/* These are the currently supported flags for the SDL_surface */
    1.75 -/* Available for SDL_CreateRGBSurface() or SDL_SetVideoMode() */
    1.76 -#define SDL_SWSURFACE	0x00000000      /* Surface is in system memory */
    1.77 -#define SDL_HWSURFACE	0x00000001      /* Surface is in video memory */
    1.78 -#define SDL_ASYNCBLIT	0x00000004      /* Use asynchronous blits if possible */
    1.79 -/* Available for SDL_SetVideoMode() */
    1.80 -#define SDL_ANYFORMAT	0x10000000      /* Allow any video depth/pixel-format */
    1.81 -#define SDL_HWPALETTE	0x20000000      /* Surface has exclusive palette */
    1.82 -#define SDL_DOUBLEBUF	0x40000000      /* Set up double-buffered video mode */
    1.83 -#define SDL_FULLSCREEN	0x80000000      /* Surface is a full screen display */
    1.84 -#define SDL_OPENGL      0x00000002      /* Create an OpenGL rendering context */
    1.85 -#define SDL_INTERNALOPENGL 0x00000008   /* SDL uses OpenGL internally for this window */
    1.86 -#define SDL_RESIZABLE	0x00000010      /* This video mode may be resized */
    1.87 -#define SDL_NOFRAME	0x00000020      /* No window caption or edge frame */
    1.88 -/* Used internally (read-only) */
    1.89 -#define SDL_HWACCEL	0x00000100      /* Blit uses hardware acceleration */
    1.90 -#define SDL_SRCCOLORKEY	0x00001000      /* Blit uses a source color key */
    1.91 -#define SDL_RLEACCELOK	0x00002000      /* Private flag */
    1.92 -#define SDL_RLEACCEL	0x00004000      /* Surface is RLE encoded */
    1.93 -#define SDL_SRCALPHA	0x00010000      /* Blit uses source alpha blending */
    1.94 -
    1.95  extern DECLSPEC void SDLCALL SDL_WM_SetCaption (const char *title,
    1.96                                                  const char *icon);
    1.97  extern DECLSPEC void SDLCALL SDL_WM_GetCaption (char **title, char **icon);
    1.98 @@ -85,42 +83,19 @@
    1.99                                               Uint8 * mask);
   1.100  extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow (void);
   1.101  extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen (SDL_Surface * surface);
   1.102 -typedef enum
   1.103 -{
   1.104 -    SDL_GRAB_QUERY = -1,
   1.105 -    SDL_GRAB_OFF = 0,
   1.106 -    SDL_GRAB_ON = 1
   1.107 -} SDL_GrabMode;
   1.108  extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput (SDL_GrabMode mode);
   1.109 -
   1.110 -/* The available application states */
   1.111 -#define SDL_APPMOUSEFOCUS	0x01    /* The app has mouse coverage */
   1.112 -#define SDL_APPINPUTFOCUS	0x02    /* The app has input focus */
   1.113 -#define SDL_APPACTIVE		0x04    /* The application is active */
   1.114 -
   1.115  extern DECLSPEC Uint8 SDLCALL SDL_GetAppState (void);
   1.116 -extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version (void);
   1.117 -/* flags for SDL_SetPalette() */
   1.118 -#define SDL_LOGPAL 0x01
   1.119 -#define SDL_PHYSPAL 0x02
   1.120 -
   1.121 -/*
   1.122 - * Sets a portion of the colormap for a given 8-bit surface.
   1.123 - * 'flags' is one or both of:
   1.124 - * SDL_LOGPAL  -- set logical palette, which controls how blits are mapped
   1.125 - *                to/from the surface,
   1.126 - * SDL_PHYSPAL -- set physical palette, which controls how pixels look on
   1.127 - *                the screen
   1.128 - * Only screens have physical palettes. Separate change of physical/logical
   1.129 - * palettes is only possible if the screen has SDL_HWPALETTE set.
   1.130 - *
   1.131 - * The return value is 1 if all colours could be set as requested, and 0
   1.132 - * otherwise.
   1.133 - *
   1.134 - * SDL_SetColors() is equivalent to calling this function with
   1.135 - *     flags = (SDL_LOGPAL|SDL_PHYSPAL).
   1.136 - */
   1.137  extern DECLSPEC int SDLCALL SDL_SetPalette (SDL_Surface * surface, int flags,
   1.138                                              SDL_Color * colors,
   1.139                                              int firstcolor, int ncolors);
   1.140  extern DECLSPEC int SDLCALL SDL_GetWMInfo (SDL_SysWMinfo * info);
   1.141 +
   1.142 +/* Ends C function definitions when using C++ */
   1.143 +#ifdef __cplusplus
   1.144 +/* *INDENT-OFF* */
   1.145 +}
   1.146 +/* *INDENT-ON* */
   1.147 +#endif
   1.148 +#include "close_code.h"
   1.149 +
   1.150 +#endif /* _SDL_compat_h */