WINE is so fine.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 1999-06-09 00:32:07 +00:00
parent 96eb3b1a82
commit 5ea105e0ba
17 changed files with 149 additions and 33 deletions

View File

@ -124,6 +124,18 @@
#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)();

View 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

View 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

View File

@ -27,7 +27,7 @@
#endif
// standard
#if defined(__WXMSW__) && !defined(__GNUWIN32__)
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
#include <io.h>
#ifndef __SALFORDC__

View 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>

View 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>

View 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>

View 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 \

View 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

View 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

View File

@ -32,7 +32,7 @@
#include <windows.h>
#if !defined(__WIN32__) || defined(__SALFORDC__)
#if !defined(__WIN32__) || defined(__SALFORDC__) || defined(__WXWINE__)
#include <commdlg.h>
#endif

View File

@ -20,7 +20,6 @@
#pragma hdrstop
#endif
#include <windowsx.h>
#include "wx/window.h"
#include "wx/msw/private.h"
@ -32,6 +31,14 @@
#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"
@ -40,11 +47,37 @@
#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)

View 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;

View 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

View 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);

View 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__

View 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__