~vcs-imports/libsdl/trunk

« back to all changes in this revision

Viewing changes to include/SDL_compat.h

  • Committer: slouken
  • Date: 2006-05-29 02:53:21 UTC
  • Revision ID: svn-v4:c70aab31-4412-0410-b14c-859654838e24:branches/SDL-1.3:2493
Implemented many compatibility functions

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "begin_code.h"
31
31
/* Set up for C function definitions, even when using C++ */
32
32
#ifdef __cplusplus
33
 
extern "C"
 
33
/* *INDENT-OFF* */
 
34
extern "C" {
 
35
/* *INDENT-ON* */
 
36
#endif
 
37
 
 
38
#define SDL_SWSURFACE   0x00000000
 
39
#define SDL_HWSURFACE   0x00000001
 
40
#define SDL_ASYNCBLIT   0x00000004
 
41
#define SDL_ANYFORMAT   0x10000000
 
42
#define SDL_HWPALETTE   0x20000000
 
43
#define SDL_DOUBLEBUF   0x40000000
 
44
#define SDL_FULLSCREEN  0x80000000
 
45
#define SDL_OPENGL      0x00000002
 
46
#define SDL_INTERNALOPENGL 0x00000008
 
47
#define SDL_RESIZABLE   0x00000010
 
48
#define SDL_NOFRAME     0x00000020
 
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
 
54
 
 
55
#define SDL_APPMOUSEFOCUS       0x01
 
56
#define SDL_APPINPUTFOCUS       0x02
 
57
#define SDL_APPACTIVE           0x04
 
58
 
 
59
#define SDL_LOGPAL 0x01
 
60
#define SDL_PHYSPAL 0x02
 
61
 
 
62
typedef enum
34
63
{
35
 
#endif
36
 
 
37
 
    extern DECLSPEC char *SDLCALL SDL_AudioDriverName (char *namebuf,
38
 
                                                       int maxlen);
39
 
    extern DECLSPEC char *SDLCALL SDL_VideoDriverName (char *namebuf,
40
 
                                                       int maxlen);
41
 
    extern DECLSPEC int SDLCALL SDL_VideoModeOK (int width, int height,
42
 
                                                 int bpp, Uint32 flags);
43
 
    extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes (SDL_PixelFormat *
44
 
                                                      format, Uint32 flags);
45
 
    extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode (int width,
46
 
                                                           int height,
47
 
                                                           int bpp,
48
 
                                                           Uint32 flags);
49
 
 
50
 
/* Ends C function definitions when using C++ */
51
 
#ifdef __cplusplus
52
 
}
53
 
#endif
54
 
#include "close_code.h"
55
 
 
56
 
#endif                          /* _SDL_compat_h */
57
 
 
 
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
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
79
extern DECLSPEC void SDLCALL SDL_WM_SetCaption (const char *title,
82
80
                                                const char *icon);
83
81
extern DECLSPEC void SDLCALL SDL_WM_GetCaption (char **title, char **icon);
85
83
                                             Uint8 * mask);
86
84
extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow (void);
87
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
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
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
88
extern DECLSPEC int SDLCALL SDL_SetPalette (SDL_Surface * surface, int flags,
124
89
                                            SDL_Color * colors,
125
90
                                            int firstcolor, int ncolors);
126
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 */