Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7ea39932
Commit
7ea39932
authored
Mar 11, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add ITextServices stdcall wrappers.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5e222aff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
10 deletions
+102
-10
editor.h
dlls/riched20/editor.h
+28
-3
editstr.h
dlls/riched20/editstr.h
+0
-4
txthost.c
dlls/riched20/txthost.c
+5
-3
txtsrv.c
dlls/riched20/txtsrv.c
+69
-0
No files found.
dlls/riched20/editor.h
View file @
7ea39932
...
...
@@ -318,10 +318,11 @@ static inline ME_DisplayItem *cell_get_di(ME_Cell *cell)
/* txthost.c */
#ifdef __ASM_USE_THISCALL_WRAPPER
#define TXTHOST_VTABLE(This) (&itextHostStdcallVtbl)
#else
/* __i386__ */
extern
const
struct
ITextHostVtbl
text_host_stdcall_vtbl
DECLSPEC_HIDDEN
;
#define TXTHOST_VTABLE(This) (&text_host_stdcall_vtbl)
#else
#define TXTHOST_VTABLE(This) (This)->lpVtbl
#endif
/* __i386__ */
#endif
/*** ITextHost methods ***/
#define ITextHost_TxGetDC(This) TXTHOST_VTABLE(This)->TxGetDC(This)
#define ITextHost_TxReleaseDC(This,a) TXTHOST_VTABLE(This)->TxReleaseDC(This,a)
...
...
@@ -379,6 +380,30 @@ void ME_EmptyUndoStack(ME_TextEditor *editor) DECLSPEC_HIDDEN;
/* txtsrv.c */
HRESULT
create_text_services
(
IUnknown
*
outer
,
ITextHost
*
text_host
,
IUnknown
**
unk
,
BOOL
emulate_10
,
ME_TextEditor
**
editor
)
DECLSPEC_HIDDEN
;
#ifdef __ASM_USE_THISCALL_WRAPPER
extern
const
struct
ITextServicesVtbl
text_services_stdcall_vtbl
DECLSPEC_HIDDEN
;
#define TXTSERV_VTABLE(This) (&text_services_stdcall_vtbl)
#else
#define TXTSERV_VTABLE(This) (This)->lpVtbl
#endif
#define ITextServices_TxSendMessage(This,a,b,c,d) TXTSERV_VTABLE(This)->TxSendMessage(This,a,b,c,d)
#define ITextServices_TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l) TXTSERV_VTABLE(This)->ITextServices_TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l)
#define ITextServices_TxGetHScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetHScroll(This,a,b,c,d,e)
#define ITextServices_TxGetVScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetVScroll(This,a,b,c,d,e)
#define ITextServices_OnTxSetCursor(This,a,b,c,d,e,f,g,h,i) TXTSERV_VTABLE(This)->OnTxSetCursor(This,a,b,c,d,e,f,g,h,i)
#define ITextServices_TxQueryHitPoint(This,a,b,c,d,e,f,g,h,i,j) TXTSERV_VTABLE(This)->TxQueryHitPoint(This,a,b,c,d,e,f,g,h,i,j)
#define ITextServices_OnTxInplaceActivate(This,a) TXTSERV_VTABLE(This)->OnTxInplaceActivate(This,a)
#define ITextServices_OnTxInplaceDeactivate(This) TXTSERV_VTABLE(This)->OnTxInplaceDeactivate(This)
#define ITextServices_OnTxUIActivate(This) TXTSERV_VTABLE(This)->OnTxUIActivate(This)
#define ITextServices_OnTxUIDeactivate(This) TXTSERV_VTABLE(This)->OnTxUIDeactivate(This)
#define ITextServices_TxGetText(This,a) TXTSERV_VTABLE(This)->TxGetText(This,a)
#define ITextServices_TxSetText(This,a) TXTSERV_VTABLE(This)->TxSetText(This,a)
#define ITextServices_TxGetCurTargetX(This,a) TXTSERV_VTABLE(This)->TxGetCurTargetX(This,a)
#define ITextServices_TxGetBaseLinePos(This,a) TXTSERV_VTABLE(This)->TxGetBaseLinePos(This,a)
#define ITextServices_TxGetNaturalSize(This,a,b,c,d,e,f,g,h) TXTSERV_VTABLE(This)->TxGetNaturalSize(This,a,b,c,d,e,f,g,h)
#define ITextServices_TxGetDropTarget(This,a) TXTSERV_VTABLE(This)->TxGetDropTarget(This,a)
#define ITextServices_OnTxPropertyBitsChange(This,a,b) TXTSERV_VTABLE(This)->OnTxPropertyBitsChange(This,a,b)
#define ITextServices_TxGetCachedSize(This,a,b) TXTSERV_VTABLE(This)->TxGetCachedSize(This,a,b)
/* writer.c */
LRESULT
ME_StreamOutRange
(
ME_TextEditor
*
editor
,
DWORD
dwFormat
,
const
ME_Cursor
*
start
,
int
nChars
,
EDITSTREAM
*
stream
)
DECLSPEC_HIDDEN
;
...
...
dlls/riched20/editstr.h
View file @
7ea39932
...
...
@@ -49,10 +49,6 @@
#include "wine/list.h"
#include "wine/rbtree.h"
#ifdef __ASM_USE_THISCALL_WRAPPER
extern
const
struct
ITextHostVtbl
itextHostStdcallVtbl
DECLSPEC_HIDDEN
;
#endif
/* __i386__ */
typedef
struct
tagME_String
{
WCHAR
*
szData
;
...
...
dlls/riched20/txthost.c
View file @
7ea39932
...
...
@@ -584,7 +584,8 @@ DEFINE_STDCALL_WRAPPER(39,ITextHostImpl_TxImmGetContext,4)
DEFINE_STDCALL_WRAPPER
(
40
,
ITextHostImpl_TxImmReleaseContext
,
8
)
DEFINE_STDCALL_WRAPPER
(
41
,
ITextHostImpl_TxGetSelectionBarWidth
,
8
)
const
ITextHostVtbl
itextHostStdcallVtbl
=
{
const
ITextHostVtbl
text_host_stdcall_vtbl
=
{
NULL
,
NULL
,
NULL
,
...
...
@@ -629,9 +630,10 @@ const ITextHostVtbl itextHostStdcallVtbl = {
STDCALL
(
ITextHostImpl_TxGetSelectionBarWidth
),
};
#endif
/* __
i386__
*/
#endif
/* __
ASM_USE_THISCALL_WRAPPER
*/
static
const
ITextHostVtbl
textHostVtbl
=
{
static
const
ITextHostVtbl
textHostVtbl
=
{
ITextHostImpl_QueryInterface
,
ITextHostImpl_AddRef
,
ITextHostImpl_Release
,
...
...
dlls/riched20/txtsrv.c
View file @
7ea39932
...
...
@@ -339,6 +339,75 @@ DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetCachedSize(ITextServices *ifac
return
E_NOTIMPL
;
}
#ifdef __ASM_USE_THISCALL_WRAPPER
#define STDCALL(func) (void *) __stdcall_ ## func
#ifdef _MSC_VER
#define DEFINE_STDCALL_WRAPPER(num,func) \
__declspec(naked) HRESULT __stdcall_##func(void) \
{ \
__asm pop eax \
__asm pop ecx \
__asm push eax \
__asm mov eax, [ecx] \
__asm jmp dword ptr [eax + 4*num] \
}
#else
/* _MSC_VER */
#define DEFINE_STDCALL_WRAPPER(num,func) \
extern HRESULT __stdcall_ ## func(void); \
__ASM_GLOBAL_FUNC(__stdcall_ ## func, \
"popl %eax\n\t" \
"popl %ecx\n\t" \
"pushl %eax\n\t" \
"movl (%ecx), %eax\n\t" \
"jmp *(4*(" #num "))(%eax)" )
#endif
/* _MSC_VER */
DEFINE_STDCALL_WRAPPER
(
3
,
ITextServices_TxSendMessage
)
DEFINE_STDCALL_WRAPPER
(
4
,
ITextServices_TxDraw
)
DEFINE_STDCALL_WRAPPER
(
5
,
ITextServices_TxGetHScroll
)
DEFINE_STDCALL_WRAPPER
(
6
,
ITextServices_TxGetVScroll
)
DEFINE_STDCALL_WRAPPER
(
7
,
ITextServices_OnTxSetCursor
)
DEFINE_STDCALL_WRAPPER
(
8
,
ITextServices_TxQueryHitPoint
)
DEFINE_STDCALL_WRAPPER
(
9
,
ITextServices_OnTxInplaceActivate
)
DEFINE_STDCALL_WRAPPER
(
10
,
ITextServices_OnTxInplaceDeactivate
)
DEFINE_STDCALL_WRAPPER
(
11
,
ITextServices_OnTxUIActivate
)
DEFINE_STDCALL_WRAPPER
(
12
,
ITextServices_OnTxUIDeactivate
)
DEFINE_STDCALL_WRAPPER
(
13
,
ITextServices_TxGetText
)
DEFINE_STDCALL_WRAPPER
(
14
,
ITextServices_TxSetText
)
DEFINE_STDCALL_WRAPPER
(
15
,
ITextServices_TxGetCurTargetX
)
DEFINE_STDCALL_WRAPPER
(
16
,
ITextServices_TxGetBaseLinePos
)
DEFINE_STDCALL_WRAPPER
(
17
,
ITextServices_TxGetNaturalSize
)
DEFINE_STDCALL_WRAPPER
(
18
,
ITextServices_TxGetDropTarget
)
DEFINE_STDCALL_WRAPPER
(
19
,
ITextServices_OnTxPropertyBitsChange
)
DEFINE_STDCALL_WRAPPER
(
20
,
ITextServices_TxGetCachedSize
)
const
ITextServicesVtbl
text_services_stdcall_vtbl
=
{
NULL
,
NULL
,
NULL
,
STDCALL
(
ITextServices_TxSendMessage
),
STDCALL
(
ITextServices_TxDraw
),
STDCALL
(
ITextServices_TxGetHScroll
),
STDCALL
(
ITextServices_TxGetVScroll
),
STDCALL
(
ITextServices_OnTxSetCursor
),
STDCALL
(
ITextServices_TxQueryHitPoint
),
STDCALL
(
ITextServices_OnTxInplaceActivate
),
STDCALL
(
ITextServices_OnTxInplaceDeactivate
),
STDCALL
(
ITextServices_OnTxUIActivate
),
STDCALL
(
ITextServices_OnTxUIDeactivate
),
STDCALL
(
ITextServices_TxGetText
),
STDCALL
(
ITextServices_TxSetText
),
STDCALL
(
ITextServices_TxGetCurTargetX
),
STDCALL
(
ITextServices_TxGetBaseLinePos
),
STDCALL
(
ITextServices_TxGetNaturalSize
),
STDCALL
(
ITextServices_TxGetDropTarget
),
STDCALL
(
ITextServices_OnTxPropertyBitsChange
),
STDCALL
(
ITextServices_TxGetCachedSize
),
};
#endif
/* __ASM_USE_THISCALL_WRAPPER */
static
const
ITextServicesVtbl
textservices_vtbl
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment