Chianti, Pinot noir, WINE..
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,8 +15,10 @@
|
|||||||
/* wxWindows version (not used but required by autoheader) */
|
/* wxWindows version (not used but required by autoheader) */
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
#if 0
|
||||||
#undef PACKAGE
|
#undef PACKAGE
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
#endif
|
||||||
|
|
||||||
/* needed for older automake? */
|
/* needed for older automake? */
|
||||||
#undef WITH_SYMBOL_UNDERSCORE
|
#undef WITH_SYMBOL_UNDERSCORE
|
||||||
|
@@ -50,10 +50,24 @@ 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
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(__GNUWIN32__) && !defined(__MINGW32__)
|
#if defined(__GNUWIN32__) && !defined(__MINGW32__)
|
||||||
# define CASTWNDPROC (long unsigned)
|
# define CASTWNDPROC (long unsigned)
|
||||||
#else
|
#else
|
||||||
|
@@ -161,6 +161,11 @@
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// For WINE
|
||||||
|
|
||||||
|
#if defined(GetWindowStyle) || defined(__WXWINE__)
|
||||||
|
#undef GetWindowStyle
|
||||||
|
#endif
|
||||||
|
|
||||||
// For ming and cygwin
|
// For ming and cygwin
|
||||||
|
|
||||||
|
@@ -61,6 +61,11 @@
|
|||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
#endif // Win16
|
#endif // Win16
|
||||||
|
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
#include <cderr.h>
|
||||||
|
#include <commdlg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__WATCOMC__) || defined(__SC__) || defined(__SALFORDC__)
|
#if defined(__WATCOMC__) || defined(__SC__) || defined(__SALFORDC__)
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
@@ -319,7 +324,9 @@ void wxPrintData::ConvertToNative()
|
|||||||
|
|
||||||
//// Orientation
|
//// Orientation
|
||||||
|
|
||||||
|
#ifndef __WXWINE__
|
||||||
devMode->dmOrientation = m_printOrientation;
|
devMode->dmOrientation = m_printOrientation;
|
||||||
|
#endif
|
||||||
devMode->dmFields = DM_ORIENTATION;
|
devMode->dmFields = DM_ORIENTATION;
|
||||||
|
|
||||||
//// Collation
|
//// Collation
|
||||||
@@ -353,6 +360,7 @@ void wxPrintData::ConvertToNative()
|
|||||||
|
|
||||||
devMode->dmFields |= DM_COLOR;
|
devMode->dmFields |= DM_COLOR;
|
||||||
|
|
||||||
|
#ifndef __WXWINE__
|
||||||
//// Paper size
|
//// Paper size
|
||||||
|
|
||||||
if (m_paperId == wxPAPER_NONE)
|
if (m_paperId == wxPAPER_NONE)
|
||||||
@@ -374,6 +382,7 @@ void wxPrintData::ConvertToNative()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//// Duplex
|
//// Duplex
|
||||||
|
|
||||||
@@ -433,10 +442,12 @@ void wxPrintData::ConvertFromNative()
|
|||||||
{
|
{
|
||||||
DEVMODE *devMode = (DEVMODE*) GlobalLock(hDevMode);
|
DEVMODE *devMode = (DEVMODE*) GlobalLock(hDevMode);
|
||||||
|
|
||||||
|
#ifndef __WXWINE__
|
||||||
//// Orientation
|
//// Orientation
|
||||||
|
|
||||||
if (devMode->dmFields & DM_ORIENTATION)
|
if (devMode->dmFields & DM_ORIENTATION)
|
||||||
m_printOrientation = devMode->dmOrientation;
|
m_printOrientation = devMode->dmOrientation;
|
||||||
|
#endif
|
||||||
|
|
||||||
//// Collation
|
//// Collation
|
||||||
|
|
||||||
@@ -484,6 +495,7 @@ void wxPrintData::ConvertFromNative()
|
|||||||
else
|
else
|
||||||
m_colour = TRUE;
|
m_colour = TRUE;
|
||||||
|
|
||||||
|
#ifndef __WXWINE__
|
||||||
//// Paper size
|
//// Paper size
|
||||||
|
|
||||||
if (devMode->dmFields & DM_PAPERSIZE)
|
if (devMode->dmFields & DM_PAPERSIZE)
|
||||||
@@ -532,7 +544,7 @@ void wxPrintData::ConvertFromNative()
|
|||||||
m_paperSize.y = 0;
|
m_paperSize.y = 0;
|
||||||
m_paperId = wxPAPER_NONE;
|
m_paperId = wxPAPER_NONE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//// Duplex
|
//// Duplex
|
||||||
|
|
||||||
|
@@ -994,7 +994,7 @@ bool wxMkdir(const wxString& dir, int perm)
|
|||||||
|
|
||||||
// assume mkdir() has 2 args on non Windows platforms and on Windows too
|
// assume mkdir() has 2 args on non Windows platforms and on Windows too
|
||||||
// for the GNU compiler
|
// for the GNU compiler
|
||||||
#if !defined(__WXMSW__) || (defined(__GNUWIN32__) && !defined(__MINGW32__))
|
#if !defined(__WXMSW__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__)
|
||||||
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
|
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
|
||||||
#else // MSW
|
#else // MSW
|
||||||
if ( mkdir(wxFNCONV(dirname)) != 0 )
|
if ( mkdir(wxFNCONV(dirname)) != 0 )
|
||||||
|
@@ -22,10 +22,86 @@ libwx_msw_la_SOURCES = \
|
|||||||
extended.c \
|
extended.c \
|
||||||
parser.c \
|
parser.c \
|
||||||
\
|
\
|
||||||
|
cmndata.cpp \
|
||||||
|
dynarray.cpp \
|
||||||
|
filefn.cpp \
|
||||||
|
hash.cpp \
|
||||||
list.cpp \
|
list.cpp \
|
||||||
|
matrix.cpp \
|
||||||
|
memory.cpp \
|
||||||
|
module.cpp \
|
||||||
object.cpp \
|
object.cpp \
|
||||||
|
string.cpp \
|
||||||
|
timercmn.cpp \
|
||||||
|
utilscmn.cpp \
|
||||||
|
tokenzr.cpp \
|
||||||
|
variant.cpp \
|
||||||
|
wxchar.cpp \
|
||||||
\
|
\
|
||||||
wincmn.cpp \
|
wincmn.cpp \
|
||||||
|
\
|
||||||
|
accel.cpp \
|
||||||
|
app.cpp \
|
||||||
|
bitmap.cpp \
|
||||||
|
bmpbuttn.cpp \
|
||||||
|
brush.cpp \
|
||||||
|
button.cpp \
|
||||||
|
caret.cpp \
|
||||||
|
checkbox.cpp \
|
||||||
|
checklst.cpp \
|
||||||
|
choice.cpp \
|
||||||
|
clipbrd.cpp \
|
||||||
|
colour.cpp \
|
||||||
|
combobox.cpp \
|
||||||
|
control.cpp \
|
||||||
|
cursor.cpp \
|
||||||
|
data.cpp \
|
||||||
|
dc.cpp \
|
||||||
|
dcclient.cpp \
|
||||||
|
dcmemory.cpp \
|
||||||
|
dcscreen.cpp \
|
||||||
|
dcprint.cpp \
|
||||||
|
dialog.cpp \
|
||||||
|
dirdlg \
|
||||||
|
filedlg.cpp \
|
||||||
|
font.cpp \
|
||||||
|
frame.cpp \
|
||||||
|
gaugemsw.cpp \
|
||||||
|
gdiobj.cpp \
|
||||||
|
icon.cpp \
|
||||||
|
imaglist.cpp \
|
||||||
|
listbox.cpp \
|
||||||
|
listctrlc.cpp \
|
||||||
|
main.cpp \
|
||||||
|
mdi.cpp \
|
||||||
|
menu.cpp \
|
||||||
|
menuitem.cpp \
|
||||||
|
minifram.cpp \
|
||||||
|
notebook.cpp \
|
||||||
|
ownerdrw.cpp \
|
||||||
|
palette.cpp \
|
||||||
|
pen.cpp \
|
||||||
|
radiobox.cpp \
|
||||||
|
radiobut.cpp \
|
||||||
|
regconf.cpp \
|
||||||
|
region.cpp \
|
||||||
|
registry.cpp \
|
||||||
|
scrolbar.cpp \
|
||||||
|
settings.cpp \
|
||||||
|
slidermsw.cpp \
|
||||||
|
spinbutt.cpp \
|
||||||
|
statbmp.cpp \
|
||||||
|
statbox.cpp \
|
||||||
|
stattext.cpp \
|
||||||
|
tbarmsw.cpp \
|
||||||
|
textctrl.cpp \
|
||||||
|
thread.cpp \
|
||||||
|
timer.cpp \
|
||||||
|
tooltip.cpp \
|
||||||
|
treectrl.cpp \
|
||||||
|
utils.cpp \
|
||||||
|
utilsexc.cpp \
|
||||||
|
wave.cpp \
|
||||||
window.cpp
|
window.cpp
|
||||||
|
|
||||||
# these are the sources which we build by our own rules
|
# these are the sources which we build by our own rules
|
||||||
|
@@ -1117,7 +1117,11 @@ bool wxYield()
|
|||||||
MSG msg;
|
MSG msg;
|
||||||
// We want to go back to the main message loop
|
// We want to go back to the main message loop
|
||||||
// if we see a WM_QUIT. (?)
|
// if we see a WM_QUIT. (?)
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
while (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_NOREMOVE) && msg.message != WM_QUIT)
|
||||||
|
#else
|
||||||
while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) && msg.message != WM_QUIT)
|
while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) && msg.message != WM_QUIT)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if ( !wxTheApp->DoMessage() )
|
if ( !wxTheApp->DoMessage() )
|
||||||
break;
|
break;
|
||||||
|
@@ -143,8 +143,10 @@ wxPaintDC::wxPaintDC()
|
|||||||
wxPaintDC::wxPaintDC(wxWindow *canvas)
|
wxPaintDC::wxPaintDC(wxWindow *canvas)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( canvas, "NULL canvas in wxPaintDC ctor" );
|
wxCHECK_RET( canvas, "NULL canvas in wxPaintDC ctor" );
|
||||||
wxCHECK_RET( g_isPainting,
|
|
||||||
_T("wxPaintDC may be created only in EVT_PAINT handler!") );
|
#ifdef __WXDEBUG__
|
||||||
|
wxCHECK_RET( g_isPainting, _T("wxPaintDC may be created only in EVT_PAINT handler!") );
|
||||||
|
#endif
|
||||||
|
|
||||||
m_canvas = canvas;
|
m_canvas = canvas;
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include "wx/dcprint.h"
|
#include "wx/dcprint.h"
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
|
|
||||||
#if wxUSE_COMMON_DIALOGS
|
#if wxUSE_COMMON_DIALOGS || defined(__WXWINE__)
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -357,7 +357,7 @@ HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal)
|
|||||||
DWORD PASCAL lread(int fh, void far *pv, DWORD ul)
|
DWORD PASCAL lread(int fh, void far *pv, DWORD ul)
|
||||||
{
|
{
|
||||||
DWORD ulT = ul;
|
DWORD ulT = ul;
|
||||||
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__)
|
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) || defined(__WXWINE__)
|
||||||
BYTE *hp = (BYTE *) pv;
|
BYTE *hp = (BYTE *) pv;
|
||||||
#else
|
#else
|
||||||
BYTE huge *hp = (BYTE huge *) pv;
|
BYTE huge *hp = (BYTE huge *) pv;
|
||||||
@@ -387,7 +387,7 @@ DWORD PASCAL lread(int fh, void far *pv, DWORD ul)
|
|||||||
DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul)
|
DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul)
|
||||||
{
|
{
|
||||||
DWORD ulT = ul;
|
DWORD ulT = ul;
|
||||||
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__)
|
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) || defined(__WXWINE__)
|
||||||
BYTE *hp = (BYTE *) pv;
|
BYTE *hp = (BYTE *) pv;
|
||||||
#else
|
#else
|
||||||
BYTE huge *hp = (BYTE huge *) pv;
|
BYTE huge *hp = (BYTE huge *) pv;
|
||||||
@@ -642,6 +642,9 @@ BOOL PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB,
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
|
HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
|
||||||
{
|
{
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
return (FALSE);
|
||||||
|
#else
|
||||||
NPLOGPALETTE npPal;
|
NPLOGPALETTE npPal;
|
||||||
RGBQUAD far *lpRGB;
|
RGBQUAD far *lpRGB;
|
||||||
HPALETTE hLogPal;
|
HPALETTE hLogPal;
|
||||||
@@ -658,7 +661,6 @@ HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
|
|||||||
*/
|
*/
|
||||||
npPal = (NPLOGPALETTE)malloc(sizeof(LOGPALETTE) +
|
npPal = (NPLOGPALETTE)malloc(sizeof(LOGPALETTE) +
|
||||||
(WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY));
|
(WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY));
|
||||||
|
|
||||||
if (!npPal)
|
if (!npPal)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
||||||
@@ -690,6 +692,8 @@ HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
|
|||||||
*/
|
*/
|
||||||
else
|
else
|
||||||
return((HPALETTE) GetStockObject(DEFAULT_PALETTE));
|
return((HPALETTE) GetStockObject(DEFAULT_PALETTE));
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxPalette **pal)
|
bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxPalette **pal)
|
||||||
|
@@ -32,6 +32,10 @@
|
|||||||
|
|
||||||
#include "wx/msw/dibutils.h"
|
#include "wx/msw/dibutils.h"
|
||||||
|
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
#include <module.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
#if !defined(__MWERKS__) && !defined(__SALFORDC__)
|
#if !defined(__MWERKS__) && !defined(__SALFORDC__)
|
||||||
#include <memory.h> // for _fmemcpy()
|
#include <memory.h> // for _fmemcpy()
|
||||||
@@ -78,7 +82,7 @@ void ClearSystemPalette(void)
|
|||||||
BOOL bOK = FALSE;
|
BOOL bOK = FALSE;
|
||||||
int nOK = 0;
|
int nOK = 0;
|
||||||
|
|
||||||
//*** Reset everything in the system palette to black
|
// *** Reset everything in the system palette to black
|
||||||
for(Counter = 0; Counter < 256; Counter++)
|
for(Counter = 0; Counter < 256; Counter++)
|
||||||
{
|
{
|
||||||
Palette.aEntries[Counter].peRed = 0;
|
Palette.aEntries[Counter].peRed = 0;
|
||||||
@@ -87,8 +91,12 @@ void ClearSystemPalette(void)
|
|||||||
Palette.aEntries[Counter].peFlags = PC_NOCOLLAPSE;
|
Palette.aEntries[Counter].peFlags = PC_NOCOLLAPSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*** Create, select, realize, deselect, and delete the palette
|
// *** Create, select, realize, deselect, and delete the palette
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
ScreenDC = GetDC((HWND)NULL);
|
||||||
|
#else
|
||||||
ScreenDC = GetDC(NULL);
|
ScreenDC = GetDC(NULL);
|
||||||
|
#endif
|
||||||
ScreenPalette = CreatePalette((LOGPALETTE *)&Palette);
|
ScreenPalette = CreatePalette((LOGPALETTE *)&Palette);
|
||||||
|
|
||||||
if (ScreenPalette)
|
if (ScreenPalette)
|
||||||
@@ -99,7 +107,11 @@ void ClearSystemPalette(void)
|
|||||||
bOK = DeleteObject(ScreenPalette);
|
bOK = DeleteObject(ScreenPalette);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
nOK = ReleaseDC((HWND)NULL, ScreenDC);
|
||||||
|
#else
|
||||||
nOK = ReleaseDC(NULL, ScreenDC);
|
nOK = ReleaseDC(NULL, ScreenDC);
|
||||||
|
#endif
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -903,7 +903,7 @@ WXDWORD wxWindow::Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D)
|
|||||||
return exStyle;
|
return exStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2
|
#if WXWIN_COMPATIBILITY
|
||||||
// If nothing defined for this, try the parent.
|
// If nothing defined for this, try the parent.
|
||||||
// E.g. we may be a button loaded from a resource, with no callback function
|
// E.g. we may be a button loaded from a resource, with no callback function
|
||||||
// defined.
|
// defined.
|
||||||
@@ -1309,7 +1309,7 @@ void wxWindow::GetTextExtent(const wxString& string,
|
|||||||
if ( externalLeading ) *externalLeading = tm.tmExternalLeading;
|
if ( externalLeading ) *externalLeading = tm.tmExternalLeading;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_CARET
|
#if wxUSE_CARET && WXWIN_COMPATIBILITY
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Caret manipulation
|
// Caret manipulation
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -2087,7 +2087,11 @@ bool wxWindow::MSWCreate(int id,
|
|||||||
if ( width > -1 ) width1 = width;
|
if ( width > -1 ) width1 = width;
|
||||||
if ( height > -1 ) height1 = height;
|
if ( height > -1 ) height1 = height;
|
||||||
|
|
||||||
|
#ifdef __WXWINE__
|
||||||
|
HWND hParent = (HWND)NULL;
|
||||||
|
#else
|
||||||
HWND hParent = NULL;
|
HWND hParent = NULL;
|
||||||
|
#endif
|
||||||
if ( parent )
|
if ( parent )
|
||||||
hParent = (HWND) parent->GetHWND();
|
hParent = (HWND) parent->GetHWND();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user