X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad5c34f309074eefe625b82e1203eec5b91247f5..c84c52de6f534df50dc6348b839c98029fa3f8ee:/include/wx/defs.h?ds=sidebyside diff --git a/include/wx/defs.h b/include/wx/defs.h index a9ae62cf41..2c3b71ec0c 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -46,6 +46,15 @@ # pragma warning(disable:4100) // unreferenced formal parameter #endif +// suppress some Salford C++ warnings +#ifdef __SALFORDC__ +# pragma suppress 353 // Possible nested comments +# pragma suppress 593 // Define not used +# pragma suppress 61 // enum has no name (doesn't suppress!) +# pragma suppress 106 // unnamed, unused parameter +# pragma suppress 571 // Virtual function hiding +#endif + ////////////////////////////////////////////////////////////////////////////////// // Currently Only MS-Windows/NT, XView and Motif are supported // @@ -70,6 +79,10 @@ #define __WIN95__ #endif +#if defined(TWIN32) && !defined(__TWIN32__) +#define __TWIN32__ +#endif + #endif // wxMSW // Make sure the environment is set correctly @@ -109,6 +122,8 @@ #endif #elif defined(__SC__) typedef unsigned int bool; +#elif defined(__SALFORDC__) + typedef unsigned int bool; #elif defined(_MSC_VER) && (_MSC_VER <= 1000) typedef unsigned int bool; #elif defined(_MSC_VER) && (_MSC_VER == 1020) @@ -118,14 +133,24 @@ #elif defined(__WATCOMC__) typedef unsigned int bool; #elif defined(__SUNCC__) - // If we use int, we get identically overloaded functions in config.cpp - typedef unsigned char bool; + #ifdef __SUNPRO_CC + // starting from version 5.0 Sun CC understands 'bool' + #if __SUNPRO_CC <= 0x0420 + // If we use int, we get identically overloaded functions in config.cpp + typedef unsigned char bool; + #endif // Sun CC version + #else + #error "Unknown compiler: only Sun's CC and gcc are currently reckognized." + #endif // Sun CC #endif -#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) - #define byte unsigned char +#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) || defined(__SALFORDC__) +// Not a good idea, because later system files (e.g. windows.h) +// may try to define it. Use wxByte instead. +// #define byte unsigned char #endif +typedef unsigned char wxByte; typedef short int WXTYPE; typedef int wxWindowID; @@ -195,12 +220,16 @@ class WXDLLEXPORT wxEvent; /** symbolic constant used by all Find()-like functions returning positive integer on success as failure indicator */ -#define NOT_FOUND (-1) +#define wxNOT_FOUND (-1) // ---------------------------------------------------------------------------- // Error codes // ---------------------------------------------------------------------------- +#ifdef ERR_PARAM +#undef ERR_PARAM +#endif + /// Standard error codes enum ErrCode { @@ -450,9 +479,7 @@ typedef void (*wxFunction) (wxObject&, wxEvent&); #define wxTE_PASSWORD wxPASSWORD #define wxTE_READONLY 0x0010 #define wxTE_MULTILINE 0x0020 - -// MSW-only -#define wxTE_RICHTEXT 0x0020 +#define wxTE_PROCESS_TAB 0x0040 /* * wxComboBox style flags @@ -729,21 +756,32 @@ typedef enum // Don't do parent client adjustments (for implementation only) #define wxSIZE_NO_ADJUSTMENTS 0x0008 - -/* Data format for drag & drop and clipboard operations - * numbers as per winuser.h */ +#ifndef __WXGTK__ enum wxDataFormat { + wxDF_INVALID = 0, wxDF_TEXT = 1, /* CF_TEXT */ wxDF_BITMAP = 2, /* CF_BITMAP */ wxDF_METAFILE = 3, /* CF_METAFILEPICT */ - wxDF_DIB = 8, /* CF_DIB */ + wxDF_SYLK = 4, + wxDF_DIF = 5, + wxDF_TIFF = 6, wxDF_OEMTEXT = 7, /* CF_OEMTEXT */ + wxDF_DIB = 8, /* CF_DIB */ + wxDF_PALETTE = 9, + wxDF_PENDATA = 10, + wxDF_RIFF = 11, + wxDF_WAVE = 12, + wxDF_UNICODETEXT = 13, + wxDF_ENHMETAFILE = 14, wxDF_FILENAME = 15, /* CF_HDROP */ + wxDF_LOCALE = 16, wxDF_PRIVATE = 20 }; +#endif + /* Virtual keycodes */ enum wxKeyCode