include/SDL_pixels.h
changeset 1965 a788656ca29a
parent 1895 c121d94672cb
child 2208 b03710fb0333
     1.1 --- a/include/SDL_pixels.h	Thu Aug 03 19:34:05 2006 +0000
     1.2 +++ b/include/SDL_pixels.h	Sat Aug 05 17:09:42 2006 +0000
     1.3 @@ -39,60 +39,60 @@
     1.4  
     1.5  enum
     1.6  {                               /* Pixel type */
     1.7 -    SDL_PixelType_Unknown,
     1.8 -    SDL_PixelType_Index1,
     1.9 -    SDL_PixelType_Index4,
    1.10 -    SDL_PixelType_Index8,
    1.11 -    SDL_PixelType_Packed8,
    1.12 -    SDL_PixelType_Packed16,
    1.13 -    SDL_PixelType_Packed32,
    1.14 -    SDL_PixelType_ArrayU8,
    1.15 -    SDL_PixelType_ArrayU16,
    1.16 -    SDL_PixelType_ArrayU32,
    1.17 -    SDL_PixelType_ArrayF16,
    1.18 -    SDL_PixelType_ArrayF32,
    1.19 +    SDL_PIXELTYPE_UNKNOWN,
    1.20 +    SDL_PIXELTYPE_INDEX1,
    1.21 +    SDL_PIXELTYPE_INDEX4,
    1.22 +    SDL_PIXELTYPE_INDEX8,
    1.23 +    SDL_PIXELTYPE_PACKED8,
    1.24 +    SDL_PIXELTYPE_PACKED16,
    1.25 +    SDL_PIXELTYPE_PACKED32,
    1.26 +    SDL_PIXELTYPE_ARRAYU8,
    1.27 +    SDL_PIXELTYPE_ARRAYU16,
    1.28 +    SDL_PIXELTYPE_ARRAYU32,
    1.29 +    SDL_PIXELTYPE_ARRAYF16,
    1.30 +    SDL_PIXELTYPE_ARRAYF32,
    1.31  };
    1.32  
    1.33  enum
    1.34  {                               /* bitmap pixel order, high bit -> low bit */
    1.35 -    SDL_BitmapOrder_None,
    1.36 -    SDL_BitmapOrder_4321,
    1.37 -    SDL_BitmapOrder_1234,
    1.38 +    SDL_BITMAPORDER_NONE,
    1.39 +    SDL_BITMAPORDER_4321,
    1.40 +    SDL_BITMAPORDER_1234,
    1.41  };
    1.42  enum
    1.43  {                               /* packed component order, high bit -> low bit */
    1.44 -    SDL_PackedOrder_None,
    1.45 -    SDL_PackedOrder_XRGB,
    1.46 -    SDL_PackedOrder_RGBX,
    1.47 -    SDL_PackedOrder_ARGB,
    1.48 -    SDL_PackedOrder_RGBA,
    1.49 -    SDL_PackedOrder_XBGR,
    1.50 -    SDL_PackedOrder_BGRX,
    1.51 -    SDL_PackedOrder_ABGR,
    1.52 -    SDL_PackedOrder_BGRA,
    1.53 +    SDL_PACKEDORDER_NONE,
    1.54 +    SDL_PACKEDORDER_XRGB,
    1.55 +    SDL_PACKEDORDER_RGBX,
    1.56 +    SDL_PACKEDORDER_ARGB,
    1.57 +    SDL_PACKEDORDER_RGBA,
    1.58 +    SDL_PACKEDORDER_XBGR,
    1.59 +    SDL_PACKEDORDER_BGRX,
    1.60 +    SDL_PACKEDORDER_ABGR,
    1.61 +    SDL_PACKEDORDER_BGRA,
    1.62  };
    1.63  enum
    1.64  {                               /* array component order, low byte -> high byte */
    1.65 -    SDL_ArrayOrder_None,
    1.66 -    SDL_ArrayOrder_RGB,
    1.67 -    SDL_ArrayOrder_RGBA,
    1.68 -    SDL_ArrayOrder_ARGB,
    1.69 -    SDL_ArrayOrder_BGR,
    1.70 -    SDL_ArrayOrder_BGRA,
    1.71 -    SDL_ArrayOrder_ABGR,
    1.72 +    SDL_ARRAYORDER_NONE,
    1.73 +    SDL_ARRAYORDER_RGB,
    1.74 +    SDL_ARRAYORDER_RGBA,
    1.75 +    SDL_ARRAYORDER_ARGB,
    1.76 +    SDL_ARRAYORDER_BGR,
    1.77 +    SDL_ARRAYORDER_BGRA,
    1.78 +    SDL_ARRAYORDER_ABGR,
    1.79  };
    1.80  
    1.81  enum
    1.82  {                               /* Packed component layout */
    1.83 -    SDL_PackedLayout_None,
    1.84 -    SDL_PackedLayout_332,
    1.85 -    SDL_PackedLayout_4444,
    1.86 -    SDL_PackedLayout_1555,
    1.87 -    SDL_PackedLayout_5551,
    1.88 -    SDL_PackedLayout_565,
    1.89 -    SDL_PackedLayout_8888,
    1.90 -    SDL_PackedLayout_2101010,
    1.91 -    SDL_PackedLayout_1010102,
    1.92 +    SDL_PACKEDLAYOUT_NONE,
    1.93 +    SDL_PACKEDLAYOUT_332,
    1.94 +    SDL_PACKEDLAYOUT_4444,
    1.95 +    SDL_PACKEDLAYOUT_1555,
    1.96 +    SDL_PACKEDLAYOUT_5551,
    1.97 +    SDL_PACKEDLAYOUT_565,
    1.98 +    SDL_PACKEDLAYOUT_8888,
    1.99 +    SDL_PACKEDLAYOUT_2101010,
   1.100 +    SDL_PACKEDLAYOUT_1010102,
   1.101  };
   1.102  
   1.103  #define SDL_DEFINE_PIXELFOURCC(A, B, C, D) \
   1.104 @@ -109,85 +109,85 @@
   1.105  #define SDL_BYTESPERPIXEL(X)	(((X) >> 0) & 0xFF)
   1.106  
   1.107  #define SDL_ISPIXELFORMAT_INDEXED(format)   \
   1.108 -    ((SDL_PIXELTYPE(format) == SDL_PixelType_Index1) || \
   1.109 -     (SDL_PIXELTYPE(format) == SDL_PixelType_Index4) || \
   1.110 -     (SDL_PIXELTYPE(format) == SDL_PixelType_Index8))
   1.111 +    ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \
   1.112 +     (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
   1.113 +     (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8))
   1.114  
   1.115  #define SDL_ISPIXELFORMAT_FOURCC(format)    \
   1.116      ((format) && !((format) & 0x80000000))
   1.117  
   1.118  enum
   1.119  {
   1.120 -    SDL_PixelFormat_Unknown,
   1.121 -    SDL_PixelFormat_Index1LSB =
   1.122 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index1, SDL_BitmapOrder_1234, 0,
   1.123 +    SDL_PIXELFORMAT_UNKNOWN,
   1.124 +    SDL_PIXELFORMAT_INDEX1LSB =
   1.125 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,
   1.126                                 1, 0),
   1.127 -    SDL_PixelFormat_Index1MSB =
   1.128 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index1, SDL_BitmapOrder_4321, 0,
   1.129 +    SDL_PIXELFORMAT_INDEX1MSB =
   1.130 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,
   1.131                                 1, 0),
   1.132 -    SDL_PixelFormat_Index4LSB =
   1.133 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index4, SDL_BitmapOrder_1234, 0,
   1.134 +    SDL_PIXELFORMAT_INDEX4LSB =
   1.135 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,
   1.136                                 2, 0),
   1.137 -    SDL_PixelFormat_Index4MSB =
   1.138 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index4, SDL_BitmapOrder_4321, 0,
   1.139 +    SDL_PIXELFORMAT_INDEX4MSB =
   1.140 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,
   1.141                                 2, 0),
   1.142 -    SDL_PixelFormat_Index8 =
   1.143 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index8, 0, 0, 8, 1),
   1.144 -    SDL_PixelFormat_RGB332 =
   1.145 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed8, SDL_PackedOrder_XRGB,
   1.146 -                               SDL_PackedLayout_332, 8, 1),
   1.147 -    SDL_PixelFormat_RGB444 =
   1.148 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
   1.149 -                               SDL_PackedLayout_4444, 12, 2),
   1.150 -    SDL_PixelFormat_RGB555 =
   1.151 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
   1.152 -                               SDL_PackedLayout_1555, 15, 2),
   1.153 -    SDL_PixelFormat_ARGB4444 =
   1.154 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
   1.155 -                               SDL_PackedLayout_4444, 16, 2),
   1.156 -    SDL_PixelFormat_ARGB1555 =
   1.157 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
   1.158 -                               SDL_PackedLayout_1555, 16, 2),
   1.159 -    SDL_PixelFormat_RGB565 =
   1.160 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
   1.161 -                               SDL_PackedLayout_565, 16, 2),
   1.162 -    SDL_PixelFormat_RGB24 =
   1.163 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_ArrayU8, SDL_ArrayOrder_RGB, 0,
   1.164 +    SDL_PIXELFORMAT_INDEX8 =
   1.165 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),
   1.166 +    SDL_PIXELFORMAT_RGB332 =
   1.167 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
   1.168 +                               SDL_PACKEDLAYOUT_332, 8, 1),
   1.169 +    SDL_PIXELFORMAT_RGB444 =
   1.170 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
   1.171 +                               SDL_PACKEDLAYOUT_4444, 12, 2),
   1.172 +    SDL_PIXELFORMAT_RGB555 =
   1.173 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
   1.174 +                               SDL_PACKEDLAYOUT_1555, 15, 2),
   1.175 +    SDL_PIXELFORMAT_ARGB4444 =
   1.176 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
   1.177 +                               SDL_PACKEDLAYOUT_4444, 16, 2),
   1.178 +    SDL_PIXELFORMAT_ARGB1555 =
   1.179 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
   1.180 +                               SDL_PACKEDLAYOUT_1555, 16, 2),
   1.181 +    SDL_PIXELFORMAT_RGB565 =
   1.182 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
   1.183 +                               SDL_PACKEDLAYOUT_565, 16, 2),
   1.184 +    SDL_PIXELFORMAT_RGB24 =
   1.185 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,
   1.186                                 24, 3),
   1.187 -    SDL_PixelFormat_BGR24 =
   1.188 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_ArrayU8, SDL_ArrayOrder_BGR, 0,
   1.189 +    SDL_PIXELFORMAT_BGR24 =
   1.190 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
   1.191                                 24, 3),
   1.192 -    SDL_PixelFormat_RGB888 =
   1.193 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_XRGB,
   1.194 -                               SDL_PackedLayout_8888, 24, 4),
   1.195 -    SDL_PixelFormat_BGR888 =
   1.196 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_XBGR,
   1.197 -                               SDL_PackedLayout_8888, 24, 4),
   1.198 -    SDL_PixelFormat_ARGB8888 =
   1.199 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
   1.200 -                               SDL_PackedLayout_8888, 32, 4),
   1.201 -    SDL_PixelFormat_RGBA8888 =
   1.202 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_RGBA,
   1.203 -                               SDL_PackedLayout_8888, 32, 4),
   1.204 -    SDL_PixelFormat_ABGR8888 =
   1.205 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ABGR,
   1.206 -                               SDL_PackedLayout_8888, 32, 4),
   1.207 -    SDL_PixelFormat_BGRA8888 =
   1.208 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_BGRA,
   1.209 -                               SDL_PackedLayout_8888, 32, 4),
   1.210 -    SDL_PixelFormat_ARGB2101010 =
   1.211 -        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
   1.212 -                               SDL_PackedLayout_2101010, 32, 4),
   1.213 +    SDL_PIXELFORMAT_RGB888 =
   1.214 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
   1.215 +                               SDL_PACKEDLAYOUT_8888, 24, 4),
   1.216 +    SDL_PIXELFORMAT_BGR888 =
   1.217 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
   1.218 +                               SDL_PACKEDLAYOUT_8888, 24, 4),
   1.219 +    SDL_PIXELFORMAT_ARGB8888 =
   1.220 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
   1.221 +                               SDL_PACKEDLAYOUT_8888, 32, 4),
   1.222 +    SDL_PIXELFORMAT_RGBA8888 =
   1.223 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,
   1.224 +                               SDL_PACKEDLAYOUT_8888, 32, 4),
   1.225 +    SDL_PIXELFORMAT_ABGR8888 =
   1.226 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,
   1.227 +                               SDL_PACKEDLAYOUT_8888, 32, 4),
   1.228 +    SDL_PIXELFORMAT_BGRA8888 =
   1.229 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,
   1.230 +                               SDL_PACKEDLAYOUT_8888, 32, 4),
   1.231 +    SDL_PIXELFORMAT_ARGB2101010 =
   1.232 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
   1.233 +                               SDL_PACKEDLAYOUT_2101010, 32, 4),
   1.234  
   1.235 -    SDL_PixelFormat_YV12 =      /* Planar mode: Y + V + U  (3 planes) */
   1.236 +    SDL_PIXELFORMAT_YV12 =      /* Planar mode: Y + V + U  (3 planes) */
   1.237          SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
   1.238 -    SDL_PixelFormat_IYUV =      /* Planar mode: Y + U + V  (3 planes) */
   1.239 +    SDL_PIXELFORMAT_IYUV =      /* Planar mode: Y + U + V  (3 planes) */
   1.240          SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
   1.241 -    SDL_PixelFormat_YUY2 =      /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
   1.242 +    SDL_PIXELFORMAT_YUY2 =      /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
   1.243          SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
   1.244 -    SDL_PixelFormat_UYVY =      /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
   1.245 +    SDL_PIXELFORMAT_UYVY =      /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
   1.246          SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
   1.247 -    SDL_PixelFormat_YVYU =      /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
   1.248 +    SDL_PIXELFORMAT_YVYU =      /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
   1.249          SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
   1.250  };
   1.251