include/SDL_compat.h
branchSDL-1.3
changeset 1667 1fddae038bc8
parent 1662 782fd950bd46
child 1668 4da1ee79c9af
equal deleted inserted replaced
1666:6e7ec5cb83c3 1667:1fddae038bc8
    28 #include "SDL_syswm.h"
    28 #include "SDL_syswm.h"
    29 
    29 
    30 #include "begin_code.h"
    30 #include "begin_code.h"
    31 /* Set up for C function definitions, even when using C++ */
    31 /* Set up for C function definitions, even when using C++ */
    32 #ifdef __cplusplus
    32 #ifdef __cplusplus
    33 extern "C"
    33 /* *INDENT-OFF* */
    34 {
    34 extern "C" {
       
    35 /* *INDENT-ON* */
    35 #endif
    36 #endif
    36 
    37 
    37     extern DECLSPEC char *SDLCALL SDL_AudioDriverName (char *namebuf,
    38 #define SDL_SWSURFACE	0x00000000
    38                                                        int maxlen);
    39 #define SDL_HWSURFACE	0x00000001
    39     extern DECLSPEC char *SDLCALL SDL_VideoDriverName (char *namebuf,
    40 #define SDL_ASYNCBLIT	0x00000004
    40                                                        int maxlen);
    41 #define SDL_ANYFORMAT	0x10000000
    41     extern DECLSPEC int SDLCALL SDL_VideoModeOK (int width, int height,
    42 #define SDL_HWPALETTE	0x20000000
    42                                                  int bpp, Uint32 flags);
    43 #define SDL_DOUBLEBUF	0x40000000
    43     extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes (SDL_PixelFormat *
    44 #define SDL_FULLSCREEN	0x80000000
    44                                                       format, Uint32 flags);
    45 #define SDL_OPENGL      0x00000002
    45     extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode (int width,
    46 #define SDL_INTERNALOPENGL 0x00000008
    46                                                            int height,
    47 #define SDL_RESIZABLE	0x00000010
    47                                                            int bpp,
    48 #define SDL_NOFRAME	0x00000020
    48                                                            Uint32 flags);
    49 #define SDL_HWACCEL	0x00000100
       
    50 #define SDL_SRCCOLORKEY	0x00001000
       
    51 #define SDL_RLEACCELOK	0x00002000
       
    52 #define SDL_RLEACCEL	0x00004000
       
    53 #define SDL_SRCALPHA	0x00010000
    49 
    54 
    50 /* Ends C function definitions when using C++ */
    55 #define SDL_APPMOUSEFOCUS	0x01
    51 #ifdef __cplusplus
    56 #define SDL_APPINPUTFOCUS	0x02
    52 }
    57 #define SDL_APPACTIVE		0x04
    53 #endif
       
    54 #include "close_code.h"
       
    55 
    58 
    56 #endif                          /* _SDL_compat_h */
    59 #define SDL_LOGPAL 0x01
       
    60 #define SDL_PHYSPAL 0x02
    57 
    61 
       
    62 typedef enum
       
    63 {
       
    64     SDL_GRAB_QUERY = -1,
       
    65     SDL_GRAB_OFF = 0,
       
    66     SDL_GRAB_ON = 1
       
    67 } SDL_GrabMode;
       
    68 
       
    69 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version (void);
       
    70 extern DECLSPEC char *SDLCALL SDL_AudioDriverName (char *namebuf, int maxlen);
       
    71 extern DECLSPEC char *SDLCALL SDL_VideoDriverName (char *namebuf, int maxlen);
       
    72 extern DECLSPEC int SDLCALL SDL_VideoModeOK (int width, int height, int bpp,
       
    73                                              Uint32 flags);
       
    74 extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes (SDL_PixelFormat * format,
       
    75                                                   Uint32 flags);
       
    76 extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode (int width, int height,
       
    77                                                        int bpp, Uint32 flags);
    58 extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface (void);
    78 extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface (void);
    59 
       
    60 /* These are the currently supported flags for the SDL_surface */
       
    61 /* Available for SDL_CreateRGBSurface() or SDL_SetVideoMode() */
       
    62 #define SDL_SWSURFACE	0x00000000      /* Surface is in system memory */
       
    63 #define SDL_HWSURFACE	0x00000001      /* Surface is in video memory */
       
    64 #define SDL_ASYNCBLIT	0x00000004      /* Use asynchronous blits if possible */
       
    65 /* Available for SDL_SetVideoMode() */
       
    66 #define SDL_ANYFORMAT	0x10000000      /* Allow any video depth/pixel-format */
       
    67 #define SDL_HWPALETTE	0x20000000      /* Surface has exclusive palette */
       
    68 #define SDL_DOUBLEBUF	0x40000000      /* Set up double-buffered video mode */
       
    69 #define SDL_FULLSCREEN	0x80000000      /* Surface is a full screen display */
       
    70 #define SDL_OPENGL      0x00000002      /* Create an OpenGL rendering context */
       
    71 #define SDL_INTERNALOPENGL 0x00000008   /* SDL uses OpenGL internally for this window */
       
    72 #define SDL_RESIZABLE	0x00000010      /* This video mode may be resized */
       
    73 #define SDL_NOFRAME	0x00000020      /* No window caption or edge frame */
       
    74 /* Used internally (read-only) */
       
    75 #define SDL_HWACCEL	0x00000100      /* Blit uses hardware acceleration */
       
    76 #define SDL_SRCCOLORKEY	0x00001000      /* Blit uses a source color key */
       
    77 #define SDL_RLEACCELOK	0x00002000      /* Private flag */
       
    78 #define SDL_RLEACCEL	0x00004000      /* Surface is RLE encoded */
       
    79 #define SDL_SRCALPHA	0x00010000      /* Blit uses source alpha blending */
       
    80 
       
    81 extern DECLSPEC void SDLCALL SDL_WM_SetCaption (const char *title,
    79 extern DECLSPEC void SDLCALL SDL_WM_SetCaption (const char *title,
    82                                                 const char *icon);
    80                                                 const char *icon);
    83 extern DECLSPEC void SDLCALL SDL_WM_GetCaption (char **title, char **icon);
    81 extern DECLSPEC void SDLCALL SDL_WM_GetCaption (char **title, char **icon);
    84 extern DECLSPEC void SDLCALL SDL_WM_SetIcon (SDL_Surface * icon,
    82 extern DECLSPEC void SDLCALL SDL_WM_SetIcon (SDL_Surface * icon,
    85                                              Uint8 * mask);
    83                                              Uint8 * mask);
    86 extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow (void);
    84 extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow (void);
    87 extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen (SDL_Surface * surface);
    85 extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen (SDL_Surface * surface);
    88 typedef enum
       
    89 {
       
    90     SDL_GRAB_QUERY = -1,
       
    91     SDL_GRAB_OFF = 0,
       
    92     SDL_GRAB_ON = 1
       
    93 } SDL_GrabMode;
       
    94 extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput (SDL_GrabMode mode);
    86 extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput (SDL_GrabMode mode);
    95 
       
    96 /* The available application states */
       
    97 #define SDL_APPMOUSEFOCUS	0x01    /* The app has mouse coverage */
       
    98 #define SDL_APPINPUTFOCUS	0x02    /* The app has input focus */
       
    99 #define SDL_APPACTIVE		0x04    /* The application is active */
       
   100 
       
   101 extern DECLSPEC Uint8 SDLCALL SDL_GetAppState (void);
    87 extern DECLSPEC Uint8 SDLCALL SDL_GetAppState (void);
   102 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version (void);
       
   103 /* flags for SDL_SetPalette() */
       
   104 #define SDL_LOGPAL 0x01
       
   105 #define SDL_PHYSPAL 0x02
       
   106 
       
   107 /*
       
   108  * Sets a portion of the colormap for a given 8-bit surface.
       
   109  * 'flags' is one or both of:
       
   110  * SDL_LOGPAL  -- set logical palette, which controls how blits are mapped
       
   111  *                to/from the surface,
       
   112  * SDL_PHYSPAL -- set physical palette, which controls how pixels look on
       
   113  *                the screen
       
   114  * Only screens have physical palettes. Separate change of physical/logical
       
   115  * palettes is only possible if the screen has SDL_HWPALETTE set.
       
   116  *
       
   117  * The return value is 1 if all colours could be set as requested, and 0
       
   118  * otherwise.
       
   119  *
       
   120  * SDL_SetColors() is equivalent to calling this function with
       
   121  *     flags = (SDL_LOGPAL|SDL_PHYSPAL).
       
   122  */
       
   123 extern DECLSPEC int SDLCALL SDL_SetPalette (SDL_Surface * surface, int flags,
    88 extern DECLSPEC int SDLCALL SDL_SetPalette (SDL_Surface * surface, int flags,
   124                                             SDL_Color * colors,
    89                                             SDL_Color * colors,
   125                                             int firstcolor, int ncolors);
    90                                             int firstcolor, int ncolors);
   126 extern DECLSPEC int SDLCALL SDL_GetWMInfo (SDL_SysWMinfo * info);
    91 extern DECLSPEC int SDLCALL SDL_GetWMInfo (SDL_SysWMinfo * info);
       
    92 
       
    93 /* Ends C function definitions when using C++ */
       
    94 #ifdef __cplusplus
       
    95 /* *INDENT-OFF* */
       
    96 }
       
    97 /* *INDENT-ON* */
       
    98 #endif
       
    99 #include "close_code.h"
       
   100 
       
   101 #endif /* _SDL_compat_h */