2 * RichEdit - ITextHost implementation for windowed richedit controls
4 * Copyright 2009 by Dylan Smith
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
24 #define NONAMELESSSTRUCT
25 #define NONAMELESSUNION
33 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(richedit);
38 typedef struct ITextHostImpl {
39 const ITextHostVtbl *lpVtbl;
42 BOOL bEmulateVersion10;
45 static ITextHostVtbl textHostVtbl;
47 ITextHost *ME_CreateTextHost(HWND hwnd, BOOL bEmulateVersion10)
49 ITextHostImpl *texthost;
50 texthost = CoTaskMemAlloc(sizeof(*texthost));
53 ME_TextEditor *editor;
55 texthost->lpVtbl = &textHostVtbl;
57 texthost->hWnd = hwnd;
58 texthost->bEmulateVersion10 = bEmulateVersion10;
60 editor = ME_MakeEditor((ITextHost*)texthost, bEmulateVersion10);
61 editor->exStyleFlags = GetWindowLongW(hwnd, GWL_EXSTYLE);
62 editor->hWnd = hwnd; /* FIXME: Remove editor's dependence on hWnd */
63 SetWindowLongPtrW(hwnd, 0, (LONG_PTR)editor);
66 return (ITextHost*)texthost;
69 static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface,
73 ITextHostImpl *This = (ITextHostImpl *)iface;
75 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_ITextHost)) {
77 ITextHost_AddRef((ITextHost *)*ppvObject);
81 FIXME("Unknown interface: %s\n", debugstr_guid(riid));
85 static ULONG WINAPI ITextHostImpl_AddRef(ITextHost *iface)
87 ITextHostImpl *This = (ITextHostImpl *)iface;
88 ULONG ref = InterlockedIncrement(&This->ref);
92 static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface)
94 ITextHostImpl *This = (ITextHostImpl *)iface;
95 ULONG ref = InterlockedDecrement(&This->ref);
99 SetWindowLongPtrW(This->hWnd, 0, 0);
105 HDC WINAPI ITextHostImpl_TxGetDC(ITextHost *iface)
107 ITextHostImpl *This = (ITextHostImpl *)iface;
108 return GetDC(This->hWnd);
111 INT WINAPI ITextHostImpl_TxReleaseDC(ITextHost *iface,
114 ITextHostImpl *This = (ITextHostImpl *)iface;
115 return ReleaseDC(This->hWnd, hdc);
118 BOOL WINAPI ITextHostImpl_TxShowScrollBar(ITextHost *iface,
122 ITextHostImpl *This = (ITextHostImpl *)iface;
123 return ShowScrollBar(This->hWnd, fnBar, fShow);
126 BOOL WINAPI ITextHostImpl_TxEnableScrollBar(ITextHost *iface,
130 ITextHostImpl *This = (ITextHostImpl *)iface;
131 return EnableScrollBar(This->hWnd, fuSBFlags, fuArrowflags);
134 BOOL WINAPI ITextHostImpl_TxSetScrollRange(ITextHost *iface,
140 ITextHostImpl *This = (ITextHostImpl *)iface;
141 return SetScrollRange(This->hWnd, fnBar, nMinPos, nMaxPos, fRedraw);
144 BOOL WINAPI ITextHostImpl_TxSetScrollPos(ITextHost *iface,
149 ITextHostImpl *This = (ITextHostImpl *)iface;
150 int pos = SetScrollPos(This->hWnd, fnBar, nPos, fRedraw);
151 return (pos ? TRUE : FALSE);
154 void WINAPI ITextHostImpl_TxInvalidateRect(ITextHost *iface,
158 ITextHostImpl *This = (ITextHostImpl *)iface;
159 InvalidateRect(This->hWnd, prc, fMode);
162 void WINAPI ITextHostImpl_TxViewChange(ITextHost *iface,
165 ITextHostImpl *This = (ITextHostImpl *)iface;
167 UpdateWindow(This->hWnd);
170 BOOL WINAPI ITextHostImpl_TxCreateCaret(ITextHost *iface,
172 INT xWidth, INT yHeight)
174 ITextHostImpl *This = (ITextHostImpl *)iface;
175 return CreateCaret(This->hWnd, hbmp, xWidth, yHeight);
178 BOOL WINAPI ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow)
180 ITextHostImpl *This = (ITextHostImpl *)iface;
182 return ShowCaret(This->hWnd);
184 return HideCaret(This->hWnd);
187 BOOL WINAPI ITextHostImpl_TxSetCaretPos(ITextHost *iface,
190 return SetCaretPos(x, y);
193 BOOL WINAPI ITextHostImpl_TxSetTimer(ITextHost *iface,
194 UINT idTimer, UINT uTimeout)
196 ITextHostImpl *This = (ITextHostImpl *)iface;
197 return SetTimer(This->hWnd, idTimer, uTimeout, NULL) != 0;
200 void WINAPI ITextHostImpl_TxKillTimer(ITextHost *iface,
203 ITextHostImpl *This = (ITextHostImpl *)iface;
204 KillTimer(This->hWnd, idTimer);
207 void WINAPI ITextHostImpl_TxScrollWindowEx(ITextHost *iface,
215 ITextHostImpl *This = (ITextHostImpl *)iface;
216 ScrollWindowEx(This->hWnd, dx, dy, lprcScroll, lprcClip,
217 hRgnUpdate, lprcUpdate, fuScroll);
220 void WINAPI ITextHostImpl_TxSetCapture(ITextHost *iface,
223 ITextHostImpl *This = (ITextHostImpl *)iface;
225 SetCapture(This->hWnd);
230 void WINAPI ITextHostImpl_TxSetFocus(ITextHost *iface)
232 ITextHostImpl *This = (ITextHostImpl *)iface;
233 SetFocus(This->hWnd);
236 void WINAPI ITextHostImpl_TxSetCursor(ITextHost *iface,
243 BOOL WINAPI ITextHostImpl_TxScreenToClient(ITextHost *iface,
246 ITextHostImpl *This = (ITextHostImpl *)iface;
247 return ScreenToClient(This->hWnd, lppt);
250 BOOL WINAPI ITextHostImpl_TxClientToScreen(ITextHost *iface,
253 ITextHostImpl *This = (ITextHostImpl *)iface;
254 return ClientToScreen(This->hWnd, lppt);
257 HRESULT WINAPI ITextHostImpl_TxActivate(ITextHost *iface,
260 ITextHostImpl *This = (ITextHostImpl *)iface;
261 *plOldState = HandleToLong(SetActiveWindow(This->hWnd));
262 return (*plOldState ? S_OK : E_FAIL);
265 HRESULT WINAPI ITextHostImpl_TxDeactivate(ITextHost *iface,
268 HWND ret = SetActiveWindow(LongToHandle(lNewState));
269 return (ret ? S_OK : E_FAIL);
272 HRESULT WINAPI ITextHostImpl_TxGetClientRect(ITextHost *iface,
275 ITextHostImpl *This = (ITextHostImpl *)iface;
276 int ret = GetClientRect(This->hWnd, prc);
277 return (ret ? S_OK : E_FAIL);
280 HRESULT WINAPI ITextHostImpl_TxGetViewInset(ITextHost *iface,
290 HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface,
291 const CHARFORMATW **ppCF)
296 HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface,
297 const PARAFORMAT **ppPF)
302 COLORREF WINAPI ITextHostImpl_TxGetSysColor(ITextHost *iface,
305 return GetSysColor(nIndex);
308 HRESULT WINAPI ITextHostImpl_TxGetBackStyle(ITextHost *iface,
309 TXTBACKSTYLE *pStyle)
311 *pStyle = TXTBACK_OPAQUE;
315 HRESULT WINAPI ITextHostImpl_TxGetMaxLength(ITextHost *iface,
322 HRESULT WINAPI ITextHostImpl_TxGetScrollBars(ITextHost *iface,
325 ITextHostImpl *This = (ITextHostImpl *)iface;
326 ME_TextEditor *editor = (ME_TextEditor*)GetWindowLongPtrW(This->hWnd, 0);
327 const DWORD mask = WS_VSCROLL|
334 *pdwScrollBar = editor->styleFlags & mask;
336 DWORD style = GetWindowLongW(This->hWnd, GWL_STYLE);
337 if (style & WS_VSCROLL)
338 style |= ES_AUTOVSCROLL;
339 if (!This->bEmulateVersion10 && (style & WS_HSCROLL))
340 style |= ES_AUTOHSCROLL;
341 *pdwScrollBar = style & mask;
346 HRESULT WINAPI ITextHostImpl_TxGetPasswordChar(ITextHost *iface,
353 HRESULT WINAPI ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface,
360 HRESULT WINAPI ITextHostImpl_TxGetExtent(ITextHost *iface,
366 HRESULT WINAPI ITextHostImpl_OnTxCharFormatChange(ITextHost *iface,
367 const CHARFORMATW *pcf)
372 HRESULT WINAPI ITextHostImpl_OnTxParaFormatChange(ITextHost *iface,
373 const PARAFORMAT *ppf)
378 HRESULT WINAPI ITextHostImpl_TxGetPropertyBits(ITextHost *iface,
382 ITextHostImpl *This = (ITextHostImpl *)iface;
383 ME_TextEditor *editor = (ME_TextEditor *)GetWindowLongPtrW(This->hWnd, 0);
389 style = editor->styleFlags;
390 if (editor->mode & TM_RICHTEXT)
391 dwBits |= TXTBIT_RICHTEXT;
392 if (editor->bWordWrap)
393 dwBits |= TXTBIT_WORDWRAP;
394 if (style & ECO_AUTOWORDSELECTION)
395 dwBits |= TXTBIT_AUTOWORDSEL;
399 style = GetWindowLongW(This->hWnd, GWL_STYLE);
400 ITextHostImpl_TxGetScrollBars(iface, &dwScrollBar);
402 dwBits |= TXTBIT_RICHTEXT|TXTBIT_AUTOWORDSEL;
403 if (!(dwScrollBar & ES_AUTOHSCROLL))
404 dwBits |= TXTBIT_WORDWRAP;
407 /* Bits that correspond to window styles. */
408 if (style & ES_MULTILINE)
409 dwBits |= TXTBIT_MULTILINE;
410 if (style & ES_READONLY)
411 dwBits |= TXTBIT_READONLY;
412 if (style & ES_PASSWORD)
413 dwBits |= TXTBIT_USEPASSWORD;
414 if (!(style & ES_NOHIDESEL))
415 dwBits |= TXTBIT_HIDESELECTION;
416 if (style & ES_SAVESEL)
417 dwBits |= TXTBIT_SAVESELECTION;
418 if (style & ES_VERTICAL)
419 dwBits |= TXTBIT_VERTICAL;
420 if (style & ES_NOOLEDRAGDROP)
421 dwBits |= TXTBIT_DISABLEDRAG;
423 dwBits |= TXTBIT_ALLOWBEEP;
425 /* The following bits are always FALSE because they are probably only
426 * needed for ITextServices_OnTxPropertyBitsChange:
427 * TXTBIT_VIEWINSETCHANGE
428 * TXTBIT_BACKSTYLECHANGE
429 * TXTBIT_MAXLENGTHCHANGE
430 * TXTBIT_CHARFORMATCHANGE
431 * TXTBIT_PARAFORMATCHANGE
432 * TXTBIT_SHOWACCELERATOR
433 * TXTBIT_EXTENTCHANGE
434 * TXTBIT_SELBARCHANGE
435 * TXTBIT_SCROLLBARCHANGE
436 * TXTBIT_CLIENTRECTCHANGE
438 * Documented by MSDN as not supported:
439 * TXTBIT_USECURRENTBKG
442 *pdwBits = dwBits & dwMask;
446 HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface,
450 ITextHostImpl *This = (ITextHostImpl *)iface;
451 HWND hwnd = This->hWnd;
452 HWND parent = GetParent(hwnd);
453 UINT id = GetWindowLongW(hwnd, GWLP_ID);
461 case EN_REQUESTRESIZE:
462 case EN_SAVECLIPBOARD:
466 /* FIXME: Verify this assumption that pv starts with NMHDR. */
471 info->hwndFrom = hwnd;
473 info->code = iNotify;
474 SendMessageW(parent, WM_NOTIFY, id, (LPARAM)info);
479 /* Only sent when the window is visible. */
480 if (!IsWindowVisible(This->hWnd))
490 SendMessageW(parent, WM_COMMAND, MAKEWPARAM(id, iNotify), (LPARAM)hwnd);
494 FIXME("EN_MSGFILTER is documented as not being sent to TxNotify\n");
502 HIMC WINAPI ITextHostImpl_TxImmGetContext(ITextHost *iface)
504 ITextHostImpl *This = (ITextHostImpl *)iface;
505 return ImmGetContext(This->hWnd);
508 void WINAPI ITextHostImpl_TxImmReleaseContext(ITextHost *iface,
511 ITextHostImpl *This = (ITextHostImpl *)iface;
512 ImmReleaseContext(This->hWnd, himc);
515 HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface,
518 ITextHostImpl *This = (ITextHostImpl *)iface;
519 ME_TextEditor *editor = (ME_TextEditor *)GetWindowLongPtrW(This->hWnd, 0);
521 DWORD style = editor ? editor->styleFlags
522 : GetWindowLongW(This->hWnd, GWL_STYLE);
523 *lSelBarWidth = (style & ES_SELECTIONBAR) ? 225 : 0; /* in HIMETRIC */
528 #ifdef __i386__ /* thiscall functions are i386-specific */
530 #define THISCALL(func) __thiscall_ ## func
531 #define DEFINE_THISCALL_WRAPPER(func,args) \
532 extern typeof(func) THISCALL(func); \
533 __ASM_STDCALL_FUNC(__thiscall_ ## func, args, \
537 "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
541 #define THISCALL(func) func
542 #define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */
544 #endif /* __i386__ */
546 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetDC,4)
547 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxReleaseDC,8)
548 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxShowScrollBar,12)
549 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxEnableScrollBar,12)
550 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxSetScrollRange,20)
551 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxSetScrollPos,16)
552 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxInvalidateRect,12)
553 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxViewChange,8)
554 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxCreateCaret,16)
555 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxShowCaret,8)
556 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxSetCaretPos,12)
557 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxSetTimer,12)
558 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxKillTimer,8)
559 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxScrollWindowEx,32)
560 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxSetCapture,8)
561 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxSetFocus,4)
562 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxSetCursor,12)
563 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxScreenToClient,8)
564 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxClientToScreen,8)
565 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxActivate,8)
566 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxDeactivate,8)
567 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetClientRect,8)
568 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetViewInset,8)
569 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetCharFormat,8)
570 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetParaFormat,8)
571 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetSysColor,8)
572 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetBackStyle,8)
573 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetMaxLength,8)
574 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetScrollBars,8)
575 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetPasswordChar,8)
576 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetAcceleratorPos,8)
577 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetExtent,8)
578 DEFINE_THISCALL_WRAPPER(ITextHostImpl_OnTxCharFormatChange,8)
579 DEFINE_THISCALL_WRAPPER(ITextHostImpl_OnTxParaFormatChange,8)
580 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetPropertyBits,12)
581 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxNotify,12)
582 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxImmGetContext,4)
583 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxImmReleaseContext,8)
584 DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetSelectionBarWidth,8)
586 #ifdef __i386__ /* thiscall functions are i386-specific */
588 #define STDCALL(func) __stdcall_ ## func
589 #define DEFINE_STDCALL_WRAPPER(num,func,args) \
590 extern typeof(func) __stdcall_ ## func; \
591 __ASM_STDCALL_FUNC(__stdcall_ ## func, args, \
595 "movl (%ecx), %eax\n\t" \
596 "jmp *(4*(" #num "))(%eax)" )
598 DEFINE_STDCALL_WRAPPER(3,ITextHostImpl_TxGetDC,4)
599 DEFINE_STDCALL_WRAPPER(4,ITextHostImpl_TxReleaseDC,8)
600 DEFINE_STDCALL_WRAPPER(5,ITextHostImpl_TxShowScrollBar,12)
601 DEFINE_STDCALL_WRAPPER(6,ITextHostImpl_TxEnableScrollBar,12)
602 DEFINE_STDCALL_WRAPPER(7,ITextHostImpl_TxSetScrollRange,20)
603 DEFINE_STDCALL_WRAPPER(8,ITextHostImpl_TxSetScrollPos,16)
604 DEFINE_STDCALL_WRAPPER(9,ITextHostImpl_TxInvalidateRect,12)
605 DEFINE_STDCALL_WRAPPER(10,ITextHostImpl_TxViewChange,8)
606 DEFINE_STDCALL_WRAPPER(11,ITextHostImpl_TxCreateCaret,16)
607 DEFINE_STDCALL_WRAPPER(12,ITextHostImpl_TxShowCaret,8)
608 DEFINE_STDCALL_WRAPPER(13,ITextHostImpl_TxSetCaretPos,12)
609 DEFINE_STDCALL_WRAPPER(14,ITextHostImpl_TxSetTimer,12)
610 DEFINE_STDCALL_WRAPPER(15,ITextHostImpl_TxKillTimer,8)
611 DEFINE_STDCALL_WRAPPER(16,ITextHostImpl_TxScrollWindowEx,32)
612 DEFINE_STDCALL_WRAPPER(17,ITextHostImpl_TxSetCapture,8)
613 DEFINE_STDCALL_WRAPPER(18,ITextHostImpl_TxSetFocus,4)
614 DEFINE_STDCALL_WRAPPER(19,ITextHostImpl_TxSetCursor,12)
615 DEFINE_STDCALL_WRAPPER(20,ITextHostImpl_TxScreenToClient,8)
616 DEFINE_STDCALL_WRAPPER(21,ITextHostImpl_TxClientToScreen,8)
617 DEFINE_STDCALL_WRAPPER(22,ITextHostImpl_TxActivate,8)
618 DEFINE_STDCALL_WRAPPER(23,ITextHostImpl_TxDeactivate,8)
619 DEFINE_STDCALL_WRAPPER(24,ITextHostImpl_TxGetClientRect,8)
620 DEFINE_STDCALL_WRAPPER(25,ITextHostImpl_TxGetViewInset,8)
621 DEFINE_STDCALL_WRAPPER(26,ITextHostImpl_TxGetCharFormat,8)
622 DEFINE_STDCALL_WRAPPER(27,ITextHostImpl_TxGetParaFormat,8)
623 DEFINE_STDCALL_WRAPPER(28,ITextHostImpl_TxGetSysColor,8)
624 DEFINE_STDCALL_WRAPPER(29,ITextHostImpl_TxGetBackStyle,8)
625 DEFINE_STDCALL_WRAPPER(30,ITextHostImpl_TxGetMaxLength,8)
626 DEFINE_STDCALL_WRAPPER(31,ITextHostImpl_TxGetScrollBars,8)
627 DEFINE_STDCALL_WRAPPER(32,ITextHostImpl_TxGetPasswordChar,8)
628 DEFINE_STDCALL_WRAPPER(33,ITextHostImpl_TxGetAcceleratorPos,8)
629 DEFINE_STDCALL_WRAPPER(34,ITextHostImpl_TxGetExtent,8)
630 DEFINE_STDCALL_WRAPPER(35,ITextHostImpl_OnTxCharFormatChange,8)
631 DEFINE_STDCALL_WRAPPER(36,ITextHostImpl_OnTxParaFormatChange,8)
632 DEFINE_STDCALL_WRAPPER(37,ITextHostImpl_TxGetPropertyBits,12)
633 DEFINE_STDCALL_WRAPPER(38,ITextHostImpl_TxNotify,12)
634 DEFINE_STDCALL_WRAPPER(39,ITextHostImpl_TxImmGetContext,4)
635 DEFINE_STDCALL_WRAPPER(40,ITextHostImpl_TxImmReleaseContext,8)
636 DEFINE_STDCALL_WRAPPER(41,ITextHostImpl_TxGetSelectionBarWidth,8)
638 static ITextHostVtbl textHostVtbl = {
639 ITextHostImpl_QueryInterface,
640 ITextHostImpl_AddRef,
641 ITextHostImpl_Release,
642 THISCALL(ITextHostImpl_TxGetDC),
643 THISCALL(ITextHostImpl_TxReleaseDC),
644 THISCALL(ITextHostImpl_TxShowScrollBar),
645 THISCALL(ITextHostImpl_TxEnableScrollBar),
646 THISCALL(ITextHostImpl_TxSetScrollRange),
647 THISCALL(ITextHostImpl_TxSetScrollPos),
648 THISCALL(ITextHostImpl_TxInvalidateRect),
649 THISCALL(ITextHostImpl_TxViewChange),
650 THISCALL(ITextHostImpl_TxCreateCaret),
651 THISCALL(ITextHostImpl_TxShowCaret),
652 THISCALL(ITextHostImpl_TxSetCaretPos),
653 THISCALL(ITextHostImpl_TxSetTimer),
654 THISCALL(ITextHostImpl_TxKillTimer),
655 THISCALL(ITextHostImpl_TxScrollWindowEx),
656 THISCALL(ITextHostImpl_TxSetCapture),
657 THISCALL(ITextHostImpl_TxSetFocus),
658 THISCALL(ITextHostImpl_TxSetCursor),
659 THISCALL(ITextHostImpl_TxScreenToClient),
660 THISCALL(ITextHostImpl_TxClientToScreen),
661 THISCALL(ITextHostImpl_TxActivate),
662 THISCALL(ITextHostImpl_TxDeactivate),
663 THISCALL(ITextHostImpl_TxGetClientRect),
664 THISCALL(ITextHostImpl_TxGetViewInset),
665 THISCALL(ITextHostImpl_TxGetCharFormat),
666 THISCALL(ITextHostImpl_TxGetParaFormat),
667 THISCALL(ITextHostImpl_TxGetSysColor),
668 THISCALL(ITextHostImpl_TxGetBackStyle),
669 THISCALL(ITextHostImpl_TxGetMaxLength),
670 THISCALL(ITextHostImpl_TxGetScrollBars),
671 THISCALL(ITextHostImpl_TxGetPasswordChar),
672 THISCALL(ITextHostImpl_TxGetAcceleratorPos),
673 THISCALL(ITextHostImpl_TxGetExtent),
674 THISCALL(ITextHostImpl_OnTxCharFormatChange),
675 THISCALL(ITextHostImpl_OnTxParaFormatChange),
676 THISCALL(ITextHostImpl_TxGetPropertyBits),
677 THISCALL(ITextHostImpl_TxNotify),
678 THISCALL(ITextHostImpl_TxImmGetContext),
679 THISCALL(ITextHostImpl_TxImmReleaseContext),
680 THISCALL(ITextHostImpl_TxGetSelectionBarWidth),
683 ITextHostVtbl itextHostStdcallVtbl = {
687 __stdcall_ITextHostImpl_TxGetDC,
688 __stdcall_ITextHostImpl_TxReleaseDC,
689 __stdcall_ITextHostImpl_TxShowScrollBar,
690 __stdcall_ITextHostImpl_TxEnableScrollBar,
691 __stdcall_ITextHostImpl_TxSetScrollRange,
692 __stdcall_ITextHostImpl_TxSetScrollPos,
693 __stdcall_ITextHostImpl_TxInvalidateRect,
694 __stdcall_ITextHostImpl_TxViewChange,
695 __stdcall_ITextHostImpl_TxCreateCaret,
696 __stdcall_ITextHostImpl_TxShowCaret,
697 __stdcall_ITextHostImpl_TxSetCaretPos,
698 __stdcall_ITextHostImpl_TxSetTimer,
699 __stdcall_ITextHostImpl_TxKillTimer,
700 __stdcall_ITextHostImpl_TxScrollWindowEx,
701 __stdcall_ITextHostImpl_TxSetCapture,
702 __stdcall_ITextHostImpl_TxSetFocus,
703 __stdcall_ITextHostImpl_TxSetCursor,
704 __stdcall_ITextHostImpl_TxScreenToClient,
705 __stdcall_ITextHostImpl_TxClientToScreen,
706 __stdcall_ITextHostImpl_TxActivate,
707 __stdcall_ITextHostImpl_TxDeactivate,
708 __stdcall_ITextHostImpl_TxGetClientRect,
709 __stdcall_ITextHostImpl_TxGetViewInset,
710 __stdcall_ITextHostImpl_TxGetCharFormat,
711 __stdcall_ITextHostImpl_TxGetParaFormat,
712 __stdcall_ITextHostImpl_TxGetSysColor,
713 __stdcall_ITextHostImpl_TxGetBackStyle,
714 __stdcall_ITextHostImpl_TxGetMaxLength,
715 __stdcall_ITextHostImpl_TxGetScrollBars,
716 __stdcall_ITextHostImpl_TxGetPasswordChar,
717 __stdcall_ITextHostImpl_TxGetAcceleratorPos,
718 __stdcall_ITextHostImpl_TxGetExtent,
719 __stdcall_ITextHostImpl_OnTxCharFormatChange,
720 __stdcall_ITextHostImpl_OnTxParaFormatChange,
721 __stdcall_ITextHostImpl_TxGetPropertyBits,
722 __stdcall_ITextHostImpl_TxNotify,
723 __stdcall_ITextHostImpl_TxImmGetContext,
724 __stdcall_ITextHostImpl_TxImmReleaseContext,
725 __stdcall_ITextHostImpl_TxGetSelectionBarWidth,
728 #endif /* __i386__ */