Fixed bug 4813 - Give enums their own name * SDL_PIXELTYPE_ * SDL_BITMAPORDER_ * SDL_PACKEDORDER_ * SDL_ARRAYORDER_ * SDL_PACKEDLAYOUT_ * SDLK_ * SDL_LOG_CATEGORY_
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
diff --git a/include/SDL_keycode.h b/include/SDL_keycode.h
index 3bceb41..850119c 100644
--- a/include/SDL_keycode.h
+++ b/include/SDL_keycode.h
@@ -47,7 +47,7 @@ typedef Sint32 SDL_Keycode;
#define SDLK_SCANCODE_MASK (1<<30)
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
-enum
+typedef enum
{
SDLK_UNKNOWN = 0,
@@ -317,7 +317,7 @@ enum
SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
-};
+} SDL_KeyCodeEnum;
/**
* \brief Enumeration of valid key mods (possibly OR'd together).
diff --git a/include/SDL_log.h b/include/SDL_log.h
index 40f768d..febc69a 100644
--- a/include/SDL_log.h
+++ b/include/SDL_log.h
@@ -61,7 +61,7 @@ extern "C" {
* at the VERBOSE level and all other categories are enabled at the
* CRITICAL level.
*/
-enum
+typedef enum
{
SDL_LOG_CATEGORY_APPLICATION,
SDL_LOG_CATEGORY_ERROR,
@@ -94,7 +94,7 @@ enum
};
*/
SDL_LOG_CATEGORY_CUSTOM
-};
+} SDL_LogCategoryEnum;
/**
* \brief The predefined log priorities
diff --git a/include/SDL_pixels.h b/include/SDL_pixels.h
index dcb7a98..ac1e6cc 100644
--- a/include/SDL_pixels.h
+++ b/include/SDL_pixels.h
@@ -48,7 +48,7 @@ extern "C" {
/* @} */
/** Pixel type. */
-enum
+typedef enum
{
SDL_PIXELTYPE_UNKNOWN,
SDL_PIXELTYPE_INDEX1,
@@ -62,18 +62,18 @@ enum
SDL_PIXELTYPE_ARRAYU32,
SDL_PIXELTYPE_ARRAYF16,
SDL_PIXELTYPE_ARRAYF32
-};
+} SDL_PixelTypeEnum;
/** Bitmap pixel order, high bit -> low bit. */
-enum
+typedef enum
{
SDL_BITMAPORDER_NONE,
SDL_BITMAPORDER_4321,
SDL_BITMAPORDER_1234
-};
+} SDL_BitmapOrderEnum;
/** Packed component order, high bit -> low bit. */
-enum
+typedef enum
{
SDL_PACKEDORDER_NONE,
SDL_PACKEDORDER_XRGB,
@@ -84,12 +84,12 @@ enum
SDL_PACKEDORDER_BGRX,
SDL_PACKEDORDER_ABGR,
SDL_PACKEDORDER_BGRA
-};
+} SDL_PackedOrderEnum;
/** Array component order, low byte -> high byte. */
/* !!! FIXME: in 2.1, make these not overlap differently with
!!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
-enum
+typedef enum
{
SDL_ARRAYORDER_NONE,
SDL_ARRAYORDER_RGB,
@@ -98,10 +98,10 @@ enum
SDL_ARRAYORDER_BGR,
SDL_ARRAYORDER_BGRA,
SDL_ARRAYORDER_ABGR
-};
+} SDL_ArrayOrderEnum;
/** Packed component layout. */
-enum
+typedef enum
{
SDL_PACKEDLAYOUT_NONE,
SDL_PACKEDLAYOUT_332,
@@ -112,7 +112,7 @@ enum
SDL_PACKEDLAYOUT_8888,
SDL_PACKEDLAYOUT_2101010,
SDL_PACKEDLAYOUT_1010102
-};
+} SDL_PackedLayoutEnum;
#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)