X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/06e4351185e6f6c53f179d8af833f791b2e8d40e..ba681060f36767a2682b8547871af2c6f8159955:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 06bf4df3f3..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,6 +756,8 @@ typedef enum // Don't do parent client adjustments (for implementation only) #define wxSIZE_NO_ADJUSTMENTS 0x0008 +#ifndef __WXGTK__ + enum wxDataFormat { wxDF_INVALID = 0, @@ -751,6 +780,8 @@ enum wxDataFormat wxDF_PRIVATE = 20 }; +#endif + /* Virtual keycodes */ enum wxKeyCode