1 /** 2 * Just enough SDL to use in the samples. 3 * Probably shouldn't be used in any serious fashion. 4 */ 5 module sdl.c.video; 6 7 alias ubyte Uint8; 8 9 struct SDL_Rect 10 { 11 short x, y; 12 ushort w, h; 13 } 14 15 struct SDL_Color 16 { 17 ubyte r; 18 ubyte g; 19 ubyte b; 20 ubyte unused; 21 } 22 23 struct SDL_Palette 24 { 25 int ncolors; 26 SDL_Color* colors; 27 } 28 29 struct SDL_PixelFormat 30 { 31 SDL_Palette* palette; 32 ubyte BitsPerPixel; 33 ubyte BytesPerPixel; 34 ubyte Rloss; 35 ubyte Gloss; 36 ubyte Bloss; 37 ubyte Aloss; 38 ubyte Rshift; 39 ubyte Gshift; 40 ubyte Bshift; 41 ubyte Ashift; 42 uint Rmask; 43 uint Gmask; 44 uint Bmask; 45 uint Amask; 46 47 uint colorkey; 48 ubyte alpha; 49 } 50 51 52 struct private_hwdata; 53 struct SDL_BlitMap; 54 55 struct SDL_Surface 56 { 57 uint flags; 58 SDL_PixelFormat* format; 59 int w, h; 60 ushort pitch; 61 void* pixels; 62 int offset; 63 private_hwdata* hwdata; 64 SDL_Rect clip_rect; 65 uint unused; 66 uint locked; 67 SDL_BlitMap* map; // !!! 68 uint format_version; 69 int refcount; 70 } 71