X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7e0343413296e8719386abbcb55ecbc4dceba36..97f3b1e939c502a05f2717e52b44919c8254d61e:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 5550a48455..6acc275f86 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -103,15 +103,6 @@ #endif /* VC++ 8 */ #endif /* __VISUALC__ */ -/* 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 /* __SALFORDC__ */ - /* suppress some Borland C++ warnings */ #ifdef __BORLANDC__ # pragma warn -inl /* Functions containing reserved words and certain constructs are not expanded inline */ @@ -204,6 +195,9 @@ #define false ((bool)0) #endif #define HAVE_BOOL + #elif defined(__WXPALMOS__) + /* Palm OS supports bool */ + #define HAVE_BOOL #endif /* compilers */ #endif /* HAVE_BOOL */ @@ -239,12 +233,6 @@ typedef short int WXTYPE; -/* special care should be taken with this type under Windows where the real */ -/* window id is unsigned, so we must always do the cast before comparing them */ -/* (or else they would be always different!). Using wxGetWindowId() which does */ -/* the cast itself is recommended. Note that this type can't be unsigned */ -/* because wxID_ANY == -1 is a valid (and largely used) value for window id. */ -typedef int wxWindowID; /* ---------------------------------------------------------------------------- */ /* other feature tests */ @@ -456,6 +444,21 @@ typedef int wxWindowID; #endif #endif /* HAVE_WOSTREAM */ +// ---------------------------------------------------------------------------- +// other C++ features +// ---------------------------------------------------------------------------- + +#ifndef HAVE_PARTIAL_SPECIALIZATION + // be optimistic by default + #define HAVE_PARTIAL_SPECIALIZATION +#endif + +#ifdef __VISUALC__ + #if __VISUALC__ < 1310 + #undef HAVE_PARTIAL_SPECIALIZATION + #endif +#endif // __VISUALC__ + /* ---------------------------------------------------------------------------- */ /* portable calling conventions macros */ /* ---------------------------------------------------------------------------- */ @@ -563,7 +566,7 @@ typedef int wxWindowID; /* NULL declaration: it must be defined as 0 for C++ programs (in particular, */ /* it must not be defined as "(void *)0" which is standard for C but completely */ /* breaks C++ code) */ -#ifndef __HANDHELDPC__ +#if !defined(__HANDHELDPC__) && !defined(__PALMOS__) #include #endif @@ -751,7 +754,9 @@ enum { wxDefaultCoord = -1 }; /* ---------------------------------------------------------------------------- */ #if defined(__WXPALMOS__) || defined(__MINGW32__) + #if !defined(__MWERKS__) #include + #endif #endif /* chars are always one byte (by definition), shorts are always two (in */ @@ -807,7 +812,9 @@ typedef wxUint16 wxWord; #define SIZEOF_LONG 4 #define SIZEOF_WCHAR_T 2 #define SIZEOF_SIZE_T 4 - #define wxSIZE_T_IS_UINT + #ifdef __WXPALMOS6__ + #define wxSIZE_T_IS_UINT + #endif #define SIZEOF_VOID_P 4 #define SIZEOF_SIZE_T 4 #elif defined(__WINDOWS__) @@ -936,7 +943,7 @@ typedef wxUint32 wxDword; #define wxINT64_MIN LLONG_MIN #else #define wxINT64_MAX wxLL(9223372036854775807) - #define wxINT64_MIN wxLL(-9223372036854775807-1) + #define wxINT64_MIN (wxLL(-9223372036854775807)-1) #endif /* @@ -1058,7 +1065,11 @@ inline void *wxUIntToPtr(wxUIntPtr p) #error "See the documentation on the 'longlong' pragma." #endif #elif defined(__WXPALMOS__) - #define wxLongLong_t int64_t + #if defined(__WXPALMOS6__) + #define wxLongLong_t int64_t + #else + #define wxLongLong_t long long + #endif /* __WXPALMOS6__ */ #define wxLongLongSuffix ll #define wxLongLongFmtSpec _T("ll") #elif defined(__VISAGECPP__) && __IBMCPP__ >= 400 @@ -1082,7 +1093,11 @@ inline void *wxUIntToPtr(wxUIntPtr p) #ifdef wxLongLong_t #ifdef __WXPALMOS__ + #if defined(__WXPALMOS6__) #define wxULongLong_t uint64_t + #else + #define wxULongLong_t unsigned long long + #endif /* __WXPALMOS6__ */ #else #define wxULongLong_t unsigned wxLongLong_t #endif @@ -1776,8 +1791,19 @@ enum These ids delimit the range used by automatically-generated ids (i.e. those used when wxID_ANY is specified during construction). */ +#if defined(__WXMSW__) || wxUSE_AUTOID_MANAGEMENT + /* + On MSW the range is always restricted no matter if id management + is used or not because the native window ids are limited to short + range. On other platforms the range is only restricted if id + management is used so the reference count buffer won't be so big. + */ wxID_AUTO_LOWEST = -32000, wxID_AUTO_HIGHEST = -2000, +#else + wxID_AUTO_LOWEST = -1000000, + wxID_AUTO_HIGHEST = -2000, +#endif /* no id matches this one when compared to it */ wxID_NONE = -3, @@ -1913,6 +1939,19 @@ enum wxID_HIGHEST = 5999 }; +/* ---------------------------------------------------------------------------- */ +/* wxWindowID type (after wxID_XYZ enum, platform detection, and dlimpexp.h) */ +/* ---------------------------------------------------------------------------- */ + +/* special care should be taken with this type under Windows where the real */ +/* window id is unsigned, so we must always do the cast before comparing them */ +/* (or else they would be always different!). Using wxGetWindowId() which does */ +/* the cast itself is recommended. Note that this type can't be unsigned */ +/* because wxID_ANY == -1 is a valid (and largely used) value for window id. */ +#ifdef __cplusplus + #include "wx/windowid.h" +#endif + /* ---------------------------------------------------------------------------- */ /* other constants */ /* ---------------------------------------------------------------------------- */