]> git.saurik.com Git - wxWidgets.git/commitdiff
Hacks for wine.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Mon, 4 Sep 2006 16:36:47 +0000 (16:36 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Mon, 4 Sep 2006 16:36:47 +0000 (16:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/missing.h
src/msw/display.cpp
src/msw/ole/dataobj.cpp
src/msw/window.cpp

index 03480037f436c8c41a2a8e665e69cf41460d2e6d..3c3218ae2a85a159dfec22093b1f86d8d785a6c8 100644 (file)
@@ -418,5 +418,18 @@ typedef struct _OSVERSIONINFOEX {
     #include "wx/msw/wince/missing.h"
 #endif
 
+ /*
+  * The following are specifically required for Wine
+  */
+
+#ifdef __WINE__
+    #ifndef ENUM_CURRENT_SETTINGS
+        #define ENUM_CURRENT_SETTINGS   ((DWORD)-1)
+    #endif
+    #ifndef BROADCAST_QUERY_DENY
+        #define BROADCAST_QUERY_DENY    1112363332
+    #endif
+#endif  // defined __WINE__
+
 #endif
     // _WX_MISSING_H_
index 9266bf1b7303370b9274ecc3e649374560e59650..3a0844c3cec678ba3fa7bb6b630d249d2c78c479 100644 (file)
@@ -33,6 +33,8 @@
     #include "wx/frame.h"
 #endif
 
+#include "wx/msw/missing.h"
+
 #include "wx/dynload.h"
 #include "wx/sysopt.h"
 
index 70667b9e07b11a79981fcf01e9c246f0cae8d85e..50eea047b9c0977927428151142bdae956873f66 100644 (file)
@@ -686,7 +686,10 @@ size_t wxDataObject::GetBufferOffset(const wxDataFormat& format )
 const void* wxDataObject::GetSizeFromBuffer( const void* buffer, size_t* size,
                                                const wxDataFormat& format )
 {
-    size_t realsz = ::HeapSize(::GetProcessHeap(), 0, buffer);
+    // hack: the third parameter is declared non-const in Wine's headers so
+    // cast away the const
+    size_t realsz = ::HeapSize(::GetProcessHeap(), 0,
+                               wx_const_cast(void*, buffer));
     if ( realsz == (size_t)-1 )
     {
         // note that HeapSize() does not set last error
index 1a4014b4204efa165a3365a6950354619623f5dd..a4b92b3fc1701b7baaeb902df8110208e4fa7072 100644 (file)
 // include <commctrl.h> "properly"
 #include "wx/msw/wrapcctl.h"
 
-#ifndef __WXWINCE__
+#if !defined __WXWINCE__ && !defined __WINE__
     #include <pbt.h>
 #endif