]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/defs.h
added wxCHECK_VISUALC_VERSION macro
[wxWidgets.git] / include / wx / defs.h
index 3c5ad727164d9df6a9165d378d22fd6795f28ad4..6acc275f86a2e6f1a39b95237dffbb0dfdb6a4fa 100644 (file)
 
 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 */
@@ -450,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 */
 /*  ---------------------------------------------------------------------------- */
@@ -934,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
 
 /*
@@ -1782,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,
@@ -1919,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 */
 /*  ---------------------------------------------------------------------------- */