ReactOS 0.4.15-dev-5853-gcb454ef
txthost.c
Go to the documentation of this file.
1/*
2 * RichEdit - ITextHost implementation for windowed richedit controls
3 *
4 * Copyright 2009 by Dylan Smith
5 *
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.
10 *
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.
15 *
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
19 */
20
21#define COBJMACROS
22
23#include "editor.h"
24#include "ole2.h"
25#include "richole.h"
26#include "imm.h"
27#include "textserv.h"
28#include "wine/asm.h"
29#include "wine/debug.h"
30#include "editstr.h"
31
33
34typedef struct ITextHostImpl {
35 ITextHost ITextHost_iface;
41
42static const ITextHostVtbl textHostVtbl;
43
44ITextHost *ME_CreateTextHost(HWND hwnd, CREATESTRUCTW *cs, BOOL bEmulateVersion10)
45{
46 ITextHostImpl *texthost;
47
48 texthost = CoTaskMemAlloc(sizeof(*texthost));
49 if (!texthost) return NULL;
50
51 texthost->ITextHost_iface.lpVtbl = &textHostVtbl;
52 texthost->ref = 1;
53 texthost->hWnd = hwnd;
54 texthost->bEmulateVersion10 = bEmulateVersion10;
55 memset( &texthost->para_fmt, 0, sizeof(texthost->para_fmt) );
56 texthost->para_fmt.cbSize = sizeof(texthost->para_fmt);
57 texthost->para_fmt.dwMask = PFM_ALIGNMENT;
58 texthost->para_fmt.wAlignment = PFA_LEFT;
59 if (cs->style & ES_RIGHT)
60 texthost->para_fmt.wAlignment = PFA_RIGHT;
61 if (cs->style & ES_CENTER)
62 texthost->para_fmt.wAlignment = PFA_CENTER;
63
64 return &texthost->ITextHost_iface;
65}
66
67static inline ITextHostImpl *impl_from_ITextHost(ITextHost *iface)
68{
69 return CONTAINING_RECORD(iface, ITextHostImpl, ITextHost_iface);
70}
71
73{
75
76 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_ITextHost)) {
77 *ppvObject = &This->ITextHost_iface;
78 ITextHost_AddRef((ITextHost *)*ppvObject);
79 return S_OK;
80 }
81
82 FIXME("Unknown interface: %s\n", debugstr_guid(riid));
83 return E_NOINTERFACE;
84}
85
86static ULONG WINAPI ITextHostImpl_AddRef(ITextHost *iface)
87{
90 return ref;
91}
92
93static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface)
94{
97
98 if (!ref)
99 {
100 SetWindowLongPtrW(This->hWnd, 0, 0);
102 }
103 return ref;
104}
105
107{
109 return GetDC(This->hWnd);
110}
111
113{
115 return ReleaseDC(This->hWnd, hdc);
116}
117
119{
121 return ShowScrollBar(This->hWnd, fnBar, fShow);
122}
123
124DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxEnableScrollBar(ITextHost *iface, INT fuSBFlags, INT fuArrowflags)
125{
127 return EnableScrollBar(This->hWnd, fuSBFlags, fuArrowflags);
128}
129
130DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxSetScrollRange(ITextHost *iface, INT fnBar, LONG nMinPos, INT nMaxPos,
131 BOOL fRedraw)
132{
134 return SetScrollRange(This->hWnd, fnBar, nMinPos, nMaxPos, fRedraw);
135}
136
138{
140 return SetScrollPos(This->hWnd, fnBar, nPos, fRedraw) != 0;
141}
142
144{
146 InvalidateRect(This->hWnd, prc, fMode);
147}
148
150{
152 if (fUpdate)
153 UpdateWindow(This->hWnd);
154}
155
157{
159 return CreateCaret(This->hWnd, hbmp, xWidth, yHeight);
160}
161
163{
165 if (fShow)
166 return ShowCaret(This->hWnd);
167 else
168 return HideCaret(This->hWnd);
169}
170
172 INT x, INT y)
173{
174 return SetCaretPos(x, y);
175}
176
178{
180 return SetTimer(This->hWnd, idTimer, uTimeout, NULL) != 0;
181}
182
184{
186 KillTimer(This->hWnd, idTimer);
187}
188
190 LPCRECT lprcClip, HRGN hRgnUpdate, LPRECT lprcUpdate,
191 UINT fuScroll)
192{
194 ScrollWindowEx(This->hWnd, dx, dy, lprcScroll, lprcClip,
195 hRgnUpdate, lprcUpdate, fuScroll);
196}
197
199{
201 if (fCapture)
202 SetCapture(This->hWnd);
203 else
205}
206
208{
210 SetFocus(This->hWnd);
211}
212
214{
215 SetCursor(hcur);
216}
217
219{
221 return ScreenToClient(This->hWnd, lppt);
222}
223
225{
227 return ClientToScreen(This->hWnd, lppt);
228}
229
231{
233 *plOldState = HandleToLong(SetActiveWindow(This->hWnd));
234 return (*plOldState ? S_OK : E_FAIL);
235}
236
238{
239 HWND ret = SetActiveWindow(LongToHandle(lNewState));
240 return (ret ? S_OK : E_FAIL);
241}
242
244{
246 int ret = GetClientRect(This->hWnd, prc);
247 return (ret ? S_OK : E_FAIL);
248}
249
251{
252 prc->top = 0;
253 prc->left = 0;
254 prc->bottom = 0;
255 prc->right = 0;
256 return S_OK;
257}
258
260{
261 return E_NOTIMPL;
262}
263
265{
267 *fmt = (const PARAFORMAT *)&This->para_fmt;
268 return S_OK;
269}
270
272{
273 return GetSysColor(nIndex);
274}
275
277{
278 *pStyle = TXTBACK_OPAQUE;
279 return S_OK;
280}
281
283{
284 *pLength = INFINITE;
285 return S_OK;
286}
287
289{
292 const DWORD mask = WS_VSCROLL|
297 if (editor)
298 {
299 *pdwScrollBar = editor->styleFlags & mask;
300 } else {
302 if (style & WS_VSCROLL)
304 if (!This->bEmulateVersion10 && (style & WS_HSCROLL))
306 *pdwScrollBar = style & mask;
307 }
308 return S_OK;
309}
310
312{
313 *pch = '*';
314 return S_OK;
315}
316
318{
319 *pch = -1;
320 return S_OK;
321}
322
324{
325 return E_NOTIMPL;
326}
327
329{
330 return S_OK;
331}
332
334{
335 return S_OK;
336}
337
339{
341 ME_TextEditor *editor = (ME_TextEditor *)GetWindowLongPtrW(This->hWnd, 0);
342 DWORD style;
343 DWORD dwBits = 0;
344
345 if (editor)
346 {
347 style = editor->styleFlags;
348 if (editor->mode & TM_RICHTEXT)
349 dwBits |= TXTBIT_RICHTEXT;
350 if (editor->bWordWrap)
351 dwBits |= TXTBIT_WORDWRAP;
353 dwBits |= TXTBIT_AUTOWORDSEL;
354 } else {
355 DWORD dwScrollBar;
356
358 ITextHostImpl_TxGetScrollBars(iface, &dwScrollBar);
359
361 if (!(dwScrollBar & ES_AUTOHSCROLL))
362 dwBits |= TXTBIT_WORDWRAP;
363 }
364
365 /* Bits that correspond to window styles. */
366 if (style & ES_MULTILINE)
367 dwBits |= TXTBIT_MULTILINE;
368 if (style & ES_READONLY)
369 dwBits |= TXTBIT_READONLY;
370 if (style & ES_PASSWORD)
371 dwBits |= TXTBIT_USEPASSWORD;
372 if (!(style & ES_NOHIDESEL))
373 dwBits |= TXTBIT_HIDESELECTION;
374 if (style & ES_SAVESEL)
375 dwBits |= TXTBIT_SAVESELECTION;
376 if (style & ES_VERTICAL)
377 dwBits |= TXTBIT_VERTICAL;
379 dwBits |= TXTBIT_DISABLEDRAG;
380
381 dwBits |= TXTBIT_ALLOWBEEP;
382
383 /* The following bits are always FALSE because they are probably only
384 * needed for ITextServices_OnTxPropertyBitsChange:
385 * TXTBIT_VIEWINSETCHANGE
386 * TXTBIT_BACKSTYLECHANGE
387 * TXTBIT_MAXLENGTHCHANGE
388 * TXTBIT_CHARFORMATCHANGE
389 * TXTBIT_PARAFORMATCHANGE
390 * TXTBIT_SHOWACCELERATOR
391 * TXTBIT_EXTENTCHANGE
392 * TXTBIT_SELBARCHANGE
393 * TXTBIT_SCROLLBARCHANGE
394 * TXTBIT_CLIENTRECTCHANGE
395 *
396 * Documented by MSDN as not supported:
397 * TXTBIT_USECURRENTBKG
398 */
399
400 *pdwBits = dwBits & dwMask;
401 return S_OK;
402}
403
405{
408 HWND hwnd = This->hWnd;
409 UINT id;
410
411 if (!editor || !editor->hwndParent) return S_OK;
412
414
415 switch (iNotify)
416 {
417 case EN_DROPFILES:
418 case EN_LINK:
419 case EN_OLEOPFAILED:
420 case EN_PROTECTED:
421 case EN_REQUESTRESIZE:
422 case EN_SAVECLIPBOARD:
423 case EN_SELCHANGE:
424 case EN_STOPNOUNDO:
425 {
426 /* FIXME: Verify this assumption that pv starts with NMHDR. */
427 NMHDR *info = pv;
428 if (!info)
429 return E_FAIL;
430
431 info->hwndFrom = hwnd;
432 info->idFrom = id;
433 info->code = iNotify;
435 break;
436 }
437
438 case EN_UPDATE:
439 /* Only sent when the window is visible. */
440 if (!IsWindowVisible(hwnd))
441 break;
442 /* Fall through */
443 case EN_CHANGE:
444 case EN_ERRSPACE:
445 case EN_HSCROLL:
446 case EN_KILLFOCUS:
447 case EN_MAXTEXT:
448 case EN_SETFOCUS:
449 case EN_VSCROLL:
450 SendMessageW(editor->hwndParent, WM_COMMAND, MAKEWPARAM(id, iNotify), (LPARAM)hwnd);
451 break;
452
453 case EN_MSGFILTER:
454 FIXME("EN_MSGFILTER is documented as not being sent to TxNotify\n");
455 /* fall through */
456 default:
457 return E_FAIL;
458 }
459 return S_OK;
460}
461
463{
465 return ImmGetContext(This->hWnd);
466}
467
469{
471 ImmReleaseContext(This->hWnd, himc);
472}
473
475{
477 ME_TextEditor *editor = (ME_TextEditor *)GetWindowLongPtrW(This->hWnd, 0);
478
479 DWORD style = editor ? editor->styleFlags
480 : GetWindowLongW(This->hWnd, GWL_STYLE);
481 *lSelBarWidth = (style & ES_SELECTIONBAR) ? 225 : 0; /* in HIMETRIC */
482 return S_OK;
483}
523
524#if defined(__i386__) && !defined(__MINGW32__) /* thiscall functions are i386-specific */
525
526#define STDCALL(func) (void *) __stdcall_ ## func
527#ifdef _MSC_VER
528#define DEFINE_STDCALL_WRAPPER(num,func,args) \
529 __declspec(naked) HRESULT __stdcall_##func(void) \
530 { \
531 __asm pop eax \
532 __asm pop ecx \
533 __asm push eax \
534 __asm mov eax, [ecx] \
535 __asm jmp dword ptr [eax + 4*num] \
536 }
537#else /* _MSC_VER */
538#define DEFINE_STDCALL_WRAPPER(num,func,args) \
539 extern HRESULT __stdcall_ ## func(void); \
540 __ASM_GLOBAL_FUNC(__stdcall_ ## func, \
541 "popl %eax\n\t" \
542 "popl %ecx\n\t" \
543 "pushl %eax\n\t" \
544 "movl (%ecx), %eax\n\t" \
545 "jmp *(4*(" #num "))(%eax)" )
546#endif /* _MSC_VER */
547
548DEFINE_STDCALL_WRAPPER(3,ITextHostImpl_TxGetDC,4)
549DEFINE_STDCALL_WRAPPER(4,ITextHostImpl_TxReleaseDC,8)
550DEFINE_STDCALL_WRAPPER(5,ITextHostImpl_TxShowScrollBar,12)
551DEFINE_STDCALL_WRAPPER(6,ITextHostImpl_TxEnableScrollBar,12)
552DEFINE_STDCALL_WRAPPER(7,ITextHostImpl_TxSetScrollRange,20)
553DEFINE_STDCALL_WRAPPER(8,ITextHostImpl_TxSetScrollPos,16)
554DEFINE_STDCALL_WRAPPER(9,ITextHostImpl_TxInvalidateRect,12)
555DEFINE_STDCALL_WRAPPER(10,ITextHostImpl_TxViewChange,8)
556DEFINE_STDCALL_WRAPPER(11,ITextHostImpl_TxCreateCaret,16)
557DEFINE_STDCALL_WRAPPER(12,ITextHostImpl_TxShowCaret,8)
558DEFINE_STDCALL_WRAPPER(13,ITextHostImpl_TxSetCaretPos,12)
559DEFINE_STDCALL_WRAPPER(14,ITextHostImpl_TxSetTimer,12)
560DEFINE_STDCALL_WRAPPER(15,ITextHostImpl_TxKillTimer,8)
561DEFINE_STDCALL_WRAPPER(16,ITextHostImpl_TxScrollWindowEx,32)
562DEFINE_STDCALL_WRAPPER(17,ITextHostImpl_TxSetCapture,8)
563DEFINE_STDCALL_WRAPPER(18,ITextHostImpl_TxSetFocus,4)
564DEFINE_STDCALL_WRAPPER(19,ITextHostImpl_TxSetCursor,12)
565DEFINE_STDCALL_WRAPPER(20,ITextHostImpl_TxScreenToClient,8)
566DEFINE_STDCALL_WRAPPER(21,ITextHostImpl_TxClientToScreen,8)
567DEFINE_STDCALL_WRAPPER(22,ITextHostImpl_TxActivate,8)
568DEFINE_STDCALL_WRAPPER(23,ITextHostImpl_TxDeactivate,8)
569DEFINE_STDCALL_WRAPPER(24,ITextHostImpl_TxGetClientRect,8)
570DEFINE_STDCALL_WRAPPER(25,ITextHostImpl_TxGetViewInset,8)
571DEFINE_STDCALL_WRAPPER(26,ITextHostImpl_TxGetCharFormat,8)
572DEFINE_STDCALL_WRAPPER(27,ITextHostImpl_TxGetParaFormat,8)
573DEFINE_STDCALL_WRAPPER(28,ITextHostImpl_TxGetSysColor,8)
574DEFINE_STDCALL_WRAPPER(29,ITextHostImpl_TxGetBackStyle,8)
575DEFINE_STDCALL_WRAPPER(30,ITextHostImpl_TxGetMaxLength,8)
576DEFINE_STDCALL_WRAPPER(31,ITextHostImpl_TxGetScrollBars,8)
577DEFINE_STDCALL_WRAPPER(32,ITextHostImpl_TxGetPasswordChar,8)
578DEFINE_STDCALL_WRAPPER(33,ITextHostImpl_TxGetAcceleratorPos,8)
579DEFINE_STDCALL_WRAPPER(34,ITextHostImpl_TxGetExtent,8)
580DEFINE_STDCALL_WRAPPER(35,ITextHostImpl_OnTxCharFormatChange,8)
581DEFINE_STDCALL_WRAPPER(36,ITextHostImpl_OnTxParaFormatChange,8)
582DEFINE_STDCALL_WRAPPER(37,ITextHostImpl_TxGetPropertyBits,12)
583DEFINE_STDCALL_WRAPPER(38,ITextHostImpl_TxNotify,12)
584DEFINE_STDCALL_WRAPPER(39,ITextHostImpl_TxImmGetContext,4)
585DEFINE_STDCALL_WRAPPER(40,ITextHostImpl_TxImmReleaseContext,8)
586DEFINE_STDCALL_WRAPPER(41,ITextHostImpl_TxGetSelectionBarWidth,8)
587
588const ITextHostVtbl itextHostStdcallVtbl = {
589 NULL,
590 NULL,
591 NULL,
631};
632
633#endif /* __i386__ */
634
635static const ITextHostVtbl textHostVtbl = {
678};
Arabic default style
Definition: afstyles.h:94
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define HandleToLong(h)
Definition: basetsd.h:80
#define LongToHandle(h)
Definition: basetsd.h:82
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:111
HBITMAP hbmp
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
DWORD HIMC
Definition: dimm.idl:75
#define NULL
Definition: types.h:112
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
HIMC WINAPI ImmGetContext(HWND hWnd)
Definition: imm.c:1057
BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC)
Definition: imm.c:1098
#define INFINITE
Definition: serial.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLenum GLint GLuint mask
Definition: glext.h:6028
GLuint id
Definition: glext.h:5910
#define cs
Definition: i386-dis.c:443
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
#define pch(ap)
Definition: match.c:418
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
#define __thiscall
Definition: cpp.c:43
unsigned int UINT
Definition: ndis.h:50
_Out_ LPRECT prc
Definition: ntgdi.h:1658
#define DEFINE_THISCALL_WRAPPER(func, args)
Definition: msvc-thiscall.c:2
#define ES_PASSWORD
Definition: pedump.c:670
#define ES_READONLY
Definition: pedump.c:675
#define ES_AUTOVSCROLL
Definition: pedump.c:671
#define ES_NOHIDESEL
Definition: pedump.c:673
#define WS_VSCROLL
Definition: pedump.c:627
#define ES_AUTOHSCROLL
Definition: pedump.c:672
long LONG
Definition: pedump.c:60
#define WS_HSCROLL
Definition: pedump.c:628
#define ES_CENTER
Definition: pedump.c:665
#define ES_RIGHT
Definition: pedump.c:666
#define ES_MULTILINE
Definition: pedump.c:667
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define THISCALL(func)
Definition: asm.h:145
#define TM_RICHTEXT
Definition: richedit.h:1029
#define PFA_RIGHT
Definition: richedit.h:922
#define PFA_CENTER
Definition: richedit.h:923
#define PFA_LEFT
Definition: richedit.h:921
#define EN_PROTECTED
Definition: richedit.h:195
#define ECO_AUTOWORDSELECTION
Definition: richedit.h:456
#define EN_SELCHANGE
Definition: richedit.h:193
#define ES_NOOLEDRAGDROP
Definition: richedit.h:223
#define EN_REQUESTRESIZE
Definition: richedit.h:192
#define ES_DISABLENOSCROLL
Definition: richedit.h:224
#define EN_STOPNOUNDO
Definition: richedit.h:197
#define PFM_ALIGNMENT
Definition: richedit.h:841
#define EN_DROPFILES
Definition: richedit.h:194
#define ES_SAVESEL
Definition: richedit.h:226
#define EN_MSGFILTER
Definition: richedit.h:191
#define EN_LINK
Definition: richedit.h:202
#define ES_SELECTIONBAR
Definition: richedit.h:230
#define ES_VERTICAL
Definition: richedit.h:229
#define WM_NOTIFY
Definition: richedit.h:61
#define EN_SAVECLIPBOARD
Definition: richedit.h:199
#define EN_OLEOPFAILED
Definition: richedit.h:200
#define memset(x, y, z)
Definition: compat.h:39
BOOL bEmulateVersion10
Definition: txthost.c:38
LONG ref
Definition: txthost.c:36
ITextHost ITextHost_iface
Definition: txthost.c:35
PARAFORMAT2 para_fmt
Definition: txthost.c:39
HWND hWnd
Definition: txthost.c:37
WORD wAlignment
Definition: richedit.h:673
DWORD dwMask
Definition: richedit.h:667
UINT cbSize
Definition: richedit.h:666
Definition: dsound.c:943
Definition: send.c:48
DWORD styleFlags
Definition: editstr.h:388
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define TXTBIT_AUTOWORDSEL
Definition: textserv.h:193
#define TXTBIT_WORDWRAP
Definition: textserv.h:196
#define TXTBIT_MULTILINE
Definition: textserv.h:187
#define TXTBIT_VERTICAL
Definition: textserv.h:194
#define TXTBIT_ALLOWBEEP
Definition: textserv.h:197
enum _TXTBACKSTYLE TXTBACKSTYLE
#define TXTBIT_SAVESELECTION
Definition: textserv.h:192
#define TXTBIT_READONLY
Definition: textserv.h:188
@ TXTBACK_OPAQUE
Definition: textserv.h:166
#define TXTBIT_RICHTEXT
Definition: textserv.h:186
#define TXTBIT_USEPASSWORD
Definition: textserv.h:190
#define TXTBIT_HIDESELECTION
Definition: textserv.h:191
#define TXTBIT_DISABLEDRAG
Definition: textserv.h:198
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxScrollWindowEx(ITextHost *iface, INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hRgnUpdate, LPRECT lprcUpdate, UINT fuScroll)
Definition: txthost.c:189
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetMaxLength(ITextHost *iface, DWORD *pLength)
Definition: txthost.c:282
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetScrollBars(ITextHost *iface, DWORD *pdwScrollBar)
Definition: txthost.c:288
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxViewChange(ITextHost *iface, BOOL fUpdate)
Definition: txthost.c:149
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetBackStyle(ITextHost *iface, TXTBACKSTYLE *pStyle)
Definition: txthost.c:276
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow)
Definition: txthost.c:162
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxSetScrollPos(ITextHost *iface, INT fnBar, INT nPos, BOOL fRedraw)
Definition: txthost.c:137
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxKillTimer(ITextHost *iface, UINT idTimer)
Definition: txthost.c:183
DECLSPEC_HIDDEN INT __thiscall ITextHostImpl_TxReleaseDC(ITextHost *iface, HDC hdc)
Definition: txthost.c:112
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxShowScrollBar(ITextHost *iface, INT fnBar, BOOL fShow)
Definition: txthost.c:118
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxInvalidateRect(ITextHost *iface, LPCRECT prc, BOOL fMode)
Definition: txthost.c:143
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_OnTxCharFormatChange(ITextHost *iface, const CHARFORMATW *pcf)
Definition: txthost.c:328
static const ITextHostVtbl textHostVtbl
Definition: txthost.c:42
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxSetScrollRange(ITextHost *iface, INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw)
Definition: txthost.c:130
static ITextHostImpl * impl_from_ITextHost(ITextHost *iface)
Definition: txthost.c:67
static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface)
Definition: txthost.c:93
DECLSPEC_HIDDEN COLORREF __thiscall ITextHostImpl_TxGetSysColor(ITextHost *iface, int nIndex)
Definition: txthost.c:271
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetCharFormat(ITextHost *iface, const CHARFORMATW **ppCF)
Definition: txthost.c:259
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_OnTxParaFormatChange(ITextHost *iface, const PARAFORMAT *ppf)
Definition: txthost.c:333
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc)
Definition: txthost.c:468
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxClientToScreen(ITextHost *iface, LPPOINT lppt)
Definition: txthost.c:224
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetExtent(ITextHost *iface, LPSIZEL lpExtent)
Definition: txthost.c:323
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface, LONG *lSelBarWidth)
Definition: txthost.c:474
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxDeactivate(ITextHost *iface, LONG lNewState)
Definition: txthost.c:237
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetParaFormat(ITextHost *iface, const PARAFORMAT **fmt)
Definition: txthost.c:264
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface, LONG *pch)
Definition: txthost.c:317
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxSetTimer(ITextHost *iface, UINT idTimer, UINT uTimeout)
Definition: txthost.c:177
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetClientRect(ITextHost *iface, LPRECT prc)
Definition: txthost.c:243
static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface, REFIID riid, void **ppvObject)
Definition: txthost.c:72
static ULONG WINAPI ITextHostImpl_AddRef(ITextHost *iface)
Definition: txthost.c:86
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxActivate(ITextHost *iface, LONG *plOldState)
Definition: txthost.c:230
DECLSPEC_HIDDEN HDC __thiscall ITextHostImpl_TxGetDC(ITextHost *iface)
Definition: txthost.c:106
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxSetCaretPos(ITextHost *iface, INT x, INT y)
Definition: txthost.c:171
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxSetCursor(ITextHost *iface, HCURSOR hcur, BOOL fText)
Definition: txthost.c:213
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetPropertyBits(ITextHost *iface, DWORD dwMask, DWORD *pdwBits)
Definition: txthost.c:338
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxEnableScrollBar(ITextHost *iface, INT fuSBFlags, INT fuArrowflags)
Definition: txthost.c:124
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxSetCapture(ITextHost *iface, BOOL fCapture)
Definition: txthost.c:198
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxCreateCaret(ITextHost *iface, HBITMAP hbmp, INT xWidth, INT yHeight)
Definition: txthost.c:156
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetViewInset(ITextHost *iface, LPRECT prc)
Definition: txthost.c:250
DECLSPEC_HIDDEN HIMC __thiscall ITextHostImpl_TxImmGetContext(ITextHost *iface)
Definition: txthost.c:462
DECLSPEC_HIDDEN BOOL __thiscall ITextHostImpl_TxScreenToClient(ITextHost *iface, LPPOINT lppt)
Definition: txthost.c:218
ITextHost * ME_CreateTextHost(HWND hwnd, CREATESTRUCTW *cs, BOOL bEmulateVersion10)
Definition: txthost.c:44
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetPasswordChar(ITextHost *iface, WCHAR *pch)
Definition: txthost.c:311
DECLSPEC_HIDDEN void __thiscall ITextHostImpl_TxSetFocus(ITextHost *iface)
Definition: txthost.c:207
DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxNotify(ITextHost *iface, DWORD iNotify, void *pv)
Definition: txthost.c:404
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
int ret
#define STDCALL
Definition: wdf.h:45
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
DWORD COLORREF
Definition: windef.h:300
HICON HCURSOR
Definition: windef.h:299
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
#define MAKEWPARAM(l, h)
Definition: winuser.h:3999
#define GetWindowLongPtrW
Definition: winuser.h:4819
BOOL WINAPI ShowCaret(_In_opt_ HWND)
#define EN_KILLFOCUS
Definition: winuser.h:2015
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
#define EN_SETFOCUS
Definition: winuser.h:2017
#define EN_UPDATE
Definition: winuser.h:2018
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1730
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define EN_MAXTEXT
Definition: winuser.h:2016
#define EN_HSCROLL
Definition: winuser.h:2014
int WINAPI SetScrollPos(_In_ HWND, _In_ int, _In_ int, _In_ BOOL)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI SetScrollRange(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ BOOL)
HWND WINAPI SetActiveWindow(_In_ HWND)
BOOL WINAPI UpdateWindow(_In_ HWND)
HDC WINAPI GetDC(_In_opt_ HWND)
#define EN_VSCROLL
Definition: winuser.h:2019
#define GWLP_ID
Definition: winuser.h:854
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
BOOL WINAPI SetCaretPos(_In_ int, _In_ int)
BOOL WINAPI CreateCaret(_In_ HWND, _In_opt_ HBITMAP, _In_ int, _In_ int)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
Definition: winuser.h:5336
#define EN_ERRSPACE
Definition: winuser.h:2013
#define GWL_STYLE
Definition: winuser.h:846
BOOL WINAPI IsWindowVisible(_In_ HWND)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
BOOL WINAPI EnableScrollBar(_In_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI HideCaret(_In_opt_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define EN_CHANGE
Definition: winuser.h:2012
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define const
Definition: zconf.h:233