# pragma suppress 571 // Virtual function hiding
#endif // __SALFORDC__
-#ifdef __VISUALC__
-#ifndef WIN32
-// VC1.5 does not have LPTSTR type
-#define LPTSTR LPSTR
-#define LPCTSTR LPCSTR
-#endif
-#endif
+#if defined(__VISUALC__) && !defined(WIN32)
+ // VC1.5 does not have LPTSTR type
+ #define LPTSTR LPSTR
+ #define LPCTSTR LPCSTR
+#endif // VC++ 1.5
// Digital Unix C++ compiler only defines this symbol for .cxx and .hxx files,
// so define it ourselves
// Make sure the environment is set correctly
#if defined(__WXMSW__) && defined(__X__)
#error "Target can't be both X and Windows"
-#elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && !defined(__WXPM__) && \
- !defined(__WXMAC__) && !defined(__X__) && !defined(__WXQT__) && !defined(__WXSTUBS__)
+#elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \
+ !defined(__WXPM__) && !defined(__WXMAC__) && !defined(__X__) && \
+ !defined(__WXQT__) && !defined(__WXSTUBS__) && wxUSE_GUI
#error "No Target! Use -D[__WXMOTIF__|__WXGTK__|__WXMSW__|__WXMAC__|__WXQT__|__WXPM__|__WXSTUBS__]"
#endif
#include "wx/version.h"
+// ----------------------------------------------------------------------------
+// compatibility defines
+// ----------------------------------------------------------------------------
+
+// possibility to build non GUI apps is new, so don't burden ourselves with
+// compatibility code
+#if !wxUSE_GUI
+ #undef WXWIN_COMPATIBILITY_2
+ #define WXWIN_COMPATIBILITY_2 0
+#endif // !GUI
+
// ============================================================================
// non portable C++ features
// ============================================================================
// check for native bool type and TRUE/FALSE constants
// ----------------------------------------------------------------------------
-#if defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXQT__) || defined(__WXPM__) || defined(__WXSTUBS__)
- // Bool is now obsolete, use bool instead
- // typedef int Bool;
+// define boolean constants if not done yet
+#ifndef TRUE
+ #define TRUE 1
+#endif
- #ifndef TRUE
- #define TRUE 1
- #define FALSE 0
- #define Bool_DEFINED
- #endif
-#elif defined(__WXMSW__)
- #ifndef TRUE
- #define TRUE 1
- #define FALSE 0
- #endif
-#endif // TRUE/FALSE
+#ifndef FALSE
+ #define FALSE 0
+#endif
// Add more tests here for Windows compilers that already define bool
// (under Unix, configure tests for this)
#define WXUNUSED(identifier) identifier
#endif
-/*
- * Making or using wxWindows as a Windows DLL
- */
+// ----------------------------------------------------------------------------
+// portable calling conventions macros
+// ----------------------------------------------------------------------------
+
+// wxCALLBACK should be used for the functions which are called back by
+// Windows (such as compare function for wxListCtrl)
+#if defined(__WXMSW__)
+ #if defined(__MINGW32__)
+ #define wxCALLBACK __attribute__((stdcall))
+ #else
+ // both VC++ and Borland understand this
+ #define wxCALLBACK _stdcall
+ #endif
+#else
+ // no stdcall under Unix
+ #define wxCALLBACK
+#endif // platform
+
+// callling convention for the qsort(3) callback
+
+#if defined(__VISUALC__)
+ #define wxCMPFUNC_CONV _cdecl
+#elif defined(__VISAGECPP__)
+ #define wxCMPFUNC_CONV _Optlink
+#else // !Visual C++
+ #define wxCMPFUNC_CONV
+#endif // compiler
+
+// compatibility :-(
+#define CMPFUNC_CONV wxCMPFUNC_CONV
+
+// ----------------------------------------------------------------------------
+// Making or using wxWindows as a Windows DLL
+// ----------------------------------------------------------------------------
#if defined(__WXMSW__)
wxMGL_UNIX, // MGL with direct hardware access
wxMGL_X, // MGL on X
wxMGL_WIN32, // MGL on Win32
- wxMGL_OS2 // MGL on OS/2
+ wxMGL_OS2, // MGL on OS/2
+ wxWINDOWS_OS2 // Native OS/2 PM
};
// ----------------------------------------------------------------------------
* wxNotebook flags
*/
#define wxNB_FIXEDWIDTH 0x0008
+#define wxNB_LEFT 0x0020
+#define wxNB_RIGHT 0x0040
+#define wxNB_BOTTOM 0x0080
/*
* wxStatusBar95 flags
typedef unsigned int WXUINT;
typedef unsigned long WXDWORD;
typedef unsigned short WXWORD;
+#ifdef __WXMSW__
typedef unsigned int WXWPARAM;
typedef long WXLPARAM;
+#else
+# define WXWPARAM MPARAM
+# define WXLPARAM MPARAM
+# define RECT RECTL
+# define LOGFONT FATTRS
+#endif
typedef unsigned long WXCOLORREF;
typedef void * WXRGNDATA;
typedef void * WXMSG;