/* wxWindows version (not used but required by autoheader) */
/* ------------------------------------------------------------------------ */
+#if 0
#undef PACKAGE
#undef VERSION
+#endif
/* needed for older automake? */
#undef WITH_SYMBOL_UNDERSCORE
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
}
#endif
+// For WINE
+
+#if defined(GetWindowStyle) || defined(__WXWINE__)
+ #undef GetWindowStyle
+#endif
// For ming and cygwin
#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>
//// Orientation
+#ifndef __WXWINE__
devMode->dmOrientation = m_printOrientation;
+#endif
devMode->dmFields = DM_ORIENTATION;
//// Collation
devMode->dmFields |= DM_COLOR;
+#ifndef __WXWINE__
//// Paper size
if (m_paperId == wxPAPER_NONE)
}
}
}
+#endif
//// Duplex
{
DEVMODE *devMode = (DEVMODE*) GlobalLock(hDevMode);
+#ifndef __WXWINE__
//// Orientation
if (devMode->dmFields & DM_ORIENTATION)
m_printOrientation = devMode->dmOrientation;
+#endif
//// Collation
else
m_colour = TRUE;
+#ifndef __WXWINE__
//// Paper size
if (devMode->dmFields & DM_PAPERSIZE)
m_paperSize.y = 0;
m_paperId = wxPAPER_NONE;
}
-
+#endif
//// Duplex
// 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 )
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
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;
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;
#include "wx/dcprint.h"
#include "math.h"
-#if wxUSE_COMMON_DIALOGS
+#if wxUSE_COMMON_DIALOGS || defined(__WXWINE__)
#include <commdlg.h>
#endif
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;
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;
****************************************************************************/
HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
{
+#ifdef __WXWINE__
+ return (FALSE);
+#else
NPLOGPALETTE npPal;
RGBQUAD far *lpRGB;
HPALETTE hLogPal;
*/
npPal = (NPLOGPALETTE)malloc(sizeof(LOGPALETTE) +
(WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY));
-
if (!npPal)
return(FALSE);
*/
else
return((HPALETTE) GetStockObject(DEFAULT_PALETTE));
+#endif
+
}
bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxPalette **pal)
#include "wx/msw/dibutils.h"
+#ifdef __WXWINE__
+ #include <module.h>
+#endif
+
#if defined(__WIN32__)
#if !defined(__MWERKS__) && !defined(__SALFORDC__)
#include <memory.h> // for _fmemcpy()
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;
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)
bOK = DeleteObject(ScreenPalette);
}
+#ifdef __WXWINE__
+ nOK = ReleaseDC((HWND)NULL, ScreenDC);
+#else
nOK = ReleaseDC(NULL, ScreenDC);
+#endif
return;
}
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.
if ( externalLeading ) *externalLeading = tm.tmExternalLeading;
}
-#if wxUSE_CARET
+#if wxUSE_CARET && WXWIN_COMPATIBILITY
// ---------------------------------------------------------------------------
// Caret manipulation
// ---------------------------------------------------------------------------
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();