Fixed bug 4813 - Give enums their own name
authorSylvain Becker <sylvain.becker@gmail.com>
Thu, 10 Oct 2019 17:40:00 +0200
changeset 1310928c572567380
parent 13108 efa5fe44e4e8
child 13110 4cbaffd0083b
Fixed bug 4813 - Give enums their own name
* SDL_PIXELTYPE_
* SDL_BITMAPORDER_
* SDL_PACKEDORDER_
* SDL_ARRAYORDER_
* SDL_PACKEDLAYOUT_
* SDLK_
* SDL_LOG_CATEGORY_
include/SDL_keycode.h
include/SDL_log.h
include/SDL_pixels.h
     1.1 --- a/include/SDL_keycode.h	Thu Oct 10 17:21:46 2019 +0200
     1.2 +++ b/include/SDL_keycode.h	Thu Oct 10 17:40:00 2019 +0200
     1.3 @@ -47,7 +47,7 @@
     1.4  #define SDLK_SCANCODE_MASK (1<<30)
     1.5  #define SDL_SCANCODE_TO_KEYCODE(X)  (X | SDLK_SCANCODE_MASK)
     1.6  
     1.7 -enum
     1.8 +typedef enum
     1.9  {
    1.10      SDLK_UNKNOWN = 0,
    1.11  
    1.12 @@ -317,7 +317,7 @@
    1.13  
    1.14      SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
    1.15      SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
    1.16 -};
    1.17 +} SDL_KeyCodeEnum;
    1.18  
    1.19  /**
    1.20   * \brief Enumeration of valid key mods (possibly OR'd together).
     2.1 --- a/include/SDL_log.h	Thu Oct 10 17:21:46 2019 +0200
     2.2 +++ b/include/SDL_log.h	Thu Oct 10 17:40:00 2019 +0200
     2.3 @@ -61,7 +61,7 @@
     2.4   *  at the VERBOSE level and all other categories are enabled at the
     2.5   *  CRITICAL level.
     2.6   */
     2.7 -enum
     2.8 +typedef enum
     2.9  {
    2.10      SDL_LOG_CATEGORY_APPLICATION,
    2.11      SDL_LOG_CATEGORY_ERROR,
    2.12 @@ -94,7 +94,7 @@
    2.13         };
    2.14       */
    2.15      SDL_LOG_CATEGORY_CUSTOM
    2.16 -};
    2.17 +} SDL_LogCategoryEnum;
    2.18  
    2.19  /**
    2.20   *  \brief The predefined log priorities
     3.1 --- a/include/SDL_pixels.h	Thu Oct 10 17:21:46 2019 +0200
     3.2 +++ b/include/SDL_pixels.h	Thu Oct 10 17:40:00 2019 +0200
     3.3 @@ -48,7 +48,7 @@
     3.4  /* @} */
     3.5  
     3.6  /** Pixel type. */
     3.7 -enum
     3.8 +typedef enum
     3.9  {
    3.10      SDL_PIXELTYPE_UNKNOWN,
    3.11      SDL_PIXELTYPE_INDEX1,
    3.12 @@ -62,18 +62,18 @@
    3.13      SDL_PIXELTYPE_ARRAYU32,
    3.14      SDL_PIXELTYPE_ARRAYF16,
    3.15      SDL_PIXELTYPE_ARRAYF32
    3.16 -};
    3.17 +} SDL_PixelTypeEnum;
    3.18  
    3.19  /** Bitmap pixel order, high bit -> low bit. */
    3.20 -enum
    3.21 +typedef enum
    3.22  {
    3.23      SDL_BITMAPORDER_NONE,
    3.24      SDL_BITMAPORDER_4321,
    3.25      SDL_BITMAPORDER_1234
    3.26 -};
    3.27 +} SDL_BitmapOrderEnum;
    3.28  
    3.29  /** Packed component order, high bit -> low bit. */
    3.30 -enum
    3.31 +typedef enum
    3.32  {
    3.33      SDL_PACKEDORDER_NONE,
    3.34      SDL_PACKEDORDER_XRGB,
    3.35 @@ -84,12 +84,12 @@
    3.36      SDL_PACKEDORDER_BGRX,
    3.37      SDL_PACKEDORDER_ABGR,
    3.38      SDL_PACKEDORDER_BGRA
    3.39 -};
    3.40 +} SDL_PackedOrderEnum;
    3.41  
    3.42  /** Array component order, low byte -> high byte. */
    3.43  /* !!! FIXME: in 2.1, make these not overlap differently with
    3.44     !!! FIXME:  SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
    3.45 -enum
    3.46 +typedef enum
    3.47  {
    3.48      SDL_ARRAYORDER_NONE,
    3.49      SDL_ARRAYORDER_RGB,
    3.50 @@ -98,10 +98,10 @@
    3.51      SDL_ARRAYORDER_BGR,
    3.52      SDL_ARRAYORDER_BGRA,
    3.53      SDL_ARRAYORDER_ABGR
    3.54 -};
    3.55 +} SDL_ArrayOrderEnum;
    3.56  
    3.57  /** Packed component layout. */
    3.58 -enum
    3.59 +typedef enum
    3.60  {
    3.61      SDL_PACKEDLAYOUT_NONE,
    3.62      SDL_PACKEDLAYOUT_332,
    3.63 @@ -112,7 +112,7 @@
    3.64      SDL_PACKEDLAYOUT_8888,
    3.65      SDL_PACKEDLAYOUT_2101010,
    3.66      SDL_PACKEDLAYOUT_1010102
    3.67 -};
    3.68 +} SDL_PackedLayoutEnum;
    3.69  
    3.70  #define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
    3.71