comparison src/video/gapi/SDL_gapivideo.h @ 4162:3b7fc3416601 SDL-1.2

GAPI fixes from Stefan Klug
author Sam Lantinga <slouken@libsdl.org>
date Mon, 16 Feb 2009 22:32:34 +0000
parents a1b03ba2fcd0
children 9ea4413f0a9e
comparison
equal deleted inserted replaced
4161:bd91db0b0b5d 4162:3b7fc3416601
25 #define _SDL_gapivideo_h 25 #define _SDL_gapivideo_h
26 26
27 #include "SDL_mouse.h" 27 #include "SDL_mouse.h"
28 #include "SDL_mutex.h" 28 #include "SDL_mutex.h"
29 #include "../SDL_sysvideo.h" 29 #include "../SDL_sysvideo.h"
30 #include "../windib/SDL_gapidibvideo.h"
30 31
31 /* From gx.h, since it's not really C compliant */ 32 /* From gx.h, since it's not really C compliant */
32 33
33 struct GXDisplayProperties { 34 struct GXDisplayProperties {
34 DWORD cxWidth; 35 DWORD cxWidth;
98 99
99 #define GX_FULLSCREEN 0x01 // for OpenDisplay() 100 #define GX_FULLSCREEN 0x01 // for OpenDisplay()
100 #define GX_NORMALKEYS 0x02 101 #define GX_NORMALKEYS 0x02
101 #define GX_LANDSCAPEKEYS 0x03 102 #define GX_LANDSCAPEKEYS 0x03
102 103
103 typedef enum
104 {
105 SDL_ORIENTATION_UP,
106 SDL_ORIENTATION_DOWN,
107 SDL_ORIENTATION_LEFT,
108 SDL_ORIENTATION_RIGHT
109 } SDL_ScreenOrientation;
110 104
111 /* GAPI video mode */ 105 /* GAPI video mode */
112 typedef enum { 106 typedef enum {
113 GAPI_NONE = 0, 107 GAPI_NONE = 0,
114 GAPI_DIRECT_565, 108 GAPI_DIRECT_565,
115 GAPI_DIRECT_555, 109 GAPI_DIRECT_555,
116 GAPI_MONO, 110 GAPI_MONO,
117 GAPI_PALETTE 111 GAPI_PALETTE
118 } GAPIVideoMode; 112 } GAPIVideoMode;
119 113
120 /* Hidden "this" pointer for the video functions */
121 #define _THIS SDL_VideoDevice *this
122
123 typedef unsigned short PIXEL; 114 typedef unsigned short PIXEL;
124 115
125 /* Private display data 116 /* Private display data
126 begin with DIB private structure to allow DIB events code sharing 117 begin with DIB private structure to allow DIB events code sharing
127 */ 118 */
128 struct SDL_PrivateVideoData { 119 struct GapiInfo {
129 HBITMAP screen_bmp; 120 /* Rotation which has to be applied to the key (arrow keys) and mouse events measured in quarters of a circle
130 HPALETTE screen_pal; 121 * counter clockwise */
122 int coordinateTransform;
123 char hiresFix; /* using hires mode without defining hires resource */
124 int invert; //TODO this is only written but never read, so it should be removed
131 125
132 #define NUM_MODELISTS 4 /* 8, 16, 24, and 32 bits-per-pixel */ 126 #define NUM_MODELISTS 4 /* 8, 16, 24, and 32 bits-per-pixel */
133 int SDL_nummodes[NUM_MODELISTS]; 127 int SDL_nummodes[NUM_MODELISTS];
134 SDL_Rect **SDL_modelist[NUM_MODELISTS]; 128 SDL_Rect **SDL_modelist[NUM_MODELISTS];
129
130
135 // The orientation of the video mode user wants to get 131 // The orientation of the video mode user wants to get
136 // Probably restricted to UP and RIGHT 132 // Probably restricted to UP and RIGHT
137 SDL_ScreenOrientation userOrientation; 133 SDL_ScreenOrientation userOrientation;
138 int invert;
139 char hiresFix; // using hires mode without defining hires resource
140 // -------------- 134 // --------------
141 int useGXOpenDisplay; /* use GXOpenDispplay */ 135 int useGXOpenDisplay; /* use GXOpenDispplay */
142 int alreadyGXOpened; 136 int alreadyGXOpened;
143 int w, h; 137 int w, h;
144 // The orientation of GAPI framebuffer. 138 // The orientation of GAPI framebuffer.
156 int dstLineStep; // in bytes 150 int dstLineStep; // in bytes
157 int dstPixelStep; // in bytes 151 int dstPixelStep; // in bytes
158 int startOffset; // in bytes 152 int startOffset; // in bytes
159 int useVga; 153 int useVga;
160 int suspended; // do not pu anything into video memory 154 int suspended; // do not pu anything into video memory
161 // The orientation of the system, as defined by SM_CXSCREEN and SM_CYSCREEN
162 // User can change it by using 'screen layout' in system options
163 // Restricted to UP or RIGHT
164 enum SDL_ScreenOrientation systemOrientation;
165 }; 155 };
166 156
167 157
168 #define gapiBuffer this->hidden->buffer
169 #define gapi this->hidden
170 158
171 #endif /* _SDL_gapivideo_h */ 159 #endif /* _SDL_gapivideo_h */