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:
Robert Roebling
1999-06-08 20:56:50 +00:00
parent af0bb3b161
commit c455ab932f
12 changed files with 147 additions and 12 deletions

View File

@@ -15,8 +15,10 @@
/* wxWindows version (not used but required by autoheader) */
/* ------------------------------------------------------------------------ */
#if 0
#undef PACKAGE
#undef VERSION
#endif
/* needed for older automake? */
#undef WITH_SYMBOL_UNDERSCORE

View File

@@ -50,10 +50,24 @@ 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
// ---------------------------------------------------------------------------
#if defined(__GNUWIN32__) && !defined(__MINGW32__)
# define CASTWNDPROC (long unsigned)
#else

View File

@@ -161,6 +161,11 @@
}
#endif
// For WINE
#if defined(GetWindowStyle) || defined(__WXWINE__)
#undef GetWindowStyle
#endif
// For ming and cygwin

View File

@@ -61,6 +61,11 @@
#include <commdlg.h>
#endif // Win16
#ifdef __WXWINE__
#include <cderr.h>
#include <commdlg.h>
#endif
#if defined(__WATCOMC__) || defined(__SC__) || defined(__SALFORDC__)
#include <windowsx.h>
#include <commdlg.h>
@@ -319,7 +324,9 @@ void wxPrintData::ConvertToNative()
//// Orientation
#ifndef __WXWINE__
devMode->dmOrientation = m_printOrientation;
#endif
devMode->dmFields = DM_ORIENTATION;
//// Collation
@@ -353,6 +360,7 @@ void wxPrintData::ConvertToNative()
devMode->dmFields |= DM_COLOR;
#ifndef __WXWINE__
//// Paper size
if (m_paperId == wxPAPER_NONE)
@@ -374,6 +382,7 @@ void wxPrintData::ConvertToNative()
}
}
}
#endif
//// Duplex
@@ -433,10 +442,12 @@ void wxPrintData::ConvertFromNative()
{
DEVMODE *devMode = (DEVMODE*) GlobalLock(hDevMode);
#ifndef __WXWINE__
//// Orientation
if (devMode->dmFields & DM_ORIENTATION)
m_printOrientation = devMode->dmOrientation;
#endif
//// Collation
@@ -484,6 +495,7 @@ void wxPrintData::ConvertFromNative()
else
m_colour = TRUE;
#ifndef __WXWINE__
//// Paper size
if (devMode->dmFields & DM_PAPERSIZE)
@@ -532,7 +544,7 @@ void wxPrintData::ConvertFromNative()
m_paperSize.y = 0;
m_paperId = wxPAPER_NONE;
}
#endif
//// Duplex

View File

@@ -994,7 +994,7 @@ bool wxMkdir(const wxString& dir, int perm)
// assume mkdir() has 2 args on non Windows platforms and on Windows too
// 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 )
#else // MSW
if ( mkdir(wxFNCONV(dirname)) != 0 )

View File

@@ -22,10 +22,86 @@ libwx_msw_la_SOURCES = \
extended.c \
parser.c \
\
cmndata.cpp \
dynarray.cpp \
filefn.cpp \
hash.cpp \
list.cpp \
matrix.cpp \
memory.cpp \
module.cpp \
object.cpp \
string.cpp \
timercmn.cpp \
utilscmn.cpp \
tokenzr.cpp \
variant.cpp \
wxchar.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
# these are the sources which we build by our own rules

View File

@@ -1117,7 +1117,11 @@ bool wxYield()
MSG msg;
// We want to go back to the main message loop
// 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)
#endif
{
if ( !wxTheApp->DoMessage() )
break;

View File

@@ -143,8 +143,10 @@ wxPaintDC::wxPaintDC()
wxPaintDC::wxPaintDC(wxWindow *canvas)
{
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;

View File

@@ -30,7 +30,7 @@
#include "wx/dcprint.h"
#include "math.h"
#if wxUSE_COMMON_DIALOGS
#if wxUSE_COMMON_DIALOGS || defined(__WXWINE__)
#include <commdlg.h>
#endif

View File

@@ -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 ulT = ul;
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__)
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) || defined(__WXWINE__)
BYTE *hp = (BYTE *) pv;
#else
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 ulT = ul;
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__)
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) || defined(__WXWINE__)
BYTE *hp = (BYTE *) pv;
#else
BYTE huge *hp = (BYTE huge *) pv;
@@ -642,6 +642,9 @@ BOOL PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB,
****************************************************************************/
HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
{
#ifdef __WXWINE__
return (FALSE);
#else
NPLOGPALETTE npPal;
RGBQUAD far *lpRGB;
HPALETTE hLogPal;
@@ -658,7 +661,6 @@ HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
*/
npPal = (NPLOGPALETTE)malloc(sizeof(LOGPALETTE) +
(WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY));
if (!npPal)
return(FALSE);
@@ -690,6 +692,8 @@ HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
*/
else
return((HPALETTE) GetStockObject(DEFAULT_PALETTE));
#endif
}
bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxPalette **pal)

View File

@@ -32,6 +32,10 @@
#include "wx/msw/dibutils.h"
#ifdef __WXWINE__
#include <module.h>
#endif
#if defined(__WIN32__)
#if !defined(__MWERKS__) && !defined(__SALFORDC__)
#include <memory.h> // for _fmemcpy()
@@ -78,7 +82,7 @@ void ClearSystemPalette(void)
BOOL bOK = FALSE;
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++)
{
Palette.aEntries[Counter].peRed = 0;
@@ -87,8 +91,12 @@ void ClearSystemPalette(void)
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);
#endif
ScreenPalette = CreatePalette((LOGPALETTE *)&Palette);
if (ScreenPalette)
@@ -99,7 +107,11 @@ void ClearSystemPalette(void)
bOK = DeleteObject(ScreenPalette);
}
#ifdef __WXWINE__
nOK = ReleaseDC((HWND)NULL, ScreenDC);
#else
nOK = ReleaseDC(NULL, ScreenDC);
#endif
return;
}

View File

@@ -903,7 +903,7 @@ WXDWORD wxWindow::Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D)
return exStyle;
}
#if WXWIN_COMPATIBILITY_2
#if WXWIN_COMPATIBILITY
// If nothing defined for this, try the parent.
// E.g. we may be a button loaded from a resource, with no callback function
// defined.
@@ -1309,7 +1309,7 @@ void wxWindow::GetTextExtent(const wxString& string,
if ( externalLeading ) *externalLeading = tm.tmExternalLeading;
}
#if wxUSE_CARET
#if wxUSE_CARET && WXWIN_COMPATIBILITY
// ---------------------------------------------------------------------------
// Caret manipulation
// ---------------------------------------------------------------------------
@@ -2087,7 +2087,11 @@ bool wxWindow::MSWCreate(int id,
if ( width > -1 ) width1 = width;
if ( height > -1 ) height1 = height;
#ifdef __WXWINE__
HWND hParent = (HWND)NULL;
#else
HWND hParent = NULL;
#endif
if ( parent )
hParent = (HWND) parent->GetHWND();