Use enums, not typedef enums, in all public headers.

This commit is contained in:
Lauri Nurmi
2016-02-07 01:11:25 +02:00
parent 859e31ca7f
commit 4281cb4daa
8 changed files with 32 additions and 32 deletions

View File

@@ -21,14 +21,14 @@
#include "wx/variant.h"
typedef enum
enum wxAccStatus
{
wxACC_FAIL,
wxACC_FALSE,
wxACC_OK,
wxACC_NOT_IMPLEMENTED,
wxACC_NOT_SUPPORTED
} wxAccStatus;
};
// Child ids are integer identifiers from 1 up.
// So zero represents 'this' object.
@@ -36,7 +36,7 @@ typedef enum
// Navigation constants
typedef enum
enum wxNavDir
{
wxNAVDIR_DOWN,
wxNAVDIR_FIRSTCHILD,
@@ -46,11 +46,11 @@ typedef enum
wxNAVDIR_PREVIOUS,
wxNAVDIR_RIGHT,
wxNAVDIR_UP
} wxNavDir;
};
// Role constants
typedef enum {
enum wxAccRole {
wxROLE_NONE,
wxROLE_SYSTEM_ALERT,
wxROLE_SYSTEM_ANIMATION,
@@ -113,11 +113,11 @@ typedef enum {
wxROLE_SYSTEM_TOOLTIP,
wxROLE_SYSTEM_WHITESPACE,
wxROLE_SYSTEM_WINDOW
} wxAccRole;
};
// Object types
typedef enum {
enum wxAccObject {
wxOBJID_WINDOW = 0x00000000,
wxOBJID_SYSMENU = 0xFFFFFFFF,
wxOBJID_TITLEBAR = 0xFFFFFFFE,
@@ -130,7 +130,7 @@ typedef enum {
wxOBJID_CURSOR = 0xFFFFFFF7,
wxOBJID_ALERT = 0xFFFFFFF6,
wxOBJID_SOUND = 0xFFFFFFF5
} wxAccObject;
};
// Accessible states
@@ -163,7 +163,7 @@ typedef enum {
// Selection flag
typedef enum
enum wxAccSelectionFlags
{
wxACC_SEL_NONE = 0,
wxACC_SEL_TAKEFOCUS = 1,
@@ -171,7 +171,7 @@ typedef enum
wxACC_SEL_EXTENDSELECTION = 4,
wxACC_SEL_ADDSELECTION = 8,
wxACC_SEL_REMOVESELECTION = 16
} wxAccSelectionFlags;
};
// Accessibility event identifiers

View File

@@ -2742,7 +2742,7 @@ enum wxKeyModifier
#define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
/* Paper types */
typedef enum
enum wxPaperSize
{
wxPAPER_NONE, /* Use specific dimensions */
wxPAPER_LETTER, /* Letter, 8 1/2 by 11 inches */
@@ -2865,7 +2865,7 @@ typedef enum
wxPAPER_PENV_10_ROTATED, /* PRC Envelope #10 Rotated 458 x 324 m */
wxPAPER_A0, /* A0 Sheet 841 x 1189 mm */
wxPAPER_A1 /* A1 Sheet 594 x 841 mm */
} wxPaperSize;
};
/* Printing orientation */
enum wxPrintOrientation

View File

@@ -29,7 +29,7 @@ class WXDLLIMPEXP_FWD_NET wxProtocolLog;
// constants
// ----------------------------------------------------------------------------
typedef enum
enum wxProtocolError
{
wxPROTO_NOERR = 0,
wxPROTO_NETERR,
@@ -41,7 +41,7 @@ typedef enum
wxPROTO_ABRT,
wxPROTO_RCNCT,
wxPROTO_STREAMING
} wxProtocolError;
};
// ----------------------------------------------------------------------------
// wxProtocol: abstract base class for all protocols

View File

@@ -107,13 +107,13 @@ protected:
wxDECLARE_NO_COPY_CLASS(wxTextInputStream);
};
typedef enum
enum wxEOL
{
wxEOL_NATIVE,
wxEOL_UNIX,
wxEOL_MAC,
wxEOL_DOS
} wxEOL;
};
class WXDLLIMPEXP_BASE wxTextOutputStream
{

View File

@@ -22,7 +22,7 @@
#include "wx/protocol/http.h"
#endif
typedef enum {
enum wxURLError {
wxURL_NOERR = 0,
wxURL_SNTXERR,
wxURL_NOPROTO,
@@ -30,7 +30,7 @@ typedef enum {
wxURL_NOPATH,
wxURL_CONNERR,
wxURL_PROTOERR
} wxURLError;
};
#if wxUSE_URL_NATIVE
class WXDLLIMPEXP_FWD_NET wxURL;

View File

@@ -10,20 +10,20 @@
wxAccessible functions return a wxAccStatus error code,
which may be one of this enum's values.
*/
typedef enum
enum wxAccStatus
{
wxACC_FAIL, //!< The function failed.
wxACC_FALSE, //!< The function returned false.
wxACC_OK, //!< The function completed successfully.
wxACC_NOT_IMPLEMENTED, //!< The function is not implemented.
wxACC_NOT_SUPPORTED //!< The function is not supported.
} wxAccStatus;
};
/**
Directions of navigation are represented by this enum.
*/
typedef enum
enum wxNavDir
{
wxNAVDIR_DOWN,
wxNAVDIR_FIRSTCHILD,
@@ -33,13 +33,13 @@ typedef enum
wxNAVDIR_PREVIOUS,
wxNAVDIR_RIGHT,
wxNAVDIR_UP
} wxNavDir;
};
/**
The role of a user interface element is represented by the values of this enum.
*/
typedef enum {
enum wxAccRole {
wxROLE_NONE,
wxROLE_SYSTEM_ALERT,
wxROLE_SYSTEM_ANIMATION,
@@ -102,12 +102,12 @@ typedef enum {
wxROLE_SYSTEM_TOOLTIP,
wxROLE_SYSTEM_WHITESPACE,
wxROLE_SYSTEM_WINDOW
} wxAccRole;
};
/**
Objects are represented by a wxAccObject enum value.
*/
typedef enum {
enum wxAccObject {
wxOBJID_WINDOW = 0x00000000,
wxOBJID_SYSMENU = 0xFFFFFFFF,
wxOBJID_TITLEBAR = 0xFFFFFFFE,
@@ -120,13 +120,13 @@ typedef enum {
wxOBJID_CURSOR = 0xFFFFFFF7,
wxOBJID_ALERT = 0xFFFFFFF6,
wxOBJID_SOUND = 0xFFFFFFF5
} wxAccObject;
};
/**
Selection actions are identified by the wxAccSelectionFlags values.
*/
typedef enum
enum wxAccSelectionFlags
{
wxACC_SEL_NONE = 0,
wxACC_SEL_TAKEFOCUS = 1,
@@ -134,7 +134,7 @@ typedef enum
wxACC_SEL_EXTENDSELECTION = 4,
wxACC_SEL_ADDSELECTION = 8,
wxACC_SEL_REMOVESELECTION = 16
} wxAccSelectionFlags;
};
//@{
/**

View File

@@ -251,7 +251,7 @@ public:
/**
Specifies the end-of-line characters to use with wxTextOutputStream.
*/
typedef enum
enum wxEOL
{
/**
Specifies wxTextOutputStream to use the native end-of-line characters.
@@ -272,7 +272,7 @@ typedef enum
Specifies wxTextOutputStream to use DOS end-of-line characters.
*/
wxEOL_DOS
} wxEOL;
};
/**

View File

@@ -8,7 +8,7 @@
/**
Error types returned from wxURL::GetError().
*/
typedef enum {
enum wxURLError {
wxURL_NOERR = 0, ///< No error.
wxURL_SNTXERR, ///< Syntax error in the URL string.
wxURL_NOPROTO, ///< Found no protocol which can get this URL.
@@ -16,7 +16,7 @@ typedef enum {
wxURL_NOPATH, ///< A path is required for this protocol.
wxURL_CONNERR, ///< Connection error.
wxURL_PROTOERR ///< An error occurred during negotiation.
} wxURLError;
};
/**
@class wxURL