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;