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:
@@ -124,6 +124,18 @@
|
|||||||
#define __WIN32__
|
#define __WIN32__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
#ifndef __WIN32__
|
||||||
|
#define __WIN32__
|
||||||
|
#endif
|
||||||
|
#ifndef __WIN95__
|
||||||
|
#define __WIN95__
|
||||||
|
#endif
|
||||||
|
#ifndef STRICT
|
||||||
|
#define STRICT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __WIN32__
|
#ifndef __WIN32__
|
||||||
#define __WIN16__
|
#define __WIN16__
|
||||||
#endif
|
#endif
|
||||||
@@ -1286,7 +1298,7 @@ typedef void * WXDRAWITEMSTRUCT;
|
|||||||
typedef void * WXMEASUREITEMSTRUCT;
|
typedef void * WXMEASUREITEMSTRUCT;
|
||||||
typedef void * WXLPCREATESTRUCT;
|
typedef void * WXLPCREATESTRUCT;
|
||||||
|
|
||||||
#ifdef __GNUWIN32__
|
#if defined(__GNUWIN32__) || defined(__WXWINE__)
|
||||||
typedef int (*WXFARPROC)();
|
typedef int (*WXFARPROC)();
|
||||||
#elif defined(__WIN32__)
|
#elif defined(__WIN32__)
|
||||||
typedef int (__stdcall *WXFARPROC)();
|
typedef int (__stdcall *WXFARPROC)();
|
||||||
|
@@ -50,19 +50,6 @@ WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDIPARENTFRAME_ICON;
|
|||||||
WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON;
|
WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON;
|
||||||
WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT;
|
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
|
// this defines a CASTWNDPROC macro which casts a pointer to the type of a
|
||||||
// window proc
|
// window proc
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__WIN95__) && !defined(__TWIN32__)
|
#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__WXWINE__)
|
||||||
#define wxUSE_RICHEDIT 1
|
#define wxUSE_RICHEDIT 1
|
||||||
#else
|
#else
|
||||||
#define wxUSE_RICHEDIT 0
|
#define wxUSE_RICHEDIT 0
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// standard
|
// standard
|
||||||
#if defined(__WXMSW__) && !defined(__GNUWIN32__)
|
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
|
||||||
#ifndef __SALFORDC__
|
#ifndef __SALFORDC__
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
#if defined(__WXMSW__) && !defined(__GNUWIN32__)
|
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
|
||||||
#include <strstrea.h>
|
#include <strstrea.h>
|
||||||
#else
|
#else
|
||||||
#include <strstream.h>
|
#include <strstream.h>
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
#if defined(__WXMSW__) && !defined(__GNUWIN32__)
|
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
|
||||||
#include <strstrea.h>
|
#include <strstrea.h>
|
||||||
#else
|
#else
|
||||||
#include <strstream.h>
|
#include <strstream.h>
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
#if defined(__WXMSW__) && !defined(__GNUWIN32__)
|
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
|
||||||
#include <strstrea.h>
|
#include <strstrea.h>
|
||||||
#else
|
#else
|
||||||
#include <strstream.h>
|
#include <strstream.h>
|
||||||
|
@@ -38,7 +38,73 @@ libwx_msw_la_SOURCES = \
|
|||||||
variant.cpp \
|
variant.cpp \
|
||||||
wxchar.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 \
|
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 \
|
accel.cpp \
|
||||||
app.cpp \
|
app.cpp \
|
||||||
@@ -48,7 +114,6 @@ libwx_msw_la_SOURCES = \
|
|||||||
button.cpp \
|
button.cpp \
|
||||||
caret.cpp \
|
caret.cpp \
|
||||||
checkbox.cpp \
|
checkbox.cpp \
|
||||||
checklst.cpp \
|
|
||||||
choice.cpp \
|
choice.cpp \
|
||||||
clipbrd.cpp \
|
clipbrd.cpp \
|
||||||
colour.cpp \
|
colour.cpp \
|
||||||
@@ -66,17 +131,17 @@ libwx_msw_la_SOURCES = \
|
|||||||
filedlg.cpp \
|
filedlg.cpp \
|
||||||
font.cpp \
|
font.cpp \
|
||||||
frame.cpp \
|
frame.cpp \
|
||||||
gaugemsw.cpp \
|
gauge95.cpp \
|
||||||
gdiobj.cpp \
|
gdiobj.cpp \
|
||||||
icon.cpp \
|
icon.cpp \
|
||||||
imaglist.cpp \
|
imaglist.cpp \
|
||||||
listbox.cpp \
|
listbox.cpp \
|
||||||
listctrlc.cpp \
|
|
||||||
main.cpp \
|
main.cpp \
|
||||||
mdi.cpp \
|
mdi.cpp \
|
||||||
menu.cpp \
|
menu.cpp \
|
||||||
menuitem.cpp \
|
menuitem.cpp \
|
||||||
minifram.cpp \
|
minifram.cpp \
|
||||||
|
msgdlg.cpp \
|
||||||
notebook.cpp \
|
notebook.cpp \
|
||||||
ownerdrw.cpp \
|
ownerdrw.cpp \
|
||||||
palette.cpp \
|
palette.cpp \
|
||||||
@@ -88,17 +153,16 @@ libwx_msw_la_SOURCES = \
|
|||||||
registry.cpp \
|
registry.cpp \
|
||||||
scrolbar.cpp \
|
scrolbar.cpp \
|
||||||
settings.cpp \
|
settings.cpp \
|
||||||
slidermsw.cpp \
|
slider95.cpp \
|
||||||
spinbutt.cpp \
|
spinbutt.cpp \
|
||||||
statbmp.cpp \
|
statbmp.cpp \
|
||||||
statbox.cpp \
|
statbox.cpp \
|
||||||
stattext.cpp \
|
stattext.cpp \
|
||||||
tbarmsw.cpp \
|
tbar95.cpp \
|
||||||
textctrl.cpp \
|
textctrl.cpp \
|
||||||
thread.cpp \
|
thread.cpp \
|
||||||
timer.cpp \
|
timer.cpp \
|
||||||
tooltip.cpp \
|
tooltip.cpp \
|
||||||
treectrl.cpp \
|
|
||||||
utils.cpp \
|
utils.cpp \
|
||||||
utilsexc.cpp \
|
utilsexc.cpp \
|
||||||
wave.cpp \
|
wave.cpp \
|
||||||
|
@@ -98,7 +98,7 @@ wxAcceleratorTable::wxAcceleratorTable(const wxString& resource)
|
|||||||
extern int wxCharCodeWXToMSW(int id, bool *isVirtual);
|
extern int wxCharCodeWXToMSW(int id, bool *isVirtual);
|
||||||
|
|
||||||
// Create from an array
|
// Create from an array
|
||||||
#if !defined(__WIN16__) && !defined(__TWIN32__)
|
#if !defined(__WIN16__) && !defined(__TWIN32__) && !defined(__WXWINE__)
|
||||||
wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
|
wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
|
||||||
{
|
{
|
||||||
// Not available in WIN16
|
// Not available in WIN16
|
||||||
|
@@ -54,7 +54,11 @@ wxCursorRefData::wxCursorRefData(void)
|
|||||||
wxCursorRefData::~wxCursorRefData(void)
|
wxCursorRefData::~wxCursorRefData(void)
|
||||||
{
|
{
|
||||||
if ( m_hCursor && m_destroyCursor)
|
if ( m_hCursor && m_destroyCursor)
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
::DestroyCursor((HCURSOR) m_hCursor);
|
||||||
|
#else
|
||||||
::DestroyCursor((HICON) m_hCursor);
|
::DestroyCursor((HICON) m_hCursor);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cursors
|
// Cursors
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#if !defined(__WIN32__) || defined(__SALFORDC__)
|
#if !defined(__WIN32__) || defined(__SALFORDC__) || defined(__WXWINE__)
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <windowsx.h>
|
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
|
|
||||||
@@ -32,6 +31,14 @@
|
|||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <windowsx.h>
|
||||||
|
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
#if defined(GetWindowStyle)
|
||||||
|
#undef GetWindowStyle
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/dynarray.h"
|
#include "wx/dynarray.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
|
||||||
@@ -40,11 +47,37 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __TWIN32__
|
#ifndef __TWIN32__
|
||||||
#ifdef __GNUWIN32__
|
#if defined(__GNUWIN32__)
|
||||||
#include <wx/msw/gnuwin32/extra.h>
|
#include <wx/msw/gnuwin32/extra.h>
|
||||||
#endif
|
#endif
|
||||||
#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
|
#if !USE_SHARED_LIBRARY
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
|
||||||
|
@@ -666,7 +666,11 @@ bool wxListCtrl::GetItemRect(long item, wxRect& rect, int code) const
|
|||||||
else if ( code == wxLIST_RECT_LABEL )
|
else if ( code == wxLIST_RECT_LABEL )
|
||||||
code2 = LVIR_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);
|
bool success = (ListView_GetItemRect((HWND) GetHWND(), (int) item, &rect2, code2) != 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
rect.x = rect2.left;
|
rect.x = rect2.left;
|
||||||
rect.y = rect2.top;
|
rect.y = rect2.top;
|
||||||
|
@@ -77,6 +77,12 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
|
|||||||
{
|
{
|
||||||
UnRef();
|
UnRef();
|
||||||
|
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
|
||||||
|
return (FALSE);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
m_refData = new wxPaletteRefData;
|
m_refData = new wxPaletteRefData;
|
||||||
|
|
||||||
NPLOGPALETTE npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, sizeof(LOGPALETTE) +
|
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);
|
M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal);
|
||||||
LocalFree((HANDLE)npPal);
|
LocalFree((HANDLE)npPal);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
||||||
|
@@ -1189,7 +1189,11 @@ void wxTextCtrl::AdjustSpaceLimit()
|
|||||||
{
|
{
|
||||||
limit = len + 0x8000; // 32Kb
|
limit = len + 0x8000; // 32Kb
|
||||||
|
|
||||||
|
#if wxUSE_RICHEDIT
|
||||||
if ( m_isRich || limit > 0xffff )
|
if ( m_isRich || limit > 0xffff )
|
||||||
|
#else
|
||||||
|
if ( limit > 0xffff )
|
||||||
|
#endif
|
||||||
::SendMessage(GetHwnd(), EM_LIMITTEXT, 0, limit);
|
::SendMessage(GetHwnd(), EM_LIMITTEXT, 0, limit);
|
||||||
else
|
else
|
||||||
::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0);
|
::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0);
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
|
#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
|
||||||
#ifndef __MWERKS__
|
#ifndef __MWERKS__
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
#include <dir.h>
|
#include <dir.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#if defined(__WIN32__) && !defined(__WXWINE__)
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
|
||||||
#ifndef __GNUWIN32__
|
#ifndef __GNUWIN32__
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
|
#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#ifndef __MWERKS__
|
#ifndef __MWERKS__
|
||||||
#include <dos.h>
|
#include <dos.h>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#if defined(__WIN32__) && !defined(__WXWINE__)
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
|
||||||
#ifndef __GNUWIN32__
|
#ifndef __GNUWIN32__
|
||||||
|
Reference in New Issue
Block a user