]> git.saurik.com Git - wxWidgets.git/commitdiff
WINE is so fine.
authorRobert Roebling <robert@roebling.de>
Wed, 9 Jun 1999 00:32:07 +0000 (00:32 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 9 Jun 1999 00:32:07 +0000 (00:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

17 files changed:
include/wx/defs.h
include/wx/msw/private.h
include/wx/msw/textctrl.h
src/common/file.cpp
src/generic/prop.cpp
src/generic/propform.cpp
src/generic/proplist.cpp
src/msw/Makefile.am
src/msw/accel.cpp
src/msw/cursor.cpp
src/msw/filedlg.cpp
src/msw/listbox.cpp
src/msw/listctrl.cpp
src/msw/palette.cpp
src/msw/textctrl.cpp
src/msw/utils.cpp
src/msw/utilsexc.cpp

index 0f823ffd1143d432a397f6b82a4b8ded11cc5eea..2df71e010d72626b72188120e2daf230c63173e3 100644 (file)
 #define __WIN32__
 #endif
 
+#ifdef __WXWINE__
+  #ifndef __WIN32__
+    #define __WIN32__
+  #endif
+  #ifndef __WIN95__
+    #define __WIN95__
+  #endif
+  #ifndef STRICT
+    #define STRICT
+  #endif
+#endif
+
 #ifndef __WIN32__
 #define __WIN16__
 #endif
@@ -1286,7 +1298,7 @@ typedef void *          WXDRAWITEMSTRUCT;
 typedef void *          WXMEASUREITEMSTRUCT;
 typedef void *          WXLPCREATESTRUCT;
 
-#ifdef __GNUWIN32__
+#if defined(__GNUWIN32__) || defined(__WXWINE__)
     typedef int (*WXFARPROC)();
 #elif defined(__WIN32__)
     typedef int (__stdcall *WXFARPROC)();
index ff8642533c7efb5b32d9aa840996575565016308..7e46709d654b86166f326791c23848a4f548bd52 100644 (file)
@@ -50,19 +50,6 @@ WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDIPARENTFRAME_ICON;
 WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON;
 WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT;
 
-// ---------------------------------------------------------------------------
-// WINE implements the Win32 API
-// ---------------------------------------------------------------------------
-
-#ifdef __WXWINE__
-  #ifndef __WIN32__
-    #define __WIN32__
-  #endif
-  #ifndef STRICT
-    #define STRICT
-  #endif
-#endif
-
 // ---------------------------------------------------------------------------
 // this defines a CASTWNDPROC macro which casts a pointer to the type of a
 // window proc
index 2ca8490c14eb1241de508648edbd4842c6202147..46f240ad9157480147423a0a9b6f8f40ed0142ba 100644 (file)
@@ -25,7 +25,7 @@
     #include <iostream>
 #endif
 
-#if defined(__WIN95__) && !defined(__TWIN32__)
+#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__WXWINE__)
     #define wxUSE_RICHEDIT 1
 #else
     #define wxUSE_RICHEDIT 0
index 3cd684587a044788484f9ef89e25784831ef4d78..9c207aacf20621d469c1b7583d6468c711072360 100644 (file)
@@ -27,7 +27,7 @@
 #endif
 
 // standard
-#if   defined(__WXMSW__) && !defined(__GNUWIN32__)
+#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
   #include  <io.h>
 
 #ifndef __SALFORDC__
index 058a0d5026f94f8293bcd22f2724e749ac499f81..6fa86ca2b1fdd7dfe2dbf7882f5e876d131f7ef6 100644 (file)
@@ -30,7 +30,7 @@
 #include <string.h>
 
 #if wxUSE_IOSTREAMH
-#if defined(__WXMSW__) && !defined(__GNUWIN32__)
+#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
 #include <strstrea.h>
 #else
 #include <strstream.h>
index 2a115e5c57800918ec82988d53d05052fc86b48d..bda34bb83ade931e08794484154befc9e79d5019 100644 (file)
@@ -30,7 +30,7 @@
 #include <string.h>
 
 #if wxUSE_IOSTREAMH
-#if defined(__WXMSW__) && !defined(__GNUWIN32__)
+#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
 #include <strstrea.h>
 #else
 #include <strstream.h>
index 6d0d1c2b6882b74cea46ee499879f703c030377e..c57146848201c2ff14862583549a8a5ed475c20b 100644 (file)
@@ -30,7 +30,7 @@
 #include <string.h>
 
 #if wxUSE_IOSTREAMH
-#if defined(__WXMSW__) && !defined(__GNUWIN32__)
+#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
 #include <strstrea.h>
 #else
 #include <strstream.h>
index e072cbabb4bf8cd9b9f2467a221fd97e414bcb8c..e8295c02f76bc6c179a3739b1406cf53c36d5b07 100644 (file)
@@ -38,7 +38,73 @@ libwx_msw_la_SOURCES = \
  variant.cpp \
  wxchar.cpp \
 \
+ config.cpp \
+ date.cpp \
+ datstrm.cpp \
+ dcbase.cpp \
+ docmdi.cpp \
+ docview.cpp \
+ dynlib.cpp \
+ event.cpp \
+ file.cpp \
+ fileconf.cpp \
+ framecmn.cpp \
+ ftp.cpp \
+ gdicmn.cpp \
+ helpbase.cpp \
+ http.cpp \
+ image.cpp \
+ imaggif.cpp \
+ imagjpeg.cpp \
+ imagpng.cpp \
+ intl.cpp \
+ ipcbase.cpp \
+ layout.cpp \
+ log.cpp \
+ longlong.cpp \
+ mimetype.cpp \
+ mstream.cpp \
+ objstrm.cpp \
+ paper.cpp \
+ prntbase.cpp \
+ process.cpp \
+ protocol.cpp \
+ resource.cpp \
+ sckaddr.cpp \
+ sckfile.cpp \
+ sckint.cpp \
+ sckipc.cpp \
+ sckstrm.cpp \
+ serbase.cpp \
+ socket.cpp \
+ stream.cpp \
+ tbarbase.cpp \
+ tbarsmpl.cpp \
+ textfile.cpp \
+ time.cpp \
+ url.cpp \
+ validate.cpp \
+ valtext.cpp \
+ wfstream.cpp \
  wincmn.cpp \
+ wxexpr.cpp \
+ zstream.cpp \
+\
+ choicdgg.cpp \
+ gridg.cpp \
+ laywin.cpp \
+ panelg.cpp \
+ printps.cpp \
+ progdlgg.cpp \
+ prop.cpp \
+ propform.cpp \
+ proplist.cpp \
+ sashwin.cpp \
+ scrolwin.cpp \
+ splitter.cpp \
+ statusbr.cpp \
+ tabg.cpp \
+ textdlgg.cpp \
 \
  accel.cpp \
  app.cpp \
@@ -48,7 +114,6 @@ libwx_msw_la_SOURCES = \
  button.cpp \
  caret.cpp \
  checkbox.cpp \
- checklst.cpp \
  choice.cpp \
  clipbrd.cpp \
  colour.cpp \
@@ -66,17 +131,17 @@ libwx_msw_la_SOURCES = \
  filedlg.cpp \
  font.cpp \
  frame.cpp \
- gaugemsw.cpp \
+ gauge95.cpp \
  gdiobj.cpp \
  icon.cpp \
  imaglist.cpp \
  listbox.cpp \
- listctrlc.cpp \
  main.cpp \
  mdi.cpp \
  menu.cpp \
  menuitem.cpp \
  minifram.cpp \
+ msgdlg.cpp \
  notebook.cpp \
  ownerdrw.cpp \
  palette.cpp \
@@ -88,17 +153,16 @@ libwx_msw_la_SOURCES = \
  registry.cpp \
  scrolbar.cpp \
  settings.cpp \
- slidermsw.cpp \
+ slider95.cpp \
  spinbutt.cpp \
  statbmp.cpp \
  statbox.cpp \
  stattext.cpp \
- tbarmsw.cpp \
+ tbar95.cpp \
  textctrl.cpp \
  thread.cpp \
  timer.cpp \
  tooltip.cpp \
- treectrl.cpp \
  utils.cpp \
  utilsexc.cpp \
  wave.cpp \
index ea4c2d1f20f63716e75a5ddaa84577693180a617..f82e7b7d107c6a862be3150d69c96b09133a6670 100644 (file)
@@ -98,7 +98,7 @@ wxAcceleratorTable::wxAcceleratorTable(const wxString& resource)
 extern int wxCharCodeWXToMSW(int id, bool *isVirtual);
 
 // Create from an array
-#if !defined(__WIN16__) && !defined(__TWIN32__)
+#if !defined(__WIN16__) && !defined(__TWIN32__) && !defined(__WXWINE__)
 wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
 {
     // Not available in WIN16
index 8886f56b8c50e56ee021f1348a0d0680ef82c5b3..d3e67418a98a7ec8c54e8f93aa594c9a01a46658 100644 (file)
@@ -54,7 +54,11 @@ wxCursorRefData::wxCursorRefData(void)
 wxCursorRefData::~wxCursorRefData(void)
 {
     if ( m_hCursor && m_destroyCursor)
+#ifdef __WXWINE__
+        ::DestroyCursor((HCURSOR) m_hCursor);
+#else
         ::DestroyCursor((HICON) m_hCursor);
+#endif
 }
 
 // Cursors
index cf53ed815946e491164b84f58891181f5c93dfaf..1aeb326354a93c6fa257ea581d5f1c3a892ed6d9 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <windows.h>
 
-#if !defined(__WIN32__) || defined(__SALFORDC__)
+#if !defined(__WIN32__) || defined(__SALFORDC__) || defined(__WXWINE__)
     #include <commdlg.h>
 #endif
 
index b7cf16551aaee3ed605dc6733ebf6170a8dd728b..0b4862cb0e7ada64a477250bbff1646ae42cdaf7 100644 (file)
@@ -20,7 +20,6 @@
     #pragma hdrstop
 #endif
 
-#include <windowsx.h>
 #include "wx/window.h"
 #include "wx/msw/private.h"
 
 #include "wx/dc.h"
 #endif
 
+#include <windowsx.h>
+
+#ifdef __WXWINE__
+  #if defined(GetWindowStyle)
+    #undef GetWindowStyle
+  #endif
+#endif
+
 #include "wx/dynarray.h"
 #include "wx/log.h"
 
 #endif
 
 #ifndef __TWIN32__
-    #ifdef __GNUWIN32__
+    #if defined(__GNUWIN32__)
         #include <wx/msw/gnuwin32/extra.h>
     #endif
 #endif
 
+#ifdef __WXWINE__
+  #ifndef ListBox_SetItemData
+    #define ListBox_SetItemData(hwndCtl, index, data) \
+      ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data)))
+  #endif
+  #ifndef ListBox_GetHorizontalExtent
+    #define ListBox_GetHorizontalExtent(hwndCtl) \
+      ((int)(DWORD)SendMessage((hwndCtl), LB_GETHORIZONTALEXTENT, 0L, 0L))
+  #endif
+  #ifndef ListBox_GetSelCount
+    #define ListBox_GetSelCount(hwndCtl) \
+      ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELCOUNT, 0L, 0L))
+  #endif
+  #ifndef ListBox_GetSelItems
+    #define ListBox_GetSelItems(hwndCtl, cItems, lpItems) \
+      ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELITEMS, (WPARAM)(int)(cItems), (LPARAM)(int *)(lpItems)))
+  #endif
+  #ifndef ListBox_GetTextLen
+    #define ListBox_GetTextLen(hwndCtl, index) \
+      ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXTLEN, (WPARAM)(int)(index), 0L))
+  #endif
+  #ifndef ListBox_GetText
+    #define ListBox_GetText(hwndCtl, index, lpszBuffer) \
+      ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXT, (WPARAM)(int)(index), (LPARAM)(LPCTSTR)(lpszBuffer)))
+  #endif
+#endif
 
 #if !USE_SHARED_LIBRARY
     IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
index a39a97debf29644a3c9979ac3add17b36ce605ba..242f9dfab92759ca2b2e157e604609a2725b36b8 100644 (file)
@@ -666,7 +666,11 @@ bool wxListCtrl::GetItemRect(long item, wxRect& rect, int code) const
     else if ( code == wxLIST_RECT_LABEL )
         code2 = LVIR_LABEL;
 
+#ifdef __WXWINE__
+    bool success = (ListView_GetItemRect((HWND) GetHWND(), (int) item, &rect2 ) != 0);
+#else
     bool success = (ListView_GetItemRect((HWND) GetHWND(), (int) item, &rect2, code2) != 0);
+#endif
 
     rect.x = rect2.left;
     rect.y = rect2.top;
index 5da71182f1652fe176477d9ed4c2981811fe644a..77569777f75801c880467ef20d07c0739567a13a 100644 (file)
@@ -77,6 +77,12 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
 {
   UnRef();
 
+#ifdef __WXWINE__
+
+  return (FALSE);
+  
+#else
+
   m_refData = new wxPaletteRefData;
 
   NPLOGPALETTE npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, sizeof(LOGPALETTE) +
@@ -98,6 +104,8 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
   M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal);
   LocalFree((HANDLE)npPal);
   return TRUE;
+  
+#endif
 }
 
 int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
index e2d8369a0406175a384cb579fef2c407be43750e..f6a224a163ad7f56f543d9828a5e3494e7ab696f 100644 (file)
@@ -1189,7 +1189,11 @@ void wxTextCtrl::AdjustSpaceLimit()
     {
         limit = len + 0x8000;    // 32Kb
 
+#if wxUSE_RICHEDIT
         if ( m_isRich || limit > 0xffff )
+#else
+        if ( limit > 0xffff )
+#endif
             ::SendMessage(GetHwnd(), EM_LIMITTEXT, 0, limit);
         else
             ::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0);
index 52a8f79891d1ae004e3db8d1f99d54cc94fa1000..f41729be610f426be21da2d53bd3602c487275c8 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <ctype.h>
 
-#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
+#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
 #include <direct.h>
 
 #ifndef __MWERKS__
@@ -56,7 +56,7 @@
 #include <dir.h>
 #endif
 
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXWINE__)
 #include <io.h>
 
 #ifndef __GNUWIN32__
index e54f9811fee9058733ec96804fabcb3b5b4829f4..bcb9faf6a3958becb4ffa2bf0910876f52b3f6a4 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <ctype.h>
 
-#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
+#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
 #include <direct.h>
 #ifndef __MWERKS__
 #include <dos.h>
@@ -50,7 +50,7 @@
 #endif
 #endif
 
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXWINE__)
 #include <io.h>
 
 #ifndef __GNUWIN32__