comparison include/SDL_compat.h @ 1670:eef792d31de8 SDL-1.3

Work in progress. :)
author Sam Lantinga <slouken@libsdl.org>
date Wed, 07 Jun 2006 16:10:28 +0000
parents 9857d21967bb
children d33dcfc3fde7
comparison
equal deleted inserted replaced
1669:9857d21967bb 1670:eef792d31de8
34 /* *INDENT-OFF* */ 34 /* *INDENT-OFF* */
35 extern "C" { 35 extern "C" {
36 /* *INDENT-ON* */ 36 /* *INDENT-ON* */
37 #endif 37 #endif
38 38
39 #define SDL_SWSURFACE 0x00000000 39 #define SDL_SWSURFACE 0x00000000
40 #define SDL_HWSURFACE 0x00000001 40 #define SDL_ANYFORMAT 0x00100000
41 #define SDL_ASYNCBLIT 0x00000004 41 #define SDL_HWPALETTE 0x00200000
42 #define SDL_ANYFORMAT 0x10000000 42 #define SDL_DOUBLEBUF 0x00400000
43 #define SDL_HWPALETTE 0x20000000 43 #define SDL_FULLSCREEN 0x00800000
44 #define SDL_DOUBLEBUF 0x40000000 44 #define SDL_RESIZABLE 0x01000000
45 #define SDL_FULLSCREEN 0x80000000 45 #define SDL_NOFRAME 0x02000000
46 #define SDL_OPENGL 0x00000002 46 #define SDL_OPENGL 0x04000000
47 #define SDL_INTERNALOPENGL 0x00000008 47 #define SDL_ASYNCBLIT 0x00000000
48 #define SDL_RESIZABLE 0x00000010 48 #define SDL_HWACCEL 0x00000000
49 #define SDL_NOFRAME 0x00000020 49 #define SDL_SCREEN_SURFACE 0x10000000 /* Surface is a window screen surface */
50 #define SDL_HWACCEL 0x00000100 50 #define SDL_SHADOW_SURFACE 0x20000000 /* Surface is a window shadow surface */
51 #define SDL_SRCCOLORKEY 0x00001000
52 #define SDL_RLEACCELOK 0x00002000
53 #define SDL_RLEACCEL 0x00004000
54 #define SDL_SRCALPHA 0x00010000
55 51
56 #define SDL_APPMOUSEFOCUS 0x01 52 #define SDL_APPMOUSEFOCUS 0x01
57 #define SDL_APPINPUTFOCUS 0x02 53 #define SDL_APPINPUTFOCUS 0x02
58 #define SDL_APPACTIVE 0x04 54 #define SDL_APPACTIVE 0x04
59 55
62 58
63 #define SDL_ACTIVEEVENT SDL_EVENT_RESERVED1 59 #define SDL_ACTIVEEVENT SDL_EVENT_RESERVED1
64 #define SDL_VIDEORESIZE SDL_EVENT_RESERVED2 60 #define SDL_VIDEORESIZE SDL_EVENT_RESERVED2
65 #define SDL_VIDEOEXPOSE SDL_EVENT_RESERVED3 61 #define SDL_VIDEOEXPOSE SDL_EVENT_RESERVED3
66 62
63 typedef struct SDL_VideoInfo
64 {
65 Uint32 hw_available:1;
66 Uint32 wm_available:1;
67 Uint32 UnusedBits1:6;
68 Uint32 UnusedBits2:1;
69 Uint32 blit_hw:1;
70 Uint32 blit_hw_CC:1;
71 Uint32 blit_hw_A:1;
72 Uint32 blit_sw:1;
73 Uint32 blit_sw_CC:1;
74 Uint32 blit_sw_A:1;
75 Uint32 blit_fill:1;
76 Uint32 UnusedBits3:16;
77 Uint32 video_mem;
78
79 SDL_PixelFormat *vfmt;
80 } SDL_VideoInfo;
81
67 typedef enum 82 typedef enum
68 { 83 {
69 SDL_GRAB_QUERY = -1, 84 SDL_GRAB_QUERY = -1,
70 SDL_GRAB_OFF = 0, 85 SDL_GRAB_OFF = 0,
71 SDL_GRAB_ON = 1 86 SDL_GRAB_ON = 1
72 } SDL_GrabMode; 87 } SDL_GrabMode;
73 88
89 #define SDL_AllocSurface SDL_CreateRGBSurface
90
74 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void); 91 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
75 extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen); 92 extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
76 extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen); 93 extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
94 extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo(void);
77 extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp, 95 extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp,
78 Uint32 flags); 96 Uint32 flags);
79 extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(SDL_PixelFormat * format, 97 extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(SDL_PixelFormat * format,
80 Uint32 flags); 98 Uint32 flags);
81 extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode(int width, int height, 99 extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode(int width, int height,
82 int bpp, Uint32 flags); 100 int bpp, Uint32 flags);
83 extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void); 101 extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void);
102 extern DECLSPEC void SDLCALL SDL_UpdateRects(SDL_Surface * screen,
103 int numrects, SDL_Rect * rects);
104 extern DECLSPEC void SDLCALL SDL_UpdateRect(SDL_Surface * screen, Sint32 x,
105 Sint32 y, Uint32 w, Uint32 h);
106 extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface * screen);
107 extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat(SDL_Surface * surface);
108 extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *
109 surface);
84 extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title, 110 extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title,
85 const char *icon); 111 const char *icon);
86 extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon); 112 extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon);
87 extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask); 113 extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
88 extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void); 114 extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
90 extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode); 116 extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
91 extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void); 117 extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
92 extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags, 118 extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags,
93 SDL_Color * colors, 119 SDL_Color * colors,
94 int firstcolor, int ncolors); 120 int firstcolor, int ncolors);
121 extern DECLSPEC int SDLCALL SDL_SetScreenColors(SDL_Surface * screen,
122 SDL_Color * colors,
123 int firstcolor, int ncolors);
95 extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo * info); 124 extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo * info);
96 125
97 /* Ends C function definitions when using C++ */ 126 /* Ends C function definitions when using C++ */
98 #ifdef __cplusplus 127 #ifdef __cplusplus
99 /* *INDENT-OFF* */ 128 /* *INDENT-OFF* */
101 /* *INDENT-ON* */ 130 /* *INDENT-ON* */
102 #endif 131 #endif
103 #include "close_code.h" 132 #include "close_code.h"
104 133
105 #endif /* _SDL_compat_h */ 134 #endif /* _SDL_compat_h */
135
136 /* vi: set ts=4 sw=4 expandtab: */
137 extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);