]> 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 49b118741002558895edd21ecb0e0eb695abbb67..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
 };
 
 // ----------------------------------------------------------------------------
@@ -809,6 +841,8 @@ enum wxStretch
 // this style means to use RICHEDIT control and does something only under wxMSW
 // 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
@@ -840,7 +874,7 @@ enum wxStretch
 #define wxGA_HORIZONTAL      wxHORIZONTAL
 #define wxGA_VERTICAL        wxVERTICAL
 // Windows only
-#define wxGA_SMOOTH          0x0008
+#define wxGA_SMOOTH          0x0010
 
 /*
  * wxSlider flags
@@ -946,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
@@ -1065,6 +1102,8 @@ enum wxStretch
 #define wxID_SETUP              5110
 #define wxID_RESET              5111
 
+// IDs used by generic file dialog (11 consecutive starting from this value)
+#define wxID_FILEDLGG           5900
 #define wxID_HIGHEST            5999
 
 // ----------------------------------------------------------------------------
@@ -1465,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;