]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/defs.h
If we used 10% less inline functions in useless occasions,
[wxWidgets.git] / include / wx / defs.h
index 921b1b7a14072d21d9337c1fe96fc40f75890007..4d44264966fe9449cd999d859eee237f0d856ee3 100644 (file)
@@ -297,9 +297,40 @@ typedef int wxWindowID;
     #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__)
 
@@ -465,7 +496,8 @@ enum
   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
 };
 
 // ----------------------------------------------------------------------------
@@ -810,6 +842,7 @@ enum wxStretch
 // and Win32 and is silently ignored under all other platforms
 #define wxTE_RICH           0x0080
 #define wxTE_NO_VSCROLL     0x0100
+#define wxTE_AUTO_SCROLL    0x0200
 
 /*
  * wxComboBox style flags
@@ -947,6 +980,9 @@ enum wxStretch
  * wxNotebook flags
  */
 #define wxNB_FIXEDWIDTH       0x0008
+#define wxNB_LEFT             0x0020
+#define wxNB_RIGHT            0x0040
+#define wxNB_BOTTOM           0x0080
 
 /*
  * wxStatusBar95 flags
@@ -1468,8 +1504,15 @@ typedef unsigned long   WXHDC;
 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;