include: Use the __thiscall attribute directly for the Mingw build.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-05-16 13:53:33 +02:00
parent 10584d2057
commit 0a79eb3608
18 changed files with 137 additions and 177 deletions

View File

@ -4464,7 +4464,7 @@ void __cdecl ios_sync_with_stdio(void)
} }
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
#define DEFINE_VTBL_WRAPPER(off) \ #define DEFINE_VTBL_WRAPPER(off) \
__ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \ __ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \

View File

@ -28,7 +28,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvcp); WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
#define DEFINE_VTBL_WRAPPER(off) \ #define DEFINE_VTBL_WRAPPER(off) \
__ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \ __ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \

View File

@ -263,7 +263,7 @@ static void init_ ## type ## _cxx(char *base) \
#define DEFINE_CXX_DATA4(name, cl1, cl2, cl3, cl4, dtor) \ #define DEFINE_CXX_DATA4(name, cl1, cl2, cl3, cl4, dtor) \
DEFINE_CXX_DATA(name, 4, cl1, cl2, cl3, cl4, dtor) DEFINE_CXX_DATA(name, 4, cl1, cl2, cl3, cl4, dtor)
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (WINAPI*)type)&vtbl_wrapper_##off)args #define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (WINAPI*)type)&vtbl_wrapper_##off)args
@ -285,7 +285,7 @@ extern void *vtbl_wrapper_56;
#else #else
#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (__cdecl***)type)this)[0][off/4]args #define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (__thiscall***)type)this)[0][off/4]args
#endif #endif

View File

@ -970,7 +970,7 @@ void __cdecl __ExceptionPtrCreate(exception_ptr *ep)
ep->ref = NULL; ep->ref = NULL;
} }
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
extern void call_dtor(const cxx_exception_type *type, void *func, void *object); extern void call_dtor(const cxx_exception_type *type, void *func, void *object);
__ASM_GLOBAL_FUNC( call_dtor, __ASM_GLOBAL_FUNC( call_dtor,
@ -985,7 +985,7 @@ static inline void call_dtor(const cxx_exception_type *type, unsigned int dtor,
func(object); func(object);
} }
#else #else
#define call_dtor(type, func, object) ((void (__cdecl*)(void*))(func))(object) #define call_dtor(type, func, object) ((void (__thiscall*)(void*))(func))(object)
#endif #endif
/********************************************************************* /*********************************************************************

View File

@ -663,7 +663,7 @@ unsigned int __cdecl _Random_device(void)
#endif #endif
#if _MSVCP_VER >= 110 #if _MSVCP_VER >= 110
#if defined(__i386__) #if defined(__i386__) && !defined(__MINGW32__)
extern void *call_thiscall_func; extern void *call_thiscall_func;
__ASM_GLOBAL_FUNC(call_thiscall_func, __ASM_GLOBAL_FUNC(call_thiscall_func,

View File

@ -28,7 +28,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvcp); WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
#define DEFINE_VTBL_WRAPPER(off) \ #define DEFINE_VTBL_WRAPPER(off) \
__ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \ __ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \

View File

@ -1717,7 +1717,7 @@ void __cdecl __ExceptionPtrCreate(exception_ptr *ep)
ep->ref = NULL; ep->ref = NULL;
} }
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
extern void call_dtor(const cxx_exception_type *type, void *func, void *object); extern void call_dtor(const cxx_exception_type *type, void *func, void *object);
__ASM_GLOBAL_FUNC( call_dtor, __ASM_GLOBAL_FUNC( call_dtor,
@ -1732,7 +1732,7 @@ static inline void call_dtor(const cxx_exception_type *type, unsigned int dtor,
func(object); func(object);
} }
#else #else
#define call_dtor(type, func, object) ((void (__cdecl*)(void*))(func))(object) #define call_dtor(type, func, object) ((void (__thiscall*)(void*))(func))(object)
#endif #endif
/********************************************************************* /*********************************************************************

View File

@ -240,7 +240,7 @@ typedef struct
#endif #endif
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (WINAPI*)type)&vtbl_wrapper_##off)args #define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (WINAPI*)type)&vtbl_wrapper_##off)args
@ -260,7 +260,7 @@ extern void *vtbl_wrapper_48;
#else #else
#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (__cdecl***)type)this)[0][off/4]args #define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (__thiscall***)type)this)[0][off/4]args
#endif #endif

View File

@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
static int context_id = -1; static int context_id = -1;
static int scheduler_id = -1; static int scheduler_id = -1;
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
#define DEFINE_VTBL_WRAPPER(off) \ #define DEFINE_VTBL_WRAPPER(off) \
__ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \ __ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \

View File

@ -277,7 +277,7 @@ void ME_InitTableDef(ME_TextEditor *editor, struct RTFTable *tableDef) DECLSPEC_
/* txthost.c */ /* txthost.c */
ITextHost *ME_CreateTextHost(HWND hwnd, CREATESTRUCTW *cs, BOOL bEmulateVersion10) DECLSPEC_HIDDEN; ITextHost *ME_CreateTextHost(HWND hwnd, CREATESTRUCTW *cs, BOOL bEmulateVersion10) DECLSPEC_HIDDEN;
#ifdef __i386__ /* Use wrappers to perform thiscall on i386 */ #if defined(__i386__) && !defined(__MINGW32__) /* Use wrappers to perform thiscall on i386 */
#define TXTHOST_VTABLE(This) (&itextHostStdcallVtbl) #define TXTHOST_VTABLE(This) (&itextHostStdcallVtbl)
#else /* __i386__ */ #else /* __i386__ */
#define TXTHOST_VTABLE(This) (This)->lpVtbl #define TXTHOST_VTABLE(This) (This)->lpVtbl

View File

@ -51,7 +51,7 @@
#include "wine/heap.h" #include "wine/heap.h"
#include "wine/list.h" #include "wine/list.h"
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
extern const struct ITextHostVtbl itextHostStdcallVtbl DECLSPEC_HIDDEN; extern const struct ITextHostVtbl itextHostStdcallVtbl DECLSPEC_HIDDEN;
#endif /* __i386__ */ #endif /* __i386__ */

View File

@ -48,7 +48,7 @@ static PCreateTextServices pCreateTextServices;
/* Use a special table for x86 machines to convert the thiscall /* Use a special table for x86 machines to convert the thiscall
* calling convention. This isn't needed on other platforms. */ * calling convention. This isn't needed on other platforms. */
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
static ITextServicesVtbl itextServicesStdcallVtbl; static ITextServicesVtbl itextServicesStdcallVtbl;
#define TXTSERV_VTABLE(This) (&itextServicesStdcallVtbl) #define TXTSERV_VTABLE(This) (&itextServicesStdcallVtbl)
#else /* __i386__ */ #else /* __i386__ */
@ -129,24 +129,21 @@ static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface)
} }
} }
static HDC WINAPI ITextHostImpl_TxGetDC(ITextHost *iface) static HDC __thiscall ITextHostImpl_TxGetDC(ITextHost *iface)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetDC(%p)\n", This); TRACECALL("Call to TxGetDC(%p)\n", This);
return NULL; return NULL;
} }
static INT WINAPI ITextHostImpl_TxReleaseDC(ITextHost *iface, static INT __thiscall ITextHostImpl_TxReleaseDC(ITextHost *iface, HDC hdc)
HDC hdc)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxReleaseDC(%p)\n", This); TRACECALL("Call to TxReleaseDC(%p)\n", This);
return 0; return 0;
} }
static BOOL WINAPI ITextHostImpl_TxShowScrollBar(ITextHost *iface, static BOOL __thiscall ITextHostImpl_TxShowScrollBar(ITextHost *iface, INT fnBar, BOOL fShow)
INT fnBar,
BOOL fShow)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxShowScrollBar(%p, fnBar=%d, fShow=%d)\n", TRACECALL("Call to TxShowScrollBar(%p, fnBar=%d, fShow=%d)\n",
@ -154,9 +151,7 @@ static BOOL WINAPI ITextHostImpl_TxShowScrollBar(ITextHost *iface,
return FALSE; return FALSE;
} }
static BOOL WINAPI ITextHostImpl_TxEnableScrollBar(ITextHost *iface, static BOOL __thiscall ITextHostImpl_TxEnableScrollBar(ITextHost *iface, INT fuSBFlags, INT fuArrowflags)
INT fuSBFlags,
INT fuArrowflags)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxEnableScrollBar(%p, fuSBFlags=%d, fuArrowflags=%d)\n", TRACECALL("Call to TxEnableScrollBar(%p, fuSBFlags=%d, fuArrowflags=%d)\n",
@ -164,11 +159,8 @@ static BOOL WINAPI ITextHostImpl_TxEnableScrollBar(ITextHost *iface,
return FALSE; return FALSE;
} }
static BOOL WINAPI ITextHostImpl_TxSetScrollRange(ITextHost *iface, static BOOL __thiscall ITextHostImpl_TxSetScrollRange(ITextHost *iface, INT fnBar, LONG nMinPos,
INT fnBar, INT nMaxPos, BOOL fRedraw)
LONG nMinPos,
INT nMaxPos,
BOOL fRedraw)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetScrollRange(%p, fnBar=%d, nMinPos=%d, nMaxPos=%d, fRedraw=%d)\n", TRACECALL("Call to TxSetScrollRange(%p, fnBar=%d, nMinPos=%d, nMaxPos=%d, fRedraw=%d)\n",
@ -176,10 +168,7 @@ static BOOL WINAPI ITextHostImpl_TxSetScrollRange(ITextHost *iface,
return FALSE; return FALSE;
} }
static BOOL WINAPI ITextHostImpl_TxSetScrollPos(ITextHost *iface, static BOOL __thiscall ITextHostImpl_TxSetScrollPos(ITextHost *iface, INT fnBar, INT nPos, BOOL fRedraw)
INT fnBar,
INT nPos,
BOOL fRedraw)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetScrollPos(%p, fnBar=%d, nPos=%d, fRedraw=%d)\n", TRACECALL("Call to TxSetScrollPos(%p, fnBar=%d, nPos=%d, fRedraw=%d)\n",
@ -187,25 +176,21 @@ static BOOL WINAPI ITextHostImpl_TxSetScrollPos(ITextHost *iface,
return FALSE; return FALSE;
} }
static void WINAPI ITextHostImpl_TxInvalidateRect(ITextHost *iface, static void __thiscall ITextHostImpl_TxInvalidateRect(ITextHost *iface, LPCRECT prc, BOOL fMode)
LPCRECT prc,
BOOL fMode)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxInvalidateRect(%p, prc=%p, fMode=%d)\n", TRACECALL("Call to TxInvalidateRect(%p, prc=%p, fMode=%d)\n",
This, prc, fMode); This, prc, fMode);
} }
static void WINAPI ITextHostImpl_TxViewChange(ITextHost *iface, BOOL fUpdate) static void __thiscall ITextHostImpl_TxViewChange(ITextHost *iface, BOOL fUpdate)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxViewChange(%p, fUpdate=%d)\n", TRACECALL("Call to TxViewChange(%p, fUpdate=%d)\n",
This, fUpdate); This, fUpdate);
} }
static BOOL WINAPI ITextHostImpl_TxCreateCaret(ITextHost *iface, static BOOL __thiscall ITextHostImpl_TxCreateCaret(ITextHost *iface, HBITMAP hbmp, INT xWidth, INT yHeight)
HBITMAP hbmp,
INT xWidth, INT yHeight)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxCreateCaret(%p, nbmp=%p, xWidth=%d, yHeight=%d)\n", TRACECALL("Call to TxCreateCaret(%p, nbmp=%p, xWidth=%d, yHeight=%d)\n",
@ -213,7 +198,7 @@ static BOOL WINAPI ITextHostImpl_TxCreateCaret(ITextHost *iface,
return FALSE; return FALSE;
} }
static BOOL WINAPI ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow) static BOOL __thiscall ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxShowCaret(%p, fShow=%d)\n", TRACECALL("Call to TxShowCaret(%p, fShow=%d)\n",
@ -221,16 +206,14 @@ static BOOL WINAPI ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow)
return FALSE; return FALSE;
} }
static BOOL WINAPI ITextHostImpl_TxSetCaretPos(ITextHost *iface, static BOOL __thiscall ITextHostImpl_TxSetCaretPos(ITextHost *iface, INT x, INT y)
INT x, INT y)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetCaretPos(%p, x=%d, y=%d)\n", This, x, y); TRACECALL("Call to TxSetCaretPos(%p, x=%d, y=%d)\n", This, x, y);
return FALSE; return FALSE;
} }
static BOOL WINAPI ITextHostImpl_TxSetTimer(ITextHost *iface, static BOOL __thiscall ITextHostImpl_TxSetTimer(ITextHost *iface, UINT idTimer, UINT uTimeout)
UINT idTimer, UINT uTimeout)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetTimer(%p, idTimer=%u, uTimeout=%u)\n", TRACECALL("Call to TxSetTimer(%p, idTimer=%u, uTimeout=%u)\n",
@ -238,18 +221,14 @@ static BOOL WINAPI ITextHostImpl_TxSetTimer(ITextHost *iface,
return FALSE; return FALSE;
} }
static void WINAPI ITextHostImpl_TxKillTimer(ITextHost *iface, UINT idTimer) static void __thiscall ITextHostImpl_TxKillTimer(ITextHost *iface, UINT idTimer)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxKillTimer(%p, idTimer=%u)\n", This, idTimer); TRACECALL("Call to TxKillTimer(%p, idTimer=%u)\n", This, idTimer);
} }
static void WINAPI ITextHostImpl_TxScrollWindowEx(ITextHost *iface, static void __thiscall ITextHostImpl_TxScrollWindowEx(ITextHost *iface, INT dx, INT dy, LPCRECT lprcScroll,
INT dx, INT dy, LPCRECT lprcClip, HRGN hRgnUpdate, LPRECT lprcUpdate,
LPCRECT lprcScroll,
LPCRECT lprcClip,
HRGN hRgnUpdate,
LPRECT lprcUpdate,
UINT fuScroll) UINT fuScroll)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
@ -257,77 +236,68 @@ static void WINAPI ITextHostImpl_TxScrollWindowEx(ITextHost *iface,
This, dx, dy, lprcScroll, lprcClip, hRgnUpdate, lprcUpdate, fuScroll); This, dx, dy, lprcScroll, lprcClip, hRgnUpdate, lprcUpdate, fuScroll);
} }
static void WINAPI ITextHostImpl_TxSetCapture(ITextHost *iface, BOOL fCapture) static void __thiscall ITextHostImpl_TxSetCapture(ITextHost *iface, BOOL fCapture)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetCapture(%p, fCapture=%d)\n", This, fCapture); TRACECALL("Call to TxSetCapture(%p, fCapture=%d)\n", This, fCapture);
} }
static void WINAPI ITextHostImpl_TxSetFocus(ITextHost *iface) static void __thiscall ITextHostImpl_TxSetFocus(ITextHost *iface)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetFocus(%p)\n", This); TRACECALL("Call to TxSetFocus(%p)\n", This);
} }
static void WINAPI ITextHostImpl_TxSetCursor(ITextHost *iface, static void __thiscall ITextHostImpl_TxSetCursor(ITextHost *iface, HCURSOR hcur, BOOL fText)
HCURSOR hcur,
BOOL fText)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxSetCursor(%p, hcur=%p, fText=%d)\n", TRACECALL("Call to TxSetCursor(%p, hcur=%p, fText=%d)\n",
This, hcur, fText); This, hcur, fText);
} }
static BOOL WINAPI ITextHostImpl_TxScreenToClient(ITextHost *iface, static BOOL __thiscall ITextHostImpl_TxScreenToClient(ITextHost *iface, LPPOINT lppt)
LPPOINT lppt)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxScreenToClient(%p, lppt=%p)\n", This, lppt); TRACECALL("Call to TxScreenToClient(%p, lppt=%p)\n", This, lppt);
return FALSE; return FALSE;
} }
static BOOL WINAPI ITextHostImpl_TxClientToScreen(ITextHost *iface, static BOOL __thiscall ITextHostImpl_TxClientToScreen(ITextHost *iface, LPPOINT lppt)
LPPOINT lppt)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxClientToScreen(%p, lppt=%p)\n", This, lppt); TRACECALL("Call to TxClientToScreen(%p, lppt=%p)\n", This, lppt);
return FALSE; return FALSE;
} }
static HRESULT WINAPI ITextHostImpl_TxActivate(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxActivate(ITextHost *iface, LONG *plOldState)
LONG *plOldState)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxActivate(%p, plOldState=%p)\n", This, plOldState); TRACECALL("Call to TxActivate(%p, plOldState=%p)\n", This, plOldState);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxDeactivate(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxDeactivate(ITextHost *iface, LONG lNewState)
LONG lNewState)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxDeactivate(%p, lNewState=%d)\n", This, lNewState); TRACECALL("Call to TxDeactivate(%p, lNewState=%d)\n", This, lNewState);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxGetClientRect(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetClientRect(ITextHost *iface, LPRECT prc)
LPRECT prc)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetClientRect(%p, prc=%p)\n", This, prc); TRACECALL("Call to TxGetClientRect(%p, prc=%p)\n", This, prc);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxGetViewInset(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetViewInset(ITextHost *iface, LPRECT prc)
LPRECT prc)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetViewInset(%p, prc=%p)\n", This, prc); TRACECALL("Call to TxGetViewInset(%p, prc=%p)\n", This, prc);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetCharFormat(ITextHost *iface, const CHARFORMATW **ppCF)
const CHARFORMATW **ppCF)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetCharFormat(%p, ppCF=%p)\n", This, ppCF); TRACECALL("Call to TxGetCharFormat(%p, ppCF=%p)\n", This, ppCF);
@ -335,40 +305,35 @@ static HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface,
return S_OK; return S_OK;
} }
static HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetParaFormat(ITextHost *iface, const PARAFORMAT **ppPF)
const PARAFORMAT **ppPF)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetParaFormat(%p, ppPF=%p)\n", This, ppPF); TRACECALL("Call to TxGetParaFormat(%p, ppPF=%p)\n", This, ppPF);
return E_NOTIMPL; return E_NOTIMPL;
} }
static COLORREF WINAPI ITextHostImpl_TxGetSysColor(ITextHost *iface, static COLORREF __thiscall ITextHostImpl_TxGetSysColor(ITextHost *iface, int nIndex)
int nIndex)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetSysColor(%p, nIndex=%d)\n", This, nIndex); TRACECALL("Call to TxGetSysColor(%p, nIndex=%d)\n", This, nIndex);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxGetBackStyle(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetBackStyle(ITextHost *iface, TXTBACKSTYLE *pStyle)
TXTBACKSTYLE *pStyle)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetBackStyle(%p, pStyle=%p)\n", This, pStyle); TRACECALL("Call to TxGetBackStyle(%p, pStyle=%p)\n", This, pStyle);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxGetMaxLength(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetMaxLength(ITextHost *iface, DWORD *pLength)
DWORD *pLength)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetMaxLength(%p, pLength=%p)\n", This, pLength); TRACECALL("Call to TxGetMaxLength(%p, pLength=%p)\n", This, pLength);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxGetScrollBars(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetScrollBars(ITextHost *iface, DWORD *pdwScrollBar)
DWORD *pdwScrollBar)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetScrollBars(%p, pdwScrollBar=%p)\n", TRACECALL("Call to TxGetScrollBars(%p, pdwScrollBar=%p)\n",
@ -376,40 +341,35 @@ static HRESULT WINAPI ITextHostImpl_TxGetScrollBars(ITextHost *iface,
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxGetPasswordChar(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetPasswordChar(ITextHost *iface, WCHAR *pch)
WCHAR *pch)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetPasswordChar(%p, pch=%p)\n", This, pch); TRACECALL("Call to TxGetPasswordChar(%p, pch=%p)\n", This, pch);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface, LONG *pch)
LONG *pch)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetAcceleratorPos(%p, pch=%p)\n", This, pch); TRACECALL("Call to TxGetAcceleratorPos(%p, pch=%p)\n", This, pch);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_TxGetExtent(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetExtent(ITextHost *iface, LPSIZEL lpExtent)
LPSIZEL lpExtent)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetExtent(%p, lpExtent=%p)\n", This, lpExtent); TRACECALL("Call to TxGetExtent(%p, lpExtent=%p)\n", This, lpExtent);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_OnTxCharFormatChange(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_OnTxCharFormatChange(ITextHost *iface, const CHARFORMATW *pcf)
const CHARFORMATW *pcf)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to OnTxCharFormatChange(%p, pcf=%p)\n", This, pcf); TRACECALL("Call to OnTxCharFormatChange(%p, pcf=%p)\n", This, pcf);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ITextHostImpl_OnTxParaFormatChange(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_OnTxParaFormatChange(ITextHost *iface, const PARAFORMAT *ppf)
const PARAFORMAT *ppf)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to OnTxParaFormatChange(%p, ppf=%p)\n", This, ppf); TRACECALL("Call to OnTxParaFormatChange(%p, ppf=%p)\n", This, ppf);
@ -418,9 +378,7 @@ static HRESULT WINAPI ITextHostImpl_OnTxParaFormatChange(ITextHost *iface,
/* This must return S_OK for the native ITextServices object to /* This must return S_OK for the native ITextServices object to
initialize. */ initialize. */
static HRESULT WINAPI ITextHostImpl_TxGetPropertyBits(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetPropertyBits(ITextHost *iface, DWORD dwMask, DWORD *pdwBits)
DWORD dwMask,
DWORD *pdwBits)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetPropertyBits(%p, dwMask=0x%08x, pdwBits=%p)\n", TRACECALL("Call to TxGetPropertyBits(%p, dwMask=0x%08x, pdwBits=%p)\n",
@ -429,22 +387,21 @@ static HRESULT WINAPI ITextHostImpl_TxGetPropertyBits(ITextHost *iface,
return S_OK; return S_OK;
} }
static HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface, DWORD iNotify, static HRESULT __thiscall ITextHostImpl_TxNotify(ITextHost *iface, DWORD iNotify, void *pv)
void *pv)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxNotify(%p, iNotify=%d, pv=%p)\n", This, iNotify, pv); TRACECALL("Call to TxNotify(%p, iNotify=%d, pv=%p)\n", This, iNotify, pv);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HIMC WINAPI ITextHostImpl_TxImmGetContext(ITextHost *iface) static HIMC __thiscall ITextHostImpl_TxImmGetContext(ITextHost *iface)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxImmGetContext(%p)\n", This); TRACECALL("Call to TxImmGetContext(%p)\n", This);
return 0; return 0;
} }
static void WINAPI ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc) static void __thiscall ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxImmReleaseContext(%p, himc=%p)\n", This, himc); TRACECALL("Call to TxImmReleaseContext(%p, himc=%p)\n", This, himc);
@ -453,8 +410,7 @@ static void WINAPI ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc
/* This function must set the variable pointed to by *lSelBarWidth. /* This function must set the variable pointed to by *lSelBarWidth.
Otherwise an uninitialized value will be used to calculate Otherwise an uninitialized value will be used to calculate
positions and sizes even if E_NOTIMPL is returned. */ positions and sizes even if E_NOTIMPL is returned. */
static HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface, static HRESULT __thiscall ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface, LONG *lSelBarWidth)
LONG *lSelBarWidth)
{ {
ITextHostTestImpl *This = impl_from_ITextHost(iface); ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetSelectionBarWidth(%p, lSelBarWidth=%p)\n", TRACECALL("Call to TxGetSelectionBarWidth(%p, lSelBarWidth=%p)\n",
@ -536,7 +492,7 @@ typedef struct
static void setup_thiscall_wrappers(void) static void setup_thiscall_wrappers(void)
{ {
#ifdef __i386__ #if defined(__i386__) && !defined(__MINGW32__)
void** pVtable; void** pVtable;
void** pVtableEnd; void** pVtableEnd;
THISCALL_TO_STDCALL_THUNK *thunk; THISCALL_TO_STDCALL_THUNK *thunk;

View File

@ -525,7 +525,7 @@ DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetSelectionBarWidth(ITextHos
} }
#ifdef __i386__ /* thiscall functions are i386-specific */ #if defined(__i386__) && !defined(__MINGW32__) /* thiscall functions are i386-specific */
#define STDCALL(func) (void *) __stdcall_ ## func #define STDCALL(func) (void *) __stdcall_ ## func
#ifdef _MSC_VER #ifdef _MSC_VER

View File

@ -98,6 +98,8 @@ DECLARE_INTERFACE_(IMILBitmapScaler,IMILBitmapSource)
}; };
#undef INTERFACE #undef INTERFACE
#define THISCALLMETHOD_(type,method) type (__thiscall *method)
#define INTERFACE IMILUnknown1 #define INTERFACE IMILUnknown1
DECLARE_INTERFACE_(IMILUnknown1,IUnknown) DECLARE_INTERFACE_(IMILUnknown1,IUnknown)
{ {
@ -105,19 +107,14 @@ DECLARE_INTERFACE_(IMILUnknown1,IUnknown)
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE; STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** thiscall method ***/ THISCALLMETHOD_(void,unknown1)(THIS_ void*) PURE;
STDMETHOD_(void,unknown1)(THIS_ void*) PURE;
/*** stdcall ***/
STDMETHOD_(HRESULT,unknown2)(THIS_ void*, void*) PURE; STDMETHOD_(HRESULT,unknown2)(THIS_ void*, void*) PURE;
/*** thiscall method ***/ THISCALLMETHOD_(HRESULT,unknown3)(THIS_ void*) PURE;
STDMETHOD_(HRESULT,unknown3)(THIS_ void*) PURE;
/*** stdcall ***/
STDMETHOD_(HRESULT,unknown4)(THIS_ void*) PURE; STDMETHOD_(HRESULT,unknown4)(THIS_ void*) PURE;
STDMETHOD_(HRESULT,unknown5)(THIS_ void*) PURE; STDMETHOD_(HRESULT,unknown5)(THIS_ void*) PURE;
STDMETHOD_(HRESULT,unknown6)(THIS_ DWORD64) PURE; STDMETHOD_(HRESULT,unknown6)(THIS_ DWORD64) PURE;
STDMETHOD_(HRESULT,unknown7)(THIS_ void*) PURE; STDMETHOD_(HRESULT,unknown7)(THIS_ void*) PURE;
/*** thiscall method ***/ THISCALLMETHOD_(HRESULT,unknown8)(THIS) PURE;
STDMETHOD_(HRESULT,unknown8)(THIS) PURE;
}; };
#undef INTERFACE #undef INTERFACE

View File

@ -23,6 +23,12 @@
extern "C" { extern "C" {
#endif #endif
#ifdef __cplusplus
#define THISCALLMETHOD_(type,method) virtual type __thiscall method
#else
#define THISCALLMETHOD_(type,method) type (__thiscall *method)
#endif
EXTERN_C const IID IID_ITextServices; EXTERN_C const IID IID_ITextServices;
EXTERN_C const IID IID_ITextHost; EXTERN_C const IID IID_ITextHost;
@ -43,10 +49,10 @@ DECLARE_INTERFACE_(ITextServices,IUnknown)
/*** ITextServices methods ***/ /*** ITextServices methods ***/
STDMETHOD(TxSendMessage)( THIS_ THISCALLMETHOD_(HRESULT,TxSendMessage)( THIS_
UINT msg, WPARAM wparam, LPARAM lparam, LRESULT* plresult) PURE; UINT msg, WPARAM wparam, LPARAM lparam, LRESULT* plresult) PURE;
STDMETHOD(TxDraw)( THIS_ THISCALLMETHOD_(HRESULT,TxDraw)( THIS_
DWORD dwDrawAspect, DWORD dwDrawAspect,
LONG lindex, LONG lindex,
void* pvAspect, void* pvAspect,
@ -60,21 +66,21 @@ DECLARE_INTERFACE_(ITextServices,IUnknown)
DWORD dwContinue, DWORD dwContinue,
LONG lViewId) PURE; LONG lViewId) PURE;
STDMETHOD(TxGetHScroll)( THIS_ THISCALLMETHOD_(HRESULT,TxGetHScroll)( THIS_
LONG* plMin, LONG* plMin,
LONG* plMax, LONG* plMax,
LONG* plPos, LONG* plPos,
LONG* plPage, LONG* plPage,
BOOL* pfEnabled) PURE; BOOL* pfEnabled) PURE;
STDMETHOD(TxGetVScroll)( THIS_ THISCALLMETHOD_(HRESULT,TxGetVScroll)( THIS_
LONG* plMin, LONG* plMin,
LONG* plMax, LONG* plMax,
LONG* plPos, LONG* plPos,
LONG* plPage, LONG* plPage,
BOOL* pfEnabled) PURE; BOOL* pfEnabled) PURE;
STDMETHOD(OnTxSetCursor)( THIS_ THISCALLMETHOD_(HRESULT,OnTxSetCursor)( THIS_
DWORD dwDrawAspect, DWORD dwDrawAspect,
LONG lindex, LONG lindex,
void* pvAspect, void* pvAspect,
@ -85,7 +91,7 @@ DECLARE_INTERFACE_(ITextServices,IUnknown)
INT x, INT x,
INT y) PURE; INT y) PURE;
STDMETHOD(TxQueryHitPoint)( THIS_ THISCALLMETHOD_(HRESULT,TxQueryHitPoint)( THIS_
DWORD dwDrawAspect, DWORD dwDrawAspect,
LONG lindex, LONG lindex,
void* pvAspect, void* pvAspect,
@ -97,28 +103,28 @@ DECLARE_INTERFACE_(ITextServices,IUnknown)
INT y, INT y,
DWORD* pHitResult) PURE; DWORD* pHitResult) PURE;
STDMETHOD(OnTxInplaceActivate)( THIS_ THISCALLMETHOD_(HRESULT,OnTxInplaceActivate)( THIS_
LPCRECT prcClient) PURE; LPCRECT prcClient) PURE;
STDMETHOD(OnTxInplaceDeactivate)( THIS ) PURE; THISCALLMETHOD_(HRESULT,OnTxInplaceDeactivate)( THIS ) PURE;
STDMETHOD(OnTxUIActivate)( THIS ) PURE; THISCALLMETHOD_(HRESULT,OnTxUIActivate)( THIS ) PURE;
STDMETHOD(OnTxUIDeactivate)( THIS ) PURE; THISCALLMETHOD_(HRESULT,OnTxUIDeactivate)( THIS ) PURE;
STDMETHOD(TxGetText)( THIS_ THISCALLMETHOD_(HRESULT,TxGetText)( THIS_
BSTR* pbstrText) PURE; BSTR* pbstrText) PURE;
STDMETHOD(TxSetText)( THIS_ THISCALLMETHOD_(HRESULT,TxSetText)( THIS_
LPCWSTR pszText) PURE; LPCWSTR pszText) PURE;
STDMETHOD(TxGetCurTargetX)( THIS_ THISCALLMETHOD_(HRESULT,TxGetCurTargetX)( THIS_
LONG* x) PURE; LONG* x) PURE;
STDMETHOD(TxGetBaseLinePos)( THIS_ THISCALLMETHOD_(HRESULT,TxGetBaseLinePos)( THIS_
LONG* x) PURE; LONG* x) PURE;
STDMETHOD(TxGetNaturalSize)( THIS_ THISCALLMETHOD_(HRESULT,TxGetNaturalSize)( THIS_
DWORD dwAspect, DWORD dwAspect,
HDC hdcDraw, HDC hdcDraw,
HDC hicTargetDev, HDC hicTargetDev,
@ -128,14 +134,14 @@ DECLARE_INTERFACE_(ITextServices,IUnknown)
LONG* pwidth, LONG* pwidth,
LONG* pheight) PURE; LONG* pheight) PURE;
STDMETHOD(TxGetDropTarget)( THIS_ THISCALLMETHOD_(HRESULT,TxGetDropTarget)( THIS_
IDropTarget** ppDropTarget) PURE; IDropTarget** ppDropTarget) PURE;
STDMETHOD(OnTxPropertyBitsChange)( THIS_ THISCALLMETHOD_(HRESULT,OnTxPropertyBitsChange)( THIS_
DWORD dwMask, DWORD dwMask,
DWORD dwBits) PURE; DWORD dwBits) PURE;
STDMETHOD(TxGetCachedSize)( THIS_ THISCALLMETHOD_(HRESULT,TxGetCachedSize)( THIS_
DWORD* pdwWidth, DWORD* pdwWidth,
DWORD* pdwHeight) PURE; DWORD* pdwHeight) PURE;
@ -210,58 +216,58 @@ DECLARE_INTERFACE_(ITextHost,IUnknown)
STDMETHOD_(ULONG,Release)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** ITextHost methods ***/ /*** ITextHost methods ***/
STDMETHOD_(HDC,TxGetDC)( THIS THISCALLMETHOD_(HDC,TxGetDC)( THIS
) PURE; ) PURE;
STDMETHOD_(INT,TxReleaseDC)( THIS_ THISCALLMETHOD_(INT,TxReleaseDC)( THIS_
HDC hdc) PURE; HDC hdc) PURE;
STDMETHOD_(BOOL,TxShowScrollBar)( THIS_ THISCALLMETHOD_(BOOL,TxShowScrollBar)( THIS_
INT fnBar, INT fnBar,
BOOL fShow) PURE; BOOL fShow) PURE;
STDMETHOD_(BOOL,TxEnableScrollBar)( THIS_ THISCALLMETHOD_(BOOL,TxEnableScrollBar)( THIS_
INT fuSBFlags, INT fuSBFlags,
INT fuArrowflags) PURE; INT fuArrowflags) PURE;
STDMETHOD_(BOOL,TxSetScrollRange)( THIS_ THISCALLMETHOD_(BOOL,TxSetScrollRange)( THIS_
INT fnBar, INT fnBar,
LONG nMinPos, LONG nMinPos,
INT nMaxPos, INT nMaxPos,
BOOL fRedraw) PURE; BOOL fRedraw) PURE;
STDMETHOD_(BOOL,TxSetScrollPos)( THIS_ THISCALLMETHOD_(BOOL,TxSetScrollPos)( THIS_
INT fnBar, INT fnBar,
INT nPos, INT nPos,
BOOL fRedraw) PURE; BOOL fRedraw) PURE;
STDMETHOD_(void,TxInvalidateRect)( THIS_ THISCALLMETHOD_(void,TxInvalidateRect)( THIS_
LPCRECT prc, LPCRECT prc,
BOOL fMode) PURE; BOOL fMode) PURE;
STDMETHOD_(void,TxViewChange)( THIS_ THISCALLMETHOD_(void,TxViewChange)( THIS_
BOOL fUpdate) PURE; BOOL fUpdate) PURE;
STDMETHOD_(BOOL,TxCreateCaret)( THIS_ THISCALLMETHOD_(BOOL,TxCreateCaret)( THIS_
HBITMAP hbmp, HBITMAP hbmp,
INT xWidth, INT xWidth,
INT yHeight) PURE; INT yHeight) PURE;
STDMETHOD_(BOOL,TxShowCaret)( THIS_ THISCALLMETHOD_(BOOL,TxShowCaret)( THIS_
BOOL fShow) PURE; BOOL fShow) PURE;
STDMETHOD_(BOOL,TxSetCaretPos)( THIS_ THISCALLMETHOD_(BOOL,TxSetCaretPos)( THIS_
INT x, INT x,
INT y) PURE; INT y) PURE;
STDMETHOD_(BOOL,TxSetTimer)( THIS_ THISCALLMETHOD_(BOOL,TxSetTimer)( THIS_
UINT idTimer, UINT idTimer,
UINT uTimeout) PURE; UINT uTimeout) PURE;
STDMETHOD_(void,TxKillTimer)( THIS_ THISCALLMETHOD_(void,TxKillTimer)( THIS_
UINT idTimer) PURE; UINT idTimer) PURE;
STDMETHOD_(void,TxScrollWindowEx)( THIS_ THISCALLMETHOD_(void,TxScrollWindowEx)( THIS_
INT dx, INT dx,
INT dy, INT dy,
LPCRECT lprcScroll, LPCRECT lprcScroll,
@ -270,82 +276,82 @@ DECLARE_INTERFACE_(ITextHost,IUnknown)
LPRECT lprcUpdate, LPRECT lprcUpdate,
UINT fuScroll) PURE; UINT fuScroll) PURE;
STDMETHOD_(void,TxSetCapture)( THIS_ THISCALLMETHOD_(void,TxSetCapture)( THIS_
BOOL fCapture) PURE; BOOL fCapture) PURE;
STDMETHOD_(void,TxSetFocus)( THIS THISCALLMETHOD_(void,TxSetFocus)( THIS
) PURE; ) PURE;
STDMETHOD_(void,TxSetCursor)( THIS_ THISCALLMETHOD_(void,TxSetCursor)( THIS_
HCURSOR hcur, HCURSOR hcur,
BOOL fText) PURE; BOOL fText) PURE;
STDMETHOD_(BOOL,TxScreenToClient)( THIS_ THISCALLMETHOD_(BOOL,TxScreenToClient)( THIS_
LPPOINT lppt) PURE; LPPOINT lppt) PURE;
STDMETHOD_(BOOL,TxClientToScreen)( THIS_ THISCALLMETHOD_(BOOL,TxClientToScreen)( THIS_
LPPOINT lppt) PURE; LPPOINT lppt) PURE;
STDMETHOD(TxActivate)( THIS_ THISCALLMETHOD_(HRESULT,TxActivate)( THIS_
LONG* plOldState) PURE; LONG* plOldState) PURE;
STDMETHOD(TxDeactivate)( THIS_ THISCALLMETHOD_(HRESULT,TxDeactivate)( THIS_
LONG lNewState) PURE; LONG lNewState) PURE;
STDMETHOD(TxGetClientRect)( THIS_ THISCALLMETHOD_(HRESULT,TxGetClientRect)( THIS_
LPRECT prc) PURE; LPRECT prc) PURE;
STDMETHOD(TxGetViewInset)( THIS_ THISCALLMETHOD_(HRESULT,TxGetViewInset)( THIS_
LPRECT prc) PURE; LPRECT prc) PURE;
STDMETHOD(TxGetCharFormat)( THIS_ THISCALLMETHOD_(HRESULT,TxGetCharFormat)( THIS_
const CHARFORMATW** ppCF) PURE; const CHARFORMATW** ppCF) PURE;
STDMETHOD(TxGetParaFormat)( THIS_ THISCALLMETHOD_(HRESULT,TxGetParaFormat)( THIS_
const PARAFORMAT** ppPF) PURE; const PARAFORMAT** ppPF) PURE;
STDMETHOD_(COLORREF,TxGetSysColor)( THIS_ THISCALLMETHOD_(COLORREF,TxGetSysColor)( THIS_
int nIndex) PURE; int nIndex) PURE;
STDMETHOD(TxGetBackStyle)( THIS_ THISCALLMETHOD_(HRESULT,TxGetBackStyle)( THIS_
TXTBACKSTYLE* pStyle) PURE; TXTBACKSTYLE* pStyle) PURE;
STDMETHOD(TxGetMaxLength)( THIS_ THISCALLMETHOD_(HRESULT,TxGetMaxLength)( THIS_
DWORD* plength) PURE; DWORD* plength) PURE;
STDMETHOD(TxGetScrollBars)( THIS_ THISCALLMETHOD_(HRESULT,TxGetScrollBars)( THIS_
DWORD* pdwScrollBar) PURE; DWORD* pdwScrollBar) PURE;
STDMETHOD(TxGetPasswordChar)( THIS_ THISCALLMETHOD_(HRESULT,TxGetPasswordChar)( THIS_
WCHAR* pch) PURE; WCHAR* pch) PURE;
STDMETHOD(TxGetAcceleratorPos)( THIS_ THISCALLMETHOD_(HRESULT,TxGetAcceleratorPos)( THIS_
LONG* pch) PURE; LONG* pch) PURE;
STDMETHOD(TxGetExtent)( THIS_ THISCALLMETHOD_(HRESULT,TxGetExtent)( THIS_
LPSIZEL lpExtent) PURE; LPSIZEL lpExtent) PURE;
STDMETHOD(OnTxCharFormatChange)( THIS_ THISCALLMETHOD_(HRESULT,OnTxCharFormatChange)( THIS_
const CHARFORMATW* pcf) PURE; const CHARFORMATW* pcf) PURE;
STDMETHOD(OnTxParaFormatChange)( THIS_ THISCALLMETHOD_(HRESULT,OnTxParaFormatChange)( THIS_
const PARAFORMAT* ppf) PURE; const PARAFORMAT* ppf) PURE;
STDMETHOD(TxGetPropertyBits)( THIS_ THISCALLMETHOD_(HRESULT,TxGetPropertyBits)( THIS_
DWORD dwMask, DWORD dwMask,
DWORD* pdwBits) PURE; DWORD* pdwBits) PURE;
STDMETHOD(TxNotify)( THIS_ THISCALLMETHOD_(HRESULT,TxNotify)( THIS_
DWORD iNotify, DWORD iNotify,
void* pv) PURE; void* pv) PURE;
STDMETHOD_(HIMC,TxImmGetContext)( THIS THISCALLMETHOD_(HIMC,TxImmGetContext)( THIS
) PURE; ) PURE;
STDMETHOD_(void,TxImmReleaseContext)( THIS_ THISCALLMETHOD_(void,TxImmReleaseContext)( THIS_
HIMC himc) PURE; HIMC himc) PURE;
STDMETHOD(TxGetSelectionBarWidth)( THIS_ THISCALLMETHOD_(HRESULT,TxGetSelectionBarWidth)( THIS_
LONG* lSelBarWidth) PURE; LONG* lSelBarWidth) PURE;
}; };

View File

@ -106,6 +106,10 @@ extern "C" {
# endif # endif
#endif #endif
#ifndef __thiscall
# define __thiscall __stdcall
#endif
#ifndef __ms_va_list #ifndef __ms_va_list
# if (defined(__x86_64__) || defined(__aarch64__)) && defined (__GNUC__) # if (defined(__x86_64__) || defined(__aarch64__)) && defined (__GNUC__)
# define __ms_va_list __builtin_ms_va_list # define __ms_va_list __builtin_ms_va_list

View File

@ -90,14 +90,11 @@
/* thiscall support */ /* thiscall support */
#undef __thiscall #if defined(__i386__) && !defined(__MINGW32__)
#define __thiscall __stdcall
#ifdef __i386__
# ifdef _MSC_VER # ifdef _MSC_VER
# define DEFINE_THISCALL_WRAPPER(func,args) \ # define DEFINE_THISCALL_WRAPPER(func,args) \
__declspec(naked) HRESULT __thiscall_##func(void) \ __declspec(naked) void __thiscall_##func(void) \
{ __asm { \ { __asm { \
pop eax \ pop eax \
push ecx \ push ecx \
@ -107,7 +104,7 @@
# else /* _MSC_VER */ # else /* _MSC_VER */
# define DEFINE_THISCALL_WRAPPER(func,args) \ # define DEFINE_THISCALL_WRAPPER(func,args) \
extern void __thiscall_ ## func(void); \ extern void __thiscall_ ## func(void); \
__ASM_GLOBAL_FUNC( __thiscall_ ## func, \ __ASM_STDCALL_FUNC( __thiscall_ ## func, args, \
"popl %eax\n\t" \ "popl %eax\n\t" \
"pushl %ecx\n\t" \ "pushl %ecx\n\t" \
"pushl %eax\n\t" \ "pushl %eax\n\t" \

View File

@ -900,8 +900,8 @@ const char *get_link_name( const ORDDEF *odp )
if (target_platform == PLATFORM_WINDOWS) if (target_platform == PLATFORM_WINDOWS)
{ {
if (odp->flags & FLAG_THISCALL) ret = strmake( "__thiscall_%s", odp->link_name ); if (odp->flags & FLAG_THISCALL) return odp->link_name;
else if (odp->flags & FLAG_FASTCALL) ret = strmake( "@%s@%u", odp->link_name, get_args_size( odp )); if (odp->flags & FLAG_FASTCALL) ret = strmake( "@%s@%u", odp->link_name, get_args_size( odp ));
else if (!kill_at) ret = strmake( "%s@%u", odp->link_name, get_args_size( odp )); else if (!kill_at) ret = strmake( "%s@%u", odp->link_name, get_args_size( odp ));
else return odp->link_name; else return odp->link_name;
} }