Mods for Wine compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f13b39c0c3
commit
3bce6687f4
58
configure.in
58
configure.in
@ -353,6 +353,8 @@ if test $DEBUG_CONFIGURE = 1; then
|
||||
DEFAULT_wxUSE_FONTMAP=no
|
||||
DEFAULT_wxUSE_STREAMS=no
|
||||
DEFAULT_wxUSE_SOCKETS=no
|
||||
DEFAULT_wxUSE_OLE=no
|
||||
DEFAULT_wxUSE_DATAOBJ=no
|
||||
DEFAULT_wxUSE_DIALUP_MANAGER=no
|
||||
DEFAULT_wxUSE_JOYSTICK=no
|
||||
DEFAULT_wxUSE_DYNLIB_CLASS=no
|
||||
@ -526,6 +528,8 @@ else
|
||||
DEFAULT_wxUSE_FONTMAP=yes
|
||||
DEFAULT_wxUSE_STREAMS=yes
|
||||
DEFAULT_wxUSE_SOCKETS=yes
|
||||
DEFAULT_wxUSE_OLE=yes
|
||||
DEFAULT_wxUSE_DATAOBJ=yes
|
||||
DEFAULT_wxUSE_DIALUP_MANAGER=yes
|
||||
DEFAULT_wxUSE_JOYSTICK=yes
|
||||
DEFAULT_wxUSE_DYNLIB_CLASS=yes
|
||||
@ -755,6 +759,8 @@ WX_ARG_ENABLE(ftp, [ --enable-ftp use wxFTP (requires wxPr
|
||||
WX_ARG_ENABLE(http, [ --enable-http use wxHTTP (requires wxProtocol], wxUSE_PROTOCOL_HTTP)
|
||||
WX_ARG_ENABLE(fileproto, [ --enable-fileproto use wxFileProto class (requires wxProtocol], wxUSE_PROTOCOL_FILE)
|
||||
WX_ARG_ENABLE(sockets, [ --enable-sockets use socket/network classes], wxUSE_SOCKETS)
|
||||
WX_ARG_ENABLE(ole, [ --enable-ole use OLE classes], wxUSE_OLE)
|
||||
WX_ARG_ENABLE(dataobj, [ --enable-dataobj use data object classes], wxUSE_DATAOBJ)
|
||||
|
||||
WX_ARG_ENABLE(ipc, [ --enable-ipc use interprocess communication (wxSocket etc.)], wxUSE_IPC)
|
||||
|
||||
@ -2174,7 +2180,9 @@ equivalent variable and GTK+ is version 1.2.3 or above.
|
||||
mesa_link=" -lMesaGL"
|
||||
AC_MSG_RESULT(found at $ac_find_libraries)
|
||||
else
|
||||
AC_MSG_ERROR(no)
|
||||
mesa_link=""
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN(library will be compiled without Mesa support)
|
||||
fi
|
||||
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwine$mesa_link$xpm_link -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses"
|
||||
@ -3903,7 +3911,7 @@ dnl ------------------------------------------------------------------------
|
||||
dnl wxSocket
|
||||
dnl ------------------------------------------------------------------------
|
||||
|
||||
dnl VZ: the GUI hooks wxSocket needs are not implemented yet in wxX11
|
||||
dnl VZ: the GUI hooks wxSocket needs are not implemented yet in wxMGL
|
||||
if test "$wxUSE_SOCKETS" = "yes"; then
|
||||
if test "$wxUSE_MGL" = "1"; then
|
||||
AC_MSG_WARN([wxSocket not yet supported under MGL... disabled])
|
||||
@ -4244,6 +4252,7 @@ dnl check for ole headers and disable a few features requiring it if not
|
||||
dnl present (earlier versions of mingw32 don't have ole2.h)
|
||||
if test "$wxUSE_MSW" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \
|
||||
-o "$wxUSE_CLIPBOARD" = "yes" \
|
||||
-o "$wxUSE_OLE" = "yes" \
|
||||
-o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
|
||||
AC_CHECK_HEADERS(ole2.h)
|
||||
|
||||
@ -4274,6 +4283,51 @@ if test "$wxUSE_MSW" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \
|
||||
wxUSE_CLIPBOARD=no
|
||||
wxUSE_DRAG_AND_DROP=no
|
||||
wxUSE_DATAOBJ=no
|
||||
wxUSE_OLE=no
|
||||
fi
|
||||
|
||||
if test "$wxUSE_METAFILE" = "yes"; then
|
||||
AC_DEFINE(wxUSE_METAFILE)
|
||||
|
||||
dnl this one should probably be made separately configurable
|
||||
AC_DEFINE(wxUSE_ENH_METAFILE)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_WINE" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \
|
||||
-o "$wxUSE_CLIPBOARD" = "yes" \
|
||||
-o "$wxUSE_OLE" = "yes" \
|
||||
-o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
|
||||
AC_CHECK_HEADERS(ole2.h)
|
||||
|
||||
if test "$ac_cv_header_ole2_h" = "yes" ; then
|
||||
if test "$GCC" = yes ; then
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
AC_MSG_CHECKING([if g++ requires -fvtable-thunks])
|
||||
AC_TRY_COMPILE([#include <windows.h>
|
||||
#include <ole2.h>],
|
||||
[],
|
||||
[AC_MSG_RESULT(no)],
|
||||
[AC_MSG_RESULT(yes)
|
||||
CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"])
|
||||
AC_LANG_RESTORE
|
||||
ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)"
|
||||
LIBS=" -lwine_uuid$LIBS"
|
||||
AC_DEFINE(wxUSE_OLE)
|
||||
|
||||
fi
|
||||
|
||||
dnl for OLE clipboard and dnd
|
||||
AC_DEFINE(wxUSE_DATAOBJ)
|
||||
else
|
||||
AC_MSG_WARN([Some features disabled because OLE headers not found])
|
||||
|
||||
wxUSE_CLIPBOARD=no
|
||||
wxUSE_DRAG_AND_DROP=no
|
||||
wxUSE_DATAOBJ=no
|
||||
wxUSE_OLE=no
|
||||
fi
|
||||
|
||||
if test "$wxUSE_METAFILE" = "yes"; then
|
||||
|
@ -251,7 +251,7 @@ typedef int wxWindowID;
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// stdcall is used for all functions called by Windows under Windows
|
||||
#ifdef __WINDOWS__
|
||||
#if defined(__WINDOWS__) && !defined(__WXWINE__)
|
||||
#if defined(__GNUWIN32__)
|
||||
#define wxSTDCALL __attribute__((stdcall))
|
||||
#else
|
||||
|
@ -103,6 +103,26 @@ typedef struct _LVITEMW {
|
||||
typedef LV_ITEM LV_ITEMA;
|
||||
#endif
|
||||
|
||||
#ifndef ListView_GetColumnWidth
|
||||
#define ListView_GetColumnWidth(hwnd, iCol) \
|
||||
(int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)
|
||||
#endif
|
||||
|
||||
#ifndef ListView_SetColumnWidth
|
||||
#define ListView_SetColumnWidth(hwnd, iCol, cx) \
|
||||
(BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))
|
||||
#endif
|
||||
|
||||
#ifndef ListView_GetTextColor
|
||||
#define ListView_GetTextColor(hwnd) \
|
||||
(COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0L)
|
||||
#endif
|
||||
|
||||
#ifndef ListView_FindItem
|
||||
#define ListView_FindItem(hwnd, iStart, plvfi) \
|
||||
(int)SNDMSG((hwnd), LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LV_FINDINFO FAR*)(plvfi))
|
||||
#endif
|
||||
|
||||
#if defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 0, 5 )
|
||||
#ifndef LV_DISPINFOA
|
||||
typedef struct tagNMLVDISPINFOA {
|
||||
@ -193,6 +213,19 @@ struct HH_AKLINK
|
||||
#define QS_ALLPOSTMESSAGE 0x0100
|
||||
#endif
|
||||
|
||||
#ifdef __WXWINE__
|
||||
#define LV_ITEMA LVITEMA
|
||||
#define LV_ITEMW LVITEMW
|
||||
#define LV_DISPINFOA NMLVDISPINFOA
|
||||
#define LV_DISPINFOW NMLVDISPINFOW
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
#define LV_FINDINFO LVFINDINFOW
|
||||
#else
|
||||
#define LV_FINDINFO LVFINDINFOA
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_MISSING_H_
|
||||
|
@ -75,7 +75,7 @@
|
||||
#include <process.h>
|
||||
#include "wx/os2/private.h"
|
||||
#endif
|
||||
#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
|
||||
#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) && !defined(__WXWINE__)
|
||||
#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
|
||||
#include <direct.h>
|
||||
#include <dos.h>
|
||||
|
@ -486,7 +486,7 @@ wxMimeTypesManager::~wxMimeTypesManager()
|
||||
|
||||
bool wxMimeTypesManager::Unassociate(wxFileType *ft)
|
||||
{
|
||||
#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__)
|
||||
#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WXWINE__)
|
||||
return m_impl->Unassociate(ft);
|
||||
#else
|
||||
return ft->Unassociate();
|
||||
@ -596,7 +596,7 @@ size_t wxMimeTypesManager::EnumAllFileTypes(wxArrayString& mimetypes)
|
||||
void wxMimeTypesManager::Initialize(int mcapStyle,
|
||||
const wxString& sExtraDir)
|
||||
{
|
||||
#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__)
|
||||
#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WXWINE__)
|
||||
EnsureImpl();
|
||||
|
||||
m_impl->Initialize(mcapStyle, sExtraDir);
|
||||
@ -609,7 +609,7 @@ void wxMimeTypesManager::Initialize(int mcapStyle,
|
||||
// and this function clears all the data from the manager
|
||||
void wxMimeTypesManager::ClearData()
|
||||
{
|
||||
#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__)
|
||||
#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WXWINE__)
|
||||
EnsureImpl();
|
||||
|
||||
m_impl->ClearData();
|
||||
|
@ -779,7 +779,11 @@ public:
|
||||
size_t MB2WC(wchar_t *buf, const char *psz, size_t n)
|
||||
{
|
||||
size_t len =
|
||||
#ifdef __WXWINE__
|
||||
MultiByteToWideChar(m_CodePage, 0, psz, -1, (WCHAR*) buf, buf ? n : 0);
|
||||
#else
|
||||
MultiByteToWideChar(m_CodePage, 0, psz, -1, buf, buf ? n : 0);
|
||||
#endif
|
||||
//VS: returns # of written chars for buf!=NULL and *size*
|
||||
// needed buffer for buf==NULL
|
||||
return len ? (buf ? len : len-1) : (size_t)-1;
|
||||
@ -787,8 +791,13 @@ public:
|
||||
|
||||
size_t WC2MB(char *buf, const wchar_t *psz, size_t n)
|
||||
{
|
||||
#ifdef __WXWINE__
|
||||
size_t len = WideCharToMultiByte(m_CodePage, 0, (const WCHAR*) psz, -1, buf,
|
||||
buf ? n : 0, NULL, NULL);
|
||||
#else
|
||||
size_t len = WideCharToMultiByte(m_CodePage, 0, psz, -1, buf,
|
||||
buf ? n : 0, NULL, NULL);
|
||||
#endif
|
||||
//VS: returns # of written chars for buf!=NULL and *size*
|
||||
// needed buffer for buf==NULL
|
||||
return len ? (buf ? len : len-1) : (size_t)-1;
|
||||
|
@ -186,7 +186,7 @@ int strncasecmp(const char *str_1, const char *str_2, size_t maxchar)
|
||||
}
|
||||
#endif // __VMS__
|
||||
|
||||
#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
|
||||
#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) && !defined(__WXWINE__)
|
||||
|
||||
#ifndef __GNUWIN32__
|
||||
#ifndef __MWERKS__
|
||||
|
@ -57,8 +57,8 @@
|
||||
// FIXME - Mingw32 1.0 has both _getdrive() and _chdrive(). For now, let's assume
|
||||
// older releases don't, but it should be verified and the checks modified
|
||||
// accordingly.
|
||||
#if !defined(__GNUWIN32__) || \
|
||||
(defined(__MINGW32_MAJOR_VERSION) && __MINGW32_MAJOR_VERSION >= 1)
|
||||
#if !defined(__WXWINE__) && (!defined(__GNUWIN32__) || \
|
||||
(defined(__MINGW32_MAJOR_VERSION) && __MINGW32_MAJOR_VERSION >= 1))
|
||||
#include <direct.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@ -375,8 +375,8 @@ bool wxIsDriveAvailable(const wxString& dirName)
|
||||
if (dirName.Len() == 3 && dirName[(size_t)1] == wxT(':'))
|
||||
{
|
||||
wxString dirNameLower(dirName.Lower());
|
||||
#if defined(__GNUWIN32__) && \
|
||||
!(defined(__MINGW32_MAJOR_VERSION) && __MINGW32_MAJOR_VERSION >= 1)
|
||||
#if defined(__WXWINE__) || (defined(__GNUWIN32__) && \
|
||||
!(defined(__MINGW32_MAJOR_VERSION) && __MINGW32_MAJOR_VERSION >= 1))
|
||||
success = wxPathExists(dirNameLower);
|
||||
#else
|
||||
int currentDrive = _getdrive();
|
||||
|
@ -16,7 +16,14 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef __WXWINE__
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef __WXWINE__
|
||||
#define NPSTR LPVOID
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
|
@ -57,6 +57,11 @@
|
||||
#include <print.h>
|
||||
#endif
|
||||
|
||||
/* Quaternary raster codes */
|
||||
#ifndef MAKEROP4
|
||||
#define MAKEROP4(fore,back) (DWORD)((((back) << 8) & 0xFF000000) | (fore))
|
||||
#endif
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxDCBase)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
@ -46,6 +46,10 @@
|
||||
#include <windows.h>
|
||||
#include <ddeml.h>
|
||||
|
||||
#ifdef __WXWINE__
|
||||
#define PCONVCONTEXT CONVCONTEXT*
|
||||
#endif
|
||||
|
||||
#if defined(__TWIN32__) || defined(__GNUWIN32_OLD__)
|
||||
#include "wx/msw/gnuwin32/extra.h"
|
||||
#endif
|
||||
|
@ -48,11 +48,13 @@
|
||||
DEFINE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED)
|
||||
DEFINE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED)
|
||||
|
||||
// Doesn't yet compile under VC++ 4, BC++, Watcom C++: no wininet.h
|
||||
// Doesn't yet compile under VC++ 4, BC++, Watcom C++,
|
||||
// Wine: no wininet.h
|
||||
#if !defined(__BORLANDC__) && \
|
||||
(!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \
|
||||
!defined(__GNUWIN32_OLD__) && \
|
||||
!defined(__WATCOMC__) && \
|
||||
!defined(__WXWINE__) && \
|
||||
(!defined(__VISUALC__) || (__VISUALC__ >= 1020))
|
||||
|
||||
#include <ras.h>
|
||||
|
@ -33,7 +33,9 @@
|
||||
#include "wx/msw/dibutils.h"
|
||||
|
||||
#ifdef __WXWINE__
|
||||
#include <module.h>
|
||||
/* Why module.h? No longer finds this header.
|
||||
#include <module.h>
|
||||
*/
|
||||
#endif
|
||||
|
||||
#if defined(__WIN32__)
|
||||
|
@ -55,6 +55,12 @@
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
|
||||
// Wine doesn't have this yet
|
||||
#ifndef ListView_CreateDragImage
|
||||
#define ListView_CreateDragImage(hwnd, i, lpptUpLeft) \
|
||||
(HIMAGELIST)SNDMSG((hwnd), LVM_CREATEDRAGIMAGE, (WPARAM)(int)(i), (LPARAM)(LPPOINT)(lpptUpLeft))
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -193,8 +193,15 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
|
||||
rect.bottom = height;
|
||||
|
||||
// CreateEnhMetaFile() wants them in HIMETRIC
|
||||
#ifdef __WXWINE__
|
||||
LONG r, b;
|
||||
PixelToHIMETRIC(&r, &b);
|
||||
rect.right = r;
|
||||
rect.bottom = b;
|
||||
#else
|
||||
PixelToHIMETRIC(&rect.right, &rect.bottom);
|
||||
|
||||
#endif
|
||||
|
||||
pRect = ▭
|
||||
}
|
||||
else
|
||||
@ -294,6 +301,10 @@ bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef __WXWINE__
|
||||
wxFAIL_MSG( _T("unsupported format") );
|
||||
return FALSE;
|
||||
#else
|
||||
wxASSERT_MSG( format == wxDF_METAFILE, _T("unsupported format") );
|
||||
|
||||
// convert to WMF
|
||||
@ -335,6 +346,7 @@ bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf)
|
||||
mfpict->yExt = sizeMF.y;
|
||||
|
||||
PixelToHIMETRIC(&mfpict->xExt, &mfpict->yExt);
|
||||
#endif
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -39,7 +39,8 @@
|
||||
#include "wx/fontdlg.h"
|
||||
|
||||
#if !defined(__WIN32__) || defined(__SALFORDC__) || defined(__WXWINE__)
|
||||
#include <commdlg.h>
|
||||
#include <windows.h>
|
||||
#include <commdlg.h>
|
||||
#endif
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
|
@ -146,7 +146,9 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if defined(__GNUWIN32__) && !defined(__CYGWIN10__) && !wxCHECK_W32API_VERSION( 1, 1 )
|
||||
#if defined(__WXWINE__)
|
||||
#define wxFONTENUMPROC FONTENUMPROCEX
|
||||
#elif (defined(__GNUWIN32__) && !defined(__CYGWIN10__) && !wxCHECK_W32API_VERSION( 1, 1 ))
|
||||
#if wxUSE_NORLANDER_HEADERS
|
||||
#define wxFONTENUMPROC int(*)(const LOGFONT *, const TEXTMETRIC *, long unsigned int, LPARAM)
|
||||
#else
|
||||
|
@ -26,7 +26,6 @@
|
||||
# pragma warning(disable:4100)
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
|
||||
#ifndef __GSOCKET_STANDALONE__
|
||||
# include "wx/defs.h"
|
||||
# include "wx/setup.h"
|
||||
@ -50,7 +49,6 @@
|
||||
# define _GSocket_Disable_Events(socket)
|
||||
#endif /* wxUSE_GUI */
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
@ -110,7 +110,12 @@ private:
|
||||
m_item = new LV_ITEM((LV_ITEM&)item);
|
||||
if ( (item.mask & LVIF_TEXT) && item.pszText )
|
||||
{
|
||||
#ifdef __WXWINE__
|
||||
// FIXME
|
||||
m_buf = new wxWC2WXbuf(wxConvLocal.cWC2WX((const __wchar_t* ) item.pszText));
|
||||
#else
|
||||
m_buf = new wxWC2WXbuf(wxConvLocal.cWC2WX(item.pszText));
|
||||
#endif
|
||||
m_item->pszText = (wxChar*)m_buf->data();
|
||||
}
|
||||
else
|
||||
@ -970,11 +975,7 @@ bool wxListCtrl::GetItemRect(long item, wxRect& rect, int code) const
|
||||
codeWin = LVIR_BOUNDS;
|
||||
}
|
||||
|
||||
#ifdef __WXWINE__
|
||||
bool success = ListView_GetItemRect(GetHwnd(), (int) item, &rectWin ) != 0;
|
||||
#else
|
||||
bool success = ListView_GetItemRect(GetHwnd(), (int) item, &rectWin, codeWin) != 0;
|
||||
#endif
|
||||
|
||||
rect.x = rectWin.left;
|
||||
rect.y = rectWin.top;
|
||||
|
@ -66,7 +66,11 @@ HINSTANCE wxhInstance = 0;
|
||||
|
||||
#if !defined(_WINDLL)
|
||||
|
||||
#if defined(__TWIN32__) || defined(__WXWINE__) || defined(__WXMICROWIN__)
|
||||
#if defined(__WXWINE__)
|
||||
#define HINSTANCE HINSTANCE__*
|
||||
|
||||
extern "C"
|
||||
#elif defined(__TWIN32__) || defined(__WXMICROWIN__)
|
||||
#define HINSTANCE HANDLE
|
||||
|
||||
extern "C"
|
||||
|
@ -308,8 +308,6 @@ void wxMetafileDC::SetMapMode(int mode)
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_windowExtX = 100;
|
||||
m_windowExtY = 100;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
// Watcom C++ gives a linker error if this is compiled in.
|
||||
// With Borland C++, all samples crash if this is compiled in.
|
||||
#if wxUSE_OLE &&!defined(__WATCOMC__) && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__)
|
||||
#if wxUSE_OLE &&!defined(__WATCOMC__) && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__) && !defined(__WXWINE__)
|
||||
|
||||
#include "wx/log.h"
|
||||
#include "wx/msw/ole/automtn.h"
|
||||
|
@ -55,6 +55,10 @@
|
||||
|
||||
#include "wx/msw/dib.h"
|
||||
|
||||
#ifdef __WXWINE__
|
||||
#define LPDROPFILES DROPFILES*
|
||||
#endif
|
||||
|
||||
#ifndef CFSTR_SHELLURL
|
||||
#define CFSTR_SHELLURL _T("UniformResourceLocator")
|
||||
#endif
|
||||
|
@ -136,6 +136,10 @@ void Uuid::Create()
|
||||
// set the value
|
||||
bool Uuid::Set(const wxChar *pc)
|
||||
{
|
||||
#ifdef __WXWINE__
|
||||
wxFAIL_MSG(_T("UUid::Set not implemented"));
|
||||
return FALSE;
|
||||
#else
|
||||
// get UUID from string
|
||||
#ifdef _UNICODE
|
||||
if ( UuidFromString((unsigned short *)pc, &m_uuid) != RPC_S_OK)
|
||||
@ -156,6 +160,7 @@ bool Uuid::Set(const wxChar *pc)
|
||||
UuidToCForm();
|
||||
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
// stores m_uuid in m_pszCForm in a format required by
|
||||
|
@ -858,6 +858,7 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl),
|
||||
WXLPARAM lParam,
|
||||
WXLPARAM *WXUNUSED(result))
|
||||
{
|
||||
#if wxUSE_TOOLTIPS
|
||||
// First check if this applies to us
|
||||
NMHDR *hdr = (NMHDR *)lParam;
|
||||
|
||||
@ -879,6 +880,9 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl),
|
||||
return FALSE;
|
||||
|
||||
return HandleTooltipNotify(code, lParam, tool->GetShortHelp());
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -553,6 +553,15 @@ DWORD CALLBACK wxRichEditStreamIn(DWORD dwCookie, BYTE *buf, LONG cb, LONG *pcb)
|
||||
|
||||
extern long wxEncodingToCodepage(wxFontEncoding encoding); // from utils.cpp
|
||||
|
||||
#ifdef __WXWINE__
|
||||
bool wxTextCtrl::StreamIn(const wxString& value,
|
||||
wxFontEncoding WXUNUSED(encoding),
|
||||
bool selectionOnly)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
#else
|
||||
|
||||
#if wxUSE_UNICODE_MSLU
|
||||
bool wxTextCtrl::StreamIn(const wxString& value,
|
||||
wxFontEncoding WXUNUSED(encoding),
|
||||
@ -617,6 +626,9 @@ bool wxTextCtrl::StreamIn(const wxString& value,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
// __WXWINE__
|
||||
|
||||
#endif // wxUSE_RICHEDIT
|
||||
|
||||
void wxTextCtrl::WriteText(const wxString& value)
|
||||
@ -654,7 +666,7 @@ void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly)
|
||||
}
|
||||
#endif // wxUSE_UNICODE_MSLU
|
||||
|
||||
#if !wxUSE_UNICODE
|
||||
#if !wxUSE_UNICODE && !defined(__WXWINE__)
|
||||
// next check if the text we're inserting must be shown in a non
|
||||
// default charset -- this only works for RichEdit > 1.0
|
||||
if ( GetRichVersion() > 1 )
|
||||
@ -1538,10 +1550,11 @@ void wxTextCtrl::OnUpdateRedo(wxUpdateUIEvent& event)
|
||||
|
||||
bool wxTextCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
{
|
||||
#ifndef __WXWINE__
|
||||
NMHDR *hdr = (NMHDR* )lParam;
|
||||
switch ( hdr->code )
|
||||
{
|
||||
case EN_MSGFILTER:
|
||||
case EN_MSGFILTER:
|
||||
{
|
||||
const MSGFILTER *msgf = (MSGFILTER *)lParam;
|
||||
UINT msg = msgf->msg;
|
||||
@ -1624,7 +1637,8 @@ bool wxTextCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// not processed, leave it to the base class
|
||||
return wxTextCtrlBase::MSWOnNotify(idCtrl, lParam, result);
|
||||
}
|
||||
@ -1681,6 +1695,9 @@ bool wxTextCtrl::SetForegroundColour(const wxColour& colour)
|
||||
|
||||
bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style)
|
||||
{
|
||||
#ifdef __WXWINE__
|
||||
return FALSE;
|
||||
#else
|
||||
if ( !IsRich() )
|
||||
{
|
||||
// can't do it with normal text control
|
||||
@ -1810,6 +1827,7 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style)
|
||||
}
|
||||
|
||||
return ok;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool wxTextCtrl::SetDefaultStyle(const wxTextAttr& style)
|
||||
|
@ -883,6 +883,7 @@ bool wxShutdown(wxShutdownFlags wFlags)
|
||||
bOK = ::OpenProcessToken(GetCurrentProcess(),
|
||||
TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
|
||||
&hToken) != 0;
|
||||
#ifndef __WXWINE__
|
||||
if ( bOK )
|
||||
{
|
||||
TOKEN_PRIVILEGES tkp;
|
||||
@ -901,6 +902,7 @@ bool wxShutdown(wxShutdownFlags wFlags)
|
||||
// Cannot test the return value of AdjustTokenPrivileges.
|
||||
bOK = ::GetLastError() == ERROR_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( bOK )
|
||||
|
@ -341,6 +341,10 @@ wxPipeInputStream::~wxPipeInputStream()
|
||||
|
||||
bool wxPipeInputStream::IsAvailable() const
|
||||
{
|
||||
// FIXME
|
||||
#ifdef __WXWINE__
|
||||
return FALSE;
|
||||
#else
|
||||
if ( !IsOpened() )
|
||||
return FALSE;
|
||||
|
||||
@ -374,6 +378,7 @@ bool wxPipeInputStream::IsAvailable() const
|
||||
}
|
||||
|
||||
return nAvailable != 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t wxPipeInputStream::OnSysRead(void *buffer, size_t len)
|
||||
|
@ -1457,11 +1457,15 @@ void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect)
|
||||
|
||||
void wxWindowMSW::Update()
|
||||
{
|
||||
#ifdef __WXWINE__
|
||||
::UpdateWindow(GetHwnd());
|
||||
#else
|
||||
if ( !::UpdateWindow(GetHwnd()) )
|
||||
{
|
||||
wxLogLastError(_T("UpdateWindow"));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__WIN32__) && !defined(__WXMICROWIN__)
|
||||
// just calling UpdateWindow() is not enough, what we did in our WM_PAINT
|
||||
// handler needs to be really drawn right now
|
||||
|
Loading…
Reference in New Issue
Block a user