41#define DEFINE_EXPECT(func) \
42 static UINT called_count_ ## func = 0
44#define INCREASE_CALL_COUNTER(func) \
46 called_count_ ## func++; \
49#define CHECK_CALLED(func) \
51 ok(called_count_ ## func, "expected " #func "\n"); \
54#define CHECK_NOT_CALLED(func) \
56 ok(!called_count_ ## func, "unexpected " #func "\n"); \
59#define CLEAR_COUNTER(func) \
60 called_count_ ## func = 0
72#if defined(__i386__) && !defined(__MINGW32__) && (!defined(_MSC_VER) || !defined(__clang__))
73static ITextServicesVtbl itextServicesStdcallVtbl;
74#define TXTSERV_VTABLE(This) (&itextServicesStdcallVtbl)
76#define TXTSERV_VTABLE(This) (This)->lpVtbl
79#define ITextServices_TxSendMessage(This,a,b,c,d) TXTSERV_VTABLE(This)->TxSendMessage(This,a,b,c,d)
80#define ITextServices_TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l) TXTSERV_VTABLE(This)->TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l)
81#define ITextServices_TxGetHScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetHScroll(This,a,b,c,d,e)
82#define ITextServices_TxGetVScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetVScroll(This,a,b,c,d,e)
83#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)
84#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)
85#define ITextServices_OnTxInPlaceActivate(This,a) TXTSERV_VTABLE(This)->OnTxInPlaceActivate(This,a)
86#define ITextServices_OnTxInPlaceDeactivate(This) TXTSERV_VTABLE(This)->OnTxInPlaceDeactivate(This)
87#define ITextServices_OnTxUIActivate(This) TXTSERV_VTABLE(This)->OnTxUIActivate(This)
88#define ITextServices_OnTxUIDeactivate(This) TXTSERV_VTABLE(This)->OnTxUIDeactivate(This)
89#define ITextServices_TxGetText(This,a) TXTSERV_VTABLE(This)->TxGetText(This,a)
90#define ITextServices_TxSetText(This,a) TXTSERV_VTABLE(This)->TxSetText(This,a)
91#define ITextServices_TxGetCurTargetX(This,a) TXTSERV_VTABLE(This)->TxGetCurTargetX(This,a)
92#define ITextServices_TxGetBaseLinePos(This,a) TXTSERV_VTABLE(This)->TxGetBaseLinePos(This,a)
93#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)
94#define ITextServices_TxGetDropTarget(This,a) TXTSERV_VTABLE(This)->TxGetDropTarget(This,a)
95#define ITextServices_OnTxPropertyBitsChange(This,a,b) TXTSERV_VTABLE(This)->OnTxPropertyBitsChange(This,a,b)
96#define ITextServices_TxGetCachedSize(This,a,b) TXTSERV_VTABLE(This)->TxGetCachedSize(This,a,b)
100#define TRACECALL if(winetest_debug > 1) trace
124static const WCHAR lorem[] =
L"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
125 "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. "
126 "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. "
127 "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
136 *ppvObject = &
This->ITextHost_iface;
137 ITextHost_AddRef((ITextHost *)*ppvObject);
184 TRACECALL(
"Call to TxShowScrollBar(%p, fnBar=%d, fShow=%d)\n",
192 TRACECALL(
"Call to TxEnableScrollBar(%p, fuSBFlags=%d, fuArrowflags=%d)\n",
193 This, fuSBFlags, fuArrowflags);
201 TRACECALL(
"Call to TxSetScrollRange(%p, fnBar=%d, nMinPos=%ld, nMaxPos=%d, fRedraw=%d)\n",
202 This, fnBar, nMinPos, nMaxPos, fRedraw);
209 TRACECALL(
"Call to TxSetScrollPos(%p, fnBar=%d, nPos=%d, fRedraw=%d)\n",
210 This, fnBar, nPos, fRedraw);
217 TRACECALL(
"Call to TxInvalidateRect(%p, prc=%p, fMode=%d)\n",
224 TRACECALL(
"Call to TxViewChange(%p, fUpdate=%d)\n",
232 TRACECALL(
"Call to TxCreateCaret(%p, nbmp=%p, xWidth=%d, yHeight=%d)\n",
240 TRACECALL(
"Call to TxShowCaret(%p, fShow=%d)\n",
255 TRACECALL(
"Call to TxSetTimer(%p, idTimer=%u, uTimeout=%u)\n",
256 This, idTimer, uTimeout);
263 TRACECALL(
"Call to TxKillTimer(%p, idTimer=%u)\n",
This, idTimer);
271 TRACECALL(
"Call to TxScrollWindowEx(%p, %d, %d, %p, %p, %p, %p, %d)\n",
272 This,
dx,
dy, lprcScroll, lprcClip, hRgnUpdate, lprcUpdate, fuScroll);
279 TRACECALL(
"Call to TxSetCapture(%p, fCapture=%d)\n",
This, fCapture);
291 TRACECALL(
"Call to TxSetCursor(%p, hcur=%p, fText=%d)\n",
298 TRACECALL(
"Call to TxScreenToClient(%p, lppt=%p)\n",
This, lppt);
305 TRACECALL(
"Call to TxClientToScreen(%p, lppt=%p)\n",
This, lppt);
312 TRACECALL(
"Call to TxActivate(%p, plOldState=%p)\n",
This, plOldState);
319 TRACECALL(
"Call to TxDeactivate(%p, lNewState=%ld)\n",
This, lNewState);
342 TRACECALL(
"Call to TxGetCharFormat(%p, ppCF=%p)\n",
This, ppCF);
350 TRACECALL(
"Call to TxGetParaFormat(%p, ppPF=%p)\n",
This, ppPF);
357 TRACECALL(
"Call to TxGetSysColor(%p, nIndex=%d)\n",
This, nIndex);
364 TRACECALL(
"Call to TxGetBackStyle(%p, pStyle=%p)\n",
This, pStyle);
371 TRACECALL(
"Call to TxGetMaxLength(%p, pLength=%p)\n",
This, pLength);
378 TRACECALL(
"Call to TxGetScrollBars(%p, scrollbars=%p)\n",
This, scrollbars);
379 *scrollbars =
This->scrollbars;
400 TRACECALL(
"Call to TxGetExtent(%p, lpExtent=%p)\n",
This, lpExtent);
407 TRACECALL(
"Call to OnTxCharFormatChange(%p, pcf=%p)\n",
This, pcf);
414 TRACECALL(
"Call to OnTxParaFormatChange(%p, ppf=%p)\n",
This, ppf);
423 TRACECALL(
"Call to TxGetPropertyBits(%p, dwMask=0x%08lx, pdwBits=%p)\n",
424 This, dwMask, pdwBits);
425 *pdwBits =
This->props & dwMask;
470 TRACECALL(
"Call to TxImmReleaseContext(%p, himc=%p)\n",
This, himc);
479 TRACECALL(
"Call to TxGetSelectionBarWidth(%p, lSelBarWidth=%p)\n",
558#if defined(__i386__) && !defined(__MINGW32__) && (!defined(_MSC_VER) || !defined(__clang__))
565 (
sizeof(ITextHostVtbl)/
sizeof(
void*) - 3)
567 +(
sizeof(ITextServicesVtbl)/
sizeof(
void*) - 3)
586 while (pVtable != pVtableEnd) {
588 thunk->pop_eax = 0x58;
589 thunk->push_ecx = 0x51;
590 thunk->push_eax = 0x50;
591 thunk->jmp_func = 0xe9;
593 thunk->func = (
char*)*pVtable - (
char*)(&
thunk->func + 1);
605 pVtable = (
void**)&itextServicesStdcallVtbl + 3;
606 pVtableEnd = (
void**)(&itextServicesStdcallVtbl + 1);
607 while (pVtable != pVtableEnd) {
651 if (dummyTextHost ==
NULL) {
652 win_skip(
"Insufficient memory to create ITextHost interface\n");
663 dummyTextHost->
props = 0;
675 win_skip(
"CreateTextServices failed.\n");
680 ok((
result ==
S_OK) && (*txtserv !=
NULL),
"Querying interface failed (result = %lx, txtserv = %p)\n",
result, *txtserv);
681 IUnknown_Release(
init);
684 win_skip(
"Could not retrieve ITextServices interface\n");
711 const WCHAR *expected_string;
713 ITextServices *txtserv;
724 ok(
hres ==
S_OK,
"ITextServices_TxGetText failed (result = %lx)\n",
hres);
729 hres = ITextServices_QueryInterface(txtserv, &IID_IRichEditOle, (
void **)&reole);
731 hres = IRichEditOle_GetClientSite(reole, &clientsite);
733 expected_string =
L"abc\xfffc""defg";
735 hres = IRichEditOle_InsertObject(reole, &reobject);
742 IOleClientSite_Release(clientsite);
743 IRichEditOle_Release(reole);
745 ITextServices_Release(txtserv);
746 ITextHost_Release(
host);
751 ITextServices *txtserv;
755 WCHAR settext[] = {
'T',
'e',
's',
't',0};
761 ok(
hres ==
S_OK,
"ITextServices_TxSetText failed (result = %lx)\n",
hres);
764 ok(
hres ==
S_OK,
"ITextServices_TxGetText failed (result = %lx)\n",
hres);
767 "String returned of wrong length (expected 4, got %d)\n",
SysStringLen(rettext));
769 "String returned differs\n");
776 ok(
hres ==
S_OK,
"ITextServices_TxSetText failed (result = %lx)\n",
hres);
779 ok(
hres ==
S_OK,
"ITextServices_TxGetText failed (result = %lx)\n",
hres);
781 "String returned of wrong length (expected 0, got %d)\n",
SysStringLen(rettext));
784 ITextServices_Release(txtserv);
785 ITextHost_Release(
host);
788#define CHECK_TXGETNATURALSIZE(res,width,height,hdc,rect,string) \
789 _check_txgetnaturalsize(res, width, height, hdc, rect, string, __LINE__)
793 LONG expected_width, expected_height;
798 ok_(__FILE__,
line)(
res ==
S_OK,
"ITextServices_TxGetNaturalSize failed: 0x%08lx.\n",
res);
800 "got wrong width: %ld, expected: %ld {+1}.\n",
width, expected_width);
801 ok_(__FILE__,
line)(
height == expected_height,
"got wrong height: %ld, expected: %ld.\n",
807 ITextServices *txtserv;
811 static const WCHAR test_text[] =
L"TestSomeText";
824 0, 0, 100, 100, 0, 0, 0,
NULL);
830 cf.cbSize =
sizeof(
cf);
850 ITextServices_Release(txtserv);
851 ITextHost_Release(
host);
856 ITextServices *txtserv;
868 hr = ITextServices_QueryInterface( txtserv, &IID_ITextDocument, (
void **)&txtdoc );
869 ok(
hr ==
S_OK,
"ITextServices_QueryInterface (ITextDocument) returned %#lx\n",
hr );
873 0, 0, 400, 400, 0, 0, 0,
NULL );
903 freeze_count = 0xdeadbeef;
904 hr = ITextDocument_Freeze( txtdoc, &freeze_count );
905 ok(
hr ==
S_OK,
"ITextDocument_Freeze returned %#lx\n",
hr );
906 ok( freeze_count == 1,
"expected count to be %d, got %ld\n", 1, freeze_count );
915 freeze_count = 0xdeadbeef;
916 hr = ITextDocument_Unfreeze( txtdoc, &freeze_count );
917 ok(
hr ==
S_OK,
"ITextDocument_Unfreeze returned %#lx\n",
hr );
918 ok( freeze_count == 0,
"expected count to be %d, got %ld\n", 0, freeze_count );
923 ITextDocument_Release(txtdoc);
924 ITextServices_Release(txtserv);
926 ITextHost_Release(
host);
929DEFINE_GUID(expected_iid_itextservices, 0x8d33f740, 0xcf58, 0x11ce, 0xa8, 0x9d, 0x00, 0xaa, 0x00, 0x6c, 0xad, 0xc5);
930DEFINE_GUID(expected_iid_itexthost, 0x13e670f4,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1);
931DEFINE_GUID(expected_iid_itexthost2, 0x13e670f5,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1);
959 return IUnknown_QueryInterface(
This->inner_unk,
riid,
ppv);
987 ITextServices *textsrv;
994 ok(
hr ==
S_OK,
"CreateTextServices failed: %08lx\n",
hr);
996 ok(
hr ==
S_OK,
"QueryInterface for IID_ITextServices failed: %08lx\n",
hr);
997 refcount = ITextServices_AddRef(textsrv);
998 ok(refcount == unk_obj.
ref,
"CreateTextServices just pretends to support COM aggregation\n");
999 refcount = ITextServices_Release(textsrv);
1000 ok(refcount == unk_obj.
ref,
"CreateTextServices just pretends to support COM aggregation\n");
1001 refcount = ITextServices_Release(textsrv);
1002 ok(refcount == 19,
"Refcount should be back at 19 but is %lu\n", refcount);
1009 IUnknown_AddRef(iface);
1010 return IUnknown_Release(iface);
1015 ITextServices *txtserv;
1028 ok(refcount == 1,
"got wrong ref count: %ld\n", refcount);
1031 hres = ITextServices_QueryInterface(txtserv, &IID_IRichEditOle, (
void **)&txtsrv_reole);
1032 ok(
hres ==
S_OK,
"ITextServices_QueryInterface: 0x%08lx\n",
hres);
1034 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1036 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1038 hres = ITextServices_QueryInterface( txtserv, &
IID_IUnknown, (
void **)&unk );
1040 hres = IRichEditOle_QueryInterface( txtsrv_reole, &
IID_IUnknown, (
void **)&unk2 );
1042 ok( unk == unk2,
"unknowns differ\n" );
1043 IUnknown_Release( unk2 );
1044 IUnknown_Release( unk );
1046 hres = IRichEditOle_QueryInterface(txtsrv_reole, &IID_ITextDocument, (
void **)&txtdoc);
1047 ok(
hres ==
S_OK,
"IRichEditOle_QueryInterface: 0x%08lx\n",
hres);
1049 ok(refcount == 3,
"got wrong ref count: %ld\n", refcount);
1051 ok(refcount == 3,
"got wrong ref count: %ld\n", refcount);
1053 ITextDocument_Release(txtdoc);
1055 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1057 hres = IRichEditOle_QueryInterface(txtsrv_reole, &IID_ITextDocument2Old, (
void **)&txtdoc2old);
1058 ok(
hres ==
S_OK,
"IRichEditOle_QueryInterface: 0x%08lx\n",
hres);
1060 ok(refcount == 3,
"got wrong ref count: %ld\n", refcount);
1062 ok(refcount == 3,
"got wrong ref count: %ld\n", refcount);
1064 ITextDocument2Old_Release(txtdoc2old);
1066 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1067 IRichEditOle_Release(txtsrv_reole);
1069 ok(refcount == 1,
"got wrong ref count: %ld\n", refcount);
1072 hres = ITextServices_QueryInterface(txtserv, &IID_ITextDocument, (
void **)&txtsrv_txtdoc);
1073 ok(
hres ==
S_OK,
"ITextServices_QueryInterface: 0x%08lx\n",
hres);
1075 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1077 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1079 hres = ITextDocument_QueryInterface(txtsrv_txtdoc, &IID_IRichEditOle, (
void **)&reole);
1080 ok(
hres ==
S_OK,
"ITextDocument_QueryInterface: 0x%08lx\n",
hres);
1082 ok(refcount == 3,
"got wrong ref count: %ld\n", refcount);
1084 ok(refcount == 3,
"got wrong ref count: %ld\n", refcount);
1086 IRichEditOle_Release(reole);
1088 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1089 ITextDocument_Release(txtsrv_txtdoc);
1091 ok(refcount == 1,
"got wrong ref count: %ld\n", refcount);
1094 hres = ITextServices_QueryInterface(txtserv, &IID_ITextDocument2Old, (
void **)&txtsrv_txtdoc2old);
1095 ok(
hres ==
S_OK,
"ITextServices_QueryInterface: 0x%08lx\n",
hres);
1097 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1099 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1101 hres = ITextDocument2Old_QueryInterface(txtsrv_txtdoc2old, &IID_IRichEditOle, (
void **)&reole);
1102 ok(
hres ==
S_OK,
"ITextDocument2Old_QueryInterface: 0x%08lx\n",
hres);
1104 ok(refcount == 3,
"got wrong ref count: %ld\n", refcount);
1106 ok(refcount == 3,
"got wrong ref count: %ld\n", refcount);
1108 IRichEditOle_Release(reole);
1110 ok(refcount == 2,
"got wrong ref count: %ld\n", refcount);
1111 ITextDocument2Old_Release(txtsrv_txtdoc2old);
1113 ok(refcount == 1,
"got wrong ref count: %ld\n", refcount);
1115 ITextServices_Release(txtserv);
1116 ITextHost_Release(
host);
1121 ITextServices *txtserv;
1127 DWORD expected_effects;
1140 ok(host_cf->
dwEffects == expected_effects,
"got wrong dwEffects: %lx, expected %lx.\n", cf2.
dwEffects, expected_effects);
1145 ITextServices_Release(txtserv);
1146 ITextHost_Release(
host);
1151 ITextServices *txtserv;
1165 ok(
ret ==
S_OK,
"ITextServices_TxGetHScroll failed: 0x%08lx.\n",
ret);
1168 ok(
ret ==
S_OK,
"ITextServices_TxGetVScroll failed: 0x%08lx.\n",
ret);
1171 ok(
ret ==
S_OK,
"ITextServices_TxGetHScroll failed: 0x%08lx.\n",
ret );
1172 ok( min_pos == 0,
"got %ld\n", min_pos );
1173 ok( max_pos == 0,
"got %ld\n", max_pos );
1183 0, 0, 400, 400, 0, 0, 0,
NULL );
1189 ok(
ret ==
S_OK,
"ITextServices_TxGetHScroll failed: 0x%08lx.\n",
ret );
1190 ok( min_pos == 0,
"got %ld\n", min_pos );
1192 ok( max_pos == 0,
"got %ld\n", max_pos );
1201 ok(
ret ==
S_OK,
"ITextServices_TxGetHScroll failed: 0x%08lx.\n",
ret );
1202 ok( min_pos == 0,
"got %ld\n", min_pos );
1203 ok( max_pos >
client.bottom,
"got %ld\n", max_pos );
1213 ok(
ret ==
S_OK,
"ITextServices_TxGetHScroll failed: 0x%08lx.\n",
ret );
1214 ok( min_pos == 0,
"got %ld\n", min_pos );
1216 ok( max_pos == 0,
"got %ld\n", max_pos );
1222 ITextServices_Release(txtserv);
1223 ITextHost_Release(
host);
1228 ITextServices *txtserv;
1245 0, 0, 400, 400, 0, 0, 0,
NULL );
1278 ITextServices_Release( txtserv );
1279 ITextHost_Release(
host );
1284 ITextServices *txtserv;
1382 ITextServices_Release( txtserv );
1383 ITextHost_Release(
host );
1388 ITextServices *txtserv;
1399 ITextServices_Release( txtserv );
1400 ITextHost_Release(
host );
1405 ITextServices *txtserv;
1415 host_impl->
window =
CreateWindowExA( 0,
"static",
NULL,
WS_POPUP|
WS_VISIBLE, 0, 0, 100, 100, 0, 0, 0,
NULL );
1432 hr =
ITextServices_TxDraw( txtserv, DVASPECT_CONTENT, 0,
NULL,
NULL,
GetDC(host_impl->
window),
NULL, (
RECTL *)&host_impl->
client_rect,
NULL,
NULL,
NULL, 0,
TXTVIEW_INACTIVE );
1441 hr =
ITextServices_TxDraw( txtserv, DVASPECT_CONTENT, 0,
NULL,
NULL,
GetDC(host_impl->
window),
NULL, (
RECTL *)&host_impl->
client_rect,
NULL,
NULL,
NULL, 0,
TXTVIEW_INACTIVE );
1453 ITextServices_Release( txtserv );
1454 ITextHost_Release(
host );
1459 ITextServices *txtserv;
1479 ITextServices_Release(txtserv);
1480 ITextHost_Release(
host);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define InterlockedIncrement
#define InterlockedDecrement
void user(int argc, const char *argv[])
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
static struct text_services * impl_from_IUnknown(IUnknown *iface)
#define ITextServices_TxSetText(This, a)
#define ITextServices_TxDraw(This, a, b, c, d, e, f, g, h, i, j, k, l)
#define ITextServices_OnTxInPlaceDeactivate(This)
#define ITextServices_TxSendMessage(This, a, b, c, d)
#define ITextServices_OnTxInPlaceActivate(This, a)
#define ITextServices_TxGetHScroll(This, a, b, c, d, e)
#define ITextServices_TxGetVScroll(This, a, b, c, d, e)
#define ITextServices_OnTxPropertyBitsChange(This, a, b)
#define ITextServices_TxGetText(This, a)
#define ITextServices_TxGetNaturalSize(This, a, b, c, d, e, f, g, h)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLenum GLsizei const GLuint GLboolean enabled
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static IID * pIID_ITextServices
#define INCREASE_CALL_COUNTER(func)
static HRESULT __thiscall ITextHostImpl_TxGetMaxLength(ITextHost *iface, DWORD *pLength)
static HRESULT __thiscall ITextHostImpl_TxGetViewInset(ITextHost *iface, LPRECT prc)
static HRESULT __thiscall ITextHostImpl_OnTxCharFormatChange(ITextHost *iface, const CHARFORMATW *pcf)
#define CLEAR_COUNTER(func)
#define CHECK_TXGETNATURALSIZE(res, width, height, hdc, rect, string)
static COLORREF __thiscall ITextHostImpl_TxGetSysColor(ITextHost *iface, int nIndex)
static void test_TxGetNaturalSize(void)
static void fill_reobject_struct(REOBJECT *reobj, LONG cp, LPOLEOBJECT poleobj, LPSTORAGE pstg, LPOLECLIENTSITE polesite, LONG sizel_cx, LONG sizel_cy, DWORD aspect, DWORD flags, DWORD user)
static INT __thiscall ITextHostImpl_TxReleaseDC(ITextHost *iface, HDC hdc)
static BOOL __thiscall ITextHostImpl_TxScreenToClient(ITextHost *iface, LPPOINT lppt)
static HRESULT __thiscall ITextHostImpl_TxGetExtent(ITextHost *iface, LPSIZEL lpExtent)
static void test_notifications(void)
static IID * pIID_ITextHost
static HRESULT __thiscall ITextHostImpl_TxGetPropertyBits(ITextHost *iface, DWORD dwMask, DWORD *pdwBits)
static void test_inplace_active(BOOL active)
static HRESULT __thiscall ITextHostImpl_TxGetPasswordChar(ITextHost *iface, WCHAR *pch)
static int en_selchange_sent
static HMODULE hmoduleRichEdit
static HRESULT __thiscall ITextHostImpl_TxDeactivate(ITextHost *iface, LONG lNewState)
static const WCHAR lorem[]
static HRESULT __thiscall ITextHostImpl_TxActivate(ITextHost *iface, LONG *plOldState)
static BOOL __thiscall ITextHostImpl_TxShowScrollBar(ITextHost *iface, INT fnBar, BOOL fShow)
static void __thiscall ITextHostImpl_TxSetCapture(ITextHost *iface, BOOL fCapture)
static BOOL init_texthost(ITextServices **txtserv, ITextHost **ret)
static BOOL __thiscall ITextHostImpl_TxClientToScreen(ITextHost *iface, LPPOINT lppt)
static int en_change_sent
static int en_update_sent
static HIMC __thiscall ITextHostImpl_TxImmGetContext(ITextHost *iface)
static BOOL __thiscall ITextHostImpl_TxCreateCaret(ITextHost *iface, HBITMAP hbmp, INT xWidth, INT yHeight)
static BOOL __thiscall ITextHostImpl_TxSetScrollPos(ITextHost *iface, INT fnBar, INT nPos, BOOL fRedraw)
#define DEFINE_EXPECT(func)
static HRESULT __thiscall ITextHostImpl_TxGetBackStyle(ITextHost *iface, TXTBACKSTYLE *pStyle)
static ULONG WINAPI unk_Release(IUnknown *iface)
static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface)
static void test_TxSetText(void)
static HRESULT WINAPI unk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static void test_set_selection_message(void)
static HRESULT __thiscall ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface, LONG *pch)
static void setup_thiscall_wrappers(void)
static HDC __thiscall ITextHostImpl_TxGetDC(ITextHost *iface)
static BOOL __thiscall ITextHostImpl_TxSetTimer(ITextHost *iface, UINT idTimer, UINT uTimeout)
static HRESULT __thiscall ITextHostImpl_TxGetParaFormat(ITextHost *iface, const PARAFORMAT **ppPF)
static void test_QueryInterface(void)
static void __thiscall ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc)
static void __thiscall ITextHostImpl_TxKillTimer(ITextHost *iface, UINT idTimer)
static void test_TxGetText(void)
static void test_TxDraw(void)
static HRESULT __thiscall ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface, LONG *lSelBarWidth)
static void hf_to_cf(HFONT hf, CHARFORMAT2W *cf)
static ITextHostTestImpl * impl_from_ITextHost(ITextHost *iface)
static ULONG WINAPI unk_AddRef(IUnknown *iface)
static BOOL __thiscall ITextHostImpl_TxEnableScrollBar(ITextHost *iface, INT fuSBFlags, INT fuArrowflags)
static HRESULT __thiscall ITextHostImpl_TxGetScrollBars(ITextHost *iface, DWORD *scrollbars)
static int en_vscroll_sent
static BOOL __thiscall ITextHostImpl_TxSetCaretPos(ITextHost *iface, INT x, INT y)
static void test_TxGetScroll(void)
static HRESULT __thiscall ITextHostImpl_TxGetCharFormat(ITextHost *iface, const CHARFORMATW **ppCF)
static HRESULT __thiscall ITextHostImpl_TxGetClientRect(ITextHost *iface, LPRECT prc)
#define CHECK_CALLED(func)
static const IUnknownVtbl unk_vtbl
static HRESULT __thiscall ITextHostImpl_OnTxParaFormatChange(ITextHost *iface, const PARAFORMAT *ppf)
static BOOL __thiscall ITextHostImpl_TxSetScrollRange(ITextHost *iface, INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw)
static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface, REFIID riid, LPVOID *ppvObject)
static void * wrapperCodeMem
static ULONG WINAPI ITextHostImpl_AddRef(ITextHost *iface)
static void __thiscall ITextHostImpl_TxSetCursor(ITextHost *iface, HCURSOR hcur, BOOL fText)
static void __thiscall ITextHostImpl_TxInvalidateRect(ITextHost *iface, LPCRECT prc, BOOL fMode)
static BOOL __thiscall ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow)
static void test_scrollcaret(void)
static void __thiscall ITextHostImpl_TxScrollWindowEx(ITextHost *iface, INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hRgnUpdate, LPRECT lprcUpdate, UINT fuScroll)
static void test_default_format(void)
static void __thiscall ITextHostImpl_TxViewChange(ITextHost *iface, BOOL fUpdate)
static void _check_txgetnaturalsize(HRESULT res, LONG width, LONG height, HDC hdc, RECT rect, LPCWSTR string, int line)
static HRESULT __thiscall ITextHostImpl_TxNotify(ITextHost *iface, DWORD code, void *data)
static PCreateTextServices pCreateTextServices
static void __thiscall ITextHostImpl_TxSetFocus(ITextHost *iface)
static IID * pIID_ITextHost2
#define CHECK_NOT_CALLED(func)
static ITextHostVtbl itextHostVtbl
static void test_IIDs(void)
static void test_COM(void)
static ULONG get_refcount(IUnknown *iface)
static RECT expected_rect
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
#define PAGE_EXECUTE_READWRITE
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
interface IStorage * LPSTORAGE
UINT WINAPI SysStringByteLen(BSTR str)
UINT WINAPI SysStringLen(BSTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualIID(riid1, riid2)
#define ES_DISABLENOSCROLL
#define CFE_AUTOBACKCOLOR
struct _charformat2w CHARFORMAT2W
#define ENM_REQUESTRESIZE
static __inline const char * wine_dbgstr_guid(const GUID *id)
ITextHost ITextHost_iface
WCHAR lfFaceName[LF_FACESIZE]
#define TXTBIT_CLIENTRECTCHANGE
enum _TXTBACKSTYLE TXTBACKSTYLE
#define TXTBIT_SCROLLBARCHANGE
HRESULT(WINAPI * PCreateTextServices)(IUnknown *, ITextHost *, IUnknown **)
#define CONTAINING_RECORD(address, type, field)
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
DWORD WINAPI GetLastError(void)
int WINAPI SetMapMode(_In_ HDC, _In_ int)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
BOOL WINAPI DestroyWindow(_In_ HWND)