ReactOS 0.4.16-dev-1276-g70732b0
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/debug.h"
29#include "editstr.h"
30#include "rtf.h"
31#include "undocuser.h"
32#include "riched20.h"
33
35
36struct host
37{
38 ITextHost2 ITextHost_iface;
40 ITextServices *text_srv;
42 unsigned int emulate_10 : 1;
43 unsigned int dialog_mode : 1;
44 unsigned int want_return : 1;
45 unsigned int sel_bar : 1;
46 unsigned int client_edge : 1;
47 unsigned int use_set_rect : 1;
48 unsigned int use_back_colour : 1;
49 unsigned int defer_release : 1;
55 unsigned int notify_level;
56};
57
58static const ITextHost2Vtbl textHostVtbl;
59
62
63static void host_init_props( struct host *host )
64{
66
68
69 /* text services assumes the scrollbars are originally not shown, so hide them.
70 However with ES_DISABLENOSCROLL it'll immediately show them, so don't bother */
72
77
86
88
91
94}
95
97{
98 struct host *texthost;
99
100 texthost = malloc( sizeof(*texthost) );
101 if (!texthost) return NULL;
102
103 texthost->ITextHost_iface.lpVtbl = &textHostVtbl;
104 texthost->ref = 1;
105 texthost->text_srv = NULL;
106 texthost->window = hwnd;
107 texthost->parent = cs->hwndParent;
108 texthost->emulate_10 = emulate_10;
109 texthost->dialog_mode = 0;
110 memset( &texthost->para_fmt, 0, sizeof(texthost->para_fmt) );
111 texthost->para_fmt.cbSize = sizeof(texthost->para_fmt);
112 texthost->para_fmt.dwMask = PFM_ALIGNMENT;
113 texthost->para_fmt.wAlignment = PFA_LEFT;
114 if (cs->style & ES_RIGHT)
115 texthost->para_fmt.wAlignment = PFA_RIGHT;
116 if (cs->style & ES_CENTER)
117 texthost->para_fmt.wAlignment = PFA_CENTER;
118 host_init_props( texthost );
119 texthost->event_mask = 0;
120 texthost->use_set_rect = 0;
121 SetRectEmpty( &texthost->set_rect );
122 GetClientRect( hwnd, &texthost->client_rect );
123 texthost->use_back_colour = 0;
124 texthost->password_char = (texthost->props & TXTBIT_USEPASSWORD) ? '*' : 0;
125 texthost->defer_release = 0;
126 texthost->notify_level = 0;
127
128 return texthost;
129}
130
131static inline struct host *impl_from_ITextHost( ITextHost2 *iface )
132{
133 return CONTAINING_RECORD( iface, struct host, ITextHost_iface );
134}
135
136static HRESULT WINAPI ITextHostImpl_QueryInterface( ITextHost2 *iface, REFIID iid, void **obj )
137{
138 struct host *host = impl_from_ITextHost( iface );
139
140 if (IsEqualIID( iid, &IID_IUnknown ) || IsEqualIID( iid, &IID_ITextHost ) || IsEqualIID( iid, &IID_ITextHost2 ))
141 {
143 ITextHost_AddRef( (ITextHost *)*obj );
144 return S_OK;
145 }
146
147 FIXME( "Unknown interface: %s\n", debugstr_guid( iid ) );
148 return E_NOINTERFACE;
149}
150
151static ULONG WINAPI ITextHostImpl_AddRef( ITextHost2 *iface )
152{
153 struct host *host = impl_from_ITextHost( iface );
155 return ref;
156}
157
158static ULONG WINAPI ITextHostImpl_Release( ITextHost2 *iface )
159{
160 struct host *host = impl_from_ITextHost( iface );
162
163 if (!ref)
164 {
165 SetWindowLongPtrW( host->window, 0, 0 );
166 ITextServices_Release( host->text_srv );
167 free( host );
168 }
169 return ref;
170}
171
174{
175 struct host *host = impl_from_ITextHost( iface );
176 return GetDC( host->window );
177}
178
181{
182 struct host *host = impl_from_ITextHost( iface );
183 return ReleaseDC( host->window, hdc );
184}
185
188{
189 struct host *host = impl_from_ITextHost( iface );
190 return ShowScrollBar( host->window, bar, show );
191}
192
195{
196 struct host *host = impl_from_ITextHost( iface );
197 return EnableScrollBar( host->window, bar, arrows );
198}
199
201BOOL __thiscall ITextHostImpl_TxSetScrollRange( ITextHost2 *iface, INT bar, LONG min_pos, INT max_pos, BOOL redraw )
202{
203 struct host *host = impl_from_ITextHost( iface );
204 SCROLLINFO info = { .cbSize = sizeof(info), .fMask = SIF_PAGE | SIF_RANGE };
205
206 if (bar != SB_HORZ && bar != SB_VERT)
207 {
208 FIXME( "Unexpected bar %d\n", bar );
209 return FALSE;
210 }
211
213
214 if (host->text_srv) /* This can be called during text services creation */
215 {
218 }
219
220 info.nMin = min_pos;
221 info.nMax = max_pos;
222 return SetScrollInfo( host->window, bar, &info, redraw );
223}
224
227{
228 struct host *host = impl_from_ITextHost( iface );
231 BOOL show = TRUE, shown = style & mask;
232
233 if (bar != SB_HORZ && bar != SB_VERT)
234 {
235 FIXME( "Unexpected bar %d\n", bar );
236 return FALSE;
237 }
238
239 /* If the application has adjusted the scrollbar's visibility it is reset */
241 {
244 }
245
246 if (!show ^ !shown) ShowScrollBar( host->window, bar, show );
247 return SetScrollPos( host->window, bar, pos, redraw ) != 0;
248}
249
252{
253 struct host *host = impl_from_ITextHost( iface );
255}
256
258void __thiscall ITextHostImpl_TxViewChange( ITextHost2 *iface, BOOL update )
259{
260 struct host *host = impl_from_ITextHost( iface );
261 if (update) UpdateWindow( host->window );
262}
263
266{
267 struct host *host = impl_from_ITextHost( iface );
269}
270
273{
274 struct host *host = impl_from_ITextHost( iface );
275 if (show) return ShowCaret( host->window );
276 else return HideCaret( host->window );
277}
278
281{
282 return SetCaretPos(x, y);
283}
284
287{
288 struct host *host = impl_from_ITextHost( iface );
289 return SetTimer( host->window, id, timeout, NULL ) != 0;
290}
291
294{
295 struct host *host = impl_from_ITextHost( iface );
296 KillTimer( host->window, id );
297}
298
301 const RECT *clip, HRGN update_rgn, RECT *update_rect,
302 UINT flags )
303{
304 struct host *host = impl_from_ITextHost( iface );
305 ScrollWindowEx( host->window, dx, dy, scroll, clip, update_rgn, update_rect, flags );
306}
307
309void __thiscall ITextHostImpl_TxSetCapture( ITextHost2 *iface, BOOL capture )
310{
311 struct host *host = impl_from_ITextHost( iface );
312 if (capture) SetCapture( host->window );
313 else ReleaseCapture();
314}
315
318{
319 struct host *host = impl_from_ITextHost( iface );
320 SetFocus( host->window );
321}
322
325{
326 SetCursor( cursor );
327}
328
331{
332 struct host *host = impl_from_ITextHost( iface );
333 return ScreenToClient( host->window, pt );
334}
335
338{
339 struct host *host = impl_from_ITextHost( iface );
340 return ClientToScreen( host->window, pt );
341}
342
344HRESULT __thiscall ITextHostImpl_TxActivate( ITextHost2 *iface, LONG *old_state )
345{
346 struct host *host = impl_from_ITextHost( iface );
347 *old_state = HandleToLong( SetActiveWindow( host->window ) );
348 return *old_state ? S_OK : E_FAIL;
349}
350
352HRESULT __thiscall ITextHostImpl_TxDeactivate( ITextHost2 *iface, LONG new_state )
353{
354 HWND ret = SetActiveWindow( LongToHandle( new_state ) );
355 return ret ? S_OK : E_FAIL;
356}
357
360{
361 struct host *host = impl_from_ITextHost( iface );
362
363 if (!host->use_set_rect)
364 {
366 if (host->client_edge) rect->top += 1;
367 InflateRect( rect, -1, 0 );
368 }
369 else *rect = host->set_rect;
370
371 return S_OK;
372}
373
376{
378 return S_OK;
379}
380
383{
384 return E_NOTIMPL;
385}
386
389{
390 struct host *host = impl_from_ITextHost( iface );
391 *fmt = (const PARAFORMAT *)&host->para_fmt;
392 return S_OK;
393}
394
397{
398 struct host *host = impl_from_ITextHost( iface );
399
401 return GetSysColor( index );
402}
403
406{
408 return S_OK;
409}
410
413{
414 *length = INFINITE;
415 return S_OK;
416}
417
420{
421 struct host *host = impl_from_ITextHost( iface );
422
424 return S_OK;
425}
426
429{
430 struct host *host = impl_from_ITextHost( iface );
431
432 *c = host->password_char;
433 return *c ? S_OK : S_FALSE;
434}
435
438{
439 *pos = -1;
440 return S_OK;
441}
442
445{
446 return E_NOTIMPL;
447}
448
451{
452 return S_OK;
453}
454
457{
458 return S_OK;
459}
460
463{
464 struct host *host = impl_from_ITextHost( iface );
465
466 *bits = host->props & mask;
467 return S_OK;
468}
469
471HRESULT __thiscall ITextHostImpl_TxNotify( ITextHost2 *iface, DWORD iNotify, void *pv )
472{
473 struct host *host = impl_from_ITextHost( iface );
474 UINT id;
475
476 if (!host->parent) return S_OK;
477
479
480 switch (iNotify)
481 {
482 case EN_DROPFILES:
483 case EN_LINK:
484 case EN_OLEOPFAILED:
485 case EN_PROTECTED:
486 case EN_REQUESTRESIZE:
487 case EN_SAVECLIPBOARD:
488 case EN_SELCHANGE:
489 case EN_STOPNOUNDO:
490 {
491 /* FIXME: Verify this assumption that pv starts with NMHDR. */
492 NMHDR *info = pv;
493 if (!info)
494 return E_FAIL;
495
496 info->hwndFrom = host->window;
497 info->idFrom = id;
498 info->code = iNotify;
500 break;
501 }
502
503 case EN_UPDATE:
504 /* Only sent when the window is visible. */
505 if (!IsWindowVisible( host->window ))
506 break;
507 /* Fall through */
508 case EN_CHANGE:
509 case EN_ERRSPACE:
510 case EN_HSCROLL:
511 case EN_KILLFOCUS:
512 case EN_MAXTEXT:
513 case EN_SETFOCUS:
514 case EN_VSCROLL:
516 break;
517
518 case EN_MSGFILTER:
519 FIXME("EN_MSGFILTER is documented as not being sent to TxNotify\n");
520 /* fall through */
521 default:
522 return E_FAIL;
523 }
524 return S_OK;
525}
526
529{
530 struct host *host = impl_from_ITextHost( iface );
531 return ImmGetContext( host->window );
532}
533
536{
537 struct host *host = impl_from_ITextHost( iface );
539}
540
543{
544 struct host *host = impl_from_ITextHost( iface );
545
546 *width = host->sel_bar ? 225 : 0; /* in HIMETRIC */
547 return S_OK;
548}
549
552{
553 return FALSE;
554}
555
558{
559 struct host *host = impl_from_ITextHost( iface );
560 *hwnd = host->window;
561 return S_OK;
562}
563
566{
567 return E_NOTIMPL;
568}
569
571HPALETTE __thiscall ITextHostImpl_TxGetPalette( ITextHost2 *iface )
572{
573 return NULL;
574}
575
578{
579 return E_NOTIMPL;
580}
581
584{
585 return NULL;
586}
587
590{
591 return;
592}
593
596{
597 return E_NOTIMPL;
598}
599
602{
603 return E_NOTIMPL;
604}
605
608{
609 return E_NOTIMPL;
610}
611
614{
615 return E_NOTIMPL;
616}
617
619HRESULT __thiscall ITextHostImpl_TxGetHorzExtent( ITextHost2 *iface, LONG *horz_extent )
620{
621 return E_NOTIMPL;
622}
623
624
625#ifdef __ASM_USE_THISCALL_WRAPPER
626
627#define STDCALL(func) (void *) __stdcall_ ## func
628#ifdef _MSC_VER
629#define DEFINE_STDCALL_WRAPPER(num,func,args) \
630 __declspec(naked) HRESULT __stdcall_##func(void) \
631 { \
632 __asm pop eax \
633 __asm pop ecx \
634 __asm push eax \
635 __asm mov eax, [ecx] \
636 __asm jmp dword ptr [eax + 4*num] \
637 }
638#else /* _MSC_VER */
639#define DEFINE_STDCALL_WRAPPER(num,func,args) \
640 extern HRESULT __stdcall_ ## func(void); \
641 __ASM_GLOBAL_FUNC(__stdcall_ ## func, \
642 "popl %eax\n\t" \
643 "popl %ecx\n\t" \
644 "pushl %eax\n\t" \
645 "movl (%ecx), %eax\n\t" \
646 "jmp *(4*(" #num "))(%eax)" )
647#endif /* _MSC_VER */
648
649DEFINE_STDCALL_WRAPPER(3,ITextHostImpl_TxGetDC,4)
650DEFINE_STDCALL_WRAPPER(4,ITextHostImpl_TxReleaseDC,8)
651DEFINE_STDCALL_WRAPPER(5,ITextHostImpl_TxShowScrollBar,12)
652DEFINE_STDCALL_WRAPPER(6,ITextHostImpl_TxEnableScrollBar,12)
653DEFINE_STDCALL_WRAPPER(7,ITextHostImpl_TxSetScrollRange,20)
654DEFINE_STDCALL_WRAPPER(8,ITextHostImpl_TxSetScrollPos,16)
655DEFINE_STDCALL_WRAPPER(9,ITextHostImpl_TxInvalidateRect,12)
656DEFINE_STDCALL_WRAPPER(10,ITextHostImpl_TxViewChange,8)
657DEFINE_STDCALL_WRAPPER(11,ITextHostImpl_TxCreateCaret,16)
658DEFINE_STDCALL_WRAPPER(12,ITextHostImpl_TxShowCaret,8)
659DEFINE_STDCALL_WRAPPER(13,ITextHostImpl_TxSetCaretPos,12)
660DEFINE_STDCALL_WRAPPER(14,ITextHostImpl_TxSetTimer,12)
661DEFINE_STDCALL_WRAPPER(15,ITextHostImpl_TxKillTimer,8)
662DEFINE_STDCALL_WRAPPER(16,ITextHostImpl_TxScrollWindowEx,32)
663DEFINE_STDCALL_WRAPPER(17,ITextHostImpl_TxSetCapture,8)
664DEFINE_STDCALL_WRAPPER(18,ITextHostImpl_TxSetFocus,4)
665DEFINE_STDCALL_WRAPPER(19,ITextHostImpl_TxSetCursor,12)
666DEFINE_STDCALL_WRAPPER(20,ITextHostImpl_TxScreenToClient,8)
667DEFINE_STDCALL_WRAPPER(21,ITextHostImpl_TxClientToScreen,8)
668DEFINE_STDCALL_WRAPPER(22,ITextHostImpl_TxActivate,8)
669DEFINE_STDCALL_WRAPPER(23,ITextHostImpl_TxDeactivate,8)
670DEFINE_STDCALL_WRAPPER(24,ITextHostImpl_TxGetClientRect,8)
671DEFINE_STDCALL_WRAPPER(25,ITextHostImpl_TxGetViewInset,8)
672DEFINE_STDCALL_WRAPPER(26,ITextHostImpl_TxGetCharFormat,8)
673DEFINE_STDCALL_WRAPPER(27,ITextHostImpl_TxGetParaFormat,8)
674DEFINE_STDCALL_WRAPPER(28,ITextHostImpl_TxGetSysColor,8)
675DEFINE_STDCALL_WRAPPER(29,ITextHostImpl_TxGetBackStyle,8)
676DEFINE_STDCALL_WRAPPER(30,ITextHostImpl_TxGetMaxLength,8)
677DEFINE_STDCALL_WRAPPER(31,ITextHostImpl_TxGetScrollBars,8)
678DEFINE_STDCALL_WRAPPER(32,ITextHostImpl_TxGetPasswordChar,8)
679DEFINE_STDCALL_WRAPPER(33,ITextHostImpl_TxGetAcceleratorPos,8)
680DEFINE_STDCALL_WRAPPER(34,ITextHostImpl_TxGetExtent,8)
681DEFINE_STDCALL_WRAPPER(35,ITextHostImpl_OnTxCharFormatChange,8)
682DEFINE_STDCALL_WRAPPER(36,ITextHostImpl_OnTxParaFormatChange,8)
683DEFINE_STDCALL_WRAPPER(37,ITextHostImpl_TxGetPropertyBits,12)
684DEFINE_STDCALL_WRAPPER(38,ITextHostImpl_TxNotify,12)
685DEFINE_STDCALL_WRAPPER(39,ITextHostImpl_TxImmGetContext,4)
686DEFINE_STDCALL_WRAPPER(40,ITextHostImpl_TxImmReleaseContext,8)
687DEFINE_STDCALL_WRAPPER(41,ITextHostImpl_TxGetSelectionBarWidth,8)
688/* ITextHost2 */
689DEFINE_STDCALL_WRAPPER(42,ITextHostImpl_TxIsDoubleClickPending,4)
690DEFINE_STDCALL_WRAPPER(43,ITextHostImpl_TxGetWindow,8)
691DEFINE_STDCALL_WRAPPER(44,ITextHostImpl_TxSetForegroundWindow,4)
692DEFINE_STDCALL_WRAPPER(45,ITextHostImpl_TxGetPalette,4)
693DEFINE_STDCALL_WRAPPER(46,ITextHostImpl_TxGetEastAsianFlags,8)
694DEFINE_STDCALL_WRAPPER(47,ITextHostImpl_TxSetCursor2,12)
695DEFINE_STDCALL_WRAPPER(48,ITextHostImpl_TxFreeTextServicesNotification,4)
696DEFINE_STDCALL_WRAPPER(49,ITextHostImpl_TxGetEditStyle,12)
697DEFINE_STDCALL_WRAPPER(50,ITextHostImpl_TxGetWindowStyles,12)
698DEFINE_STDCALL_WRAPPER(51,ITextHostImpl_TxShowDropCaret,16)
699DEFINE_STDCALL_WRAPPER(52,ITextHostImpl_TxDestroyCaret,4)
700DEFINE_STDCALL_WRAPPER(53,ITextHostImpl_TxGetHorzExtent,8)
701
702const ITextHost2Vtbl text_host2_stdcall_vtbl =
703{
704 NULL,
705 NULL,
706 NULL,
746/* ITextHost2 */
759};
760
761#endif /* __ASM_USE_THISCALL_WRAPPER */
762
763static const ITextHost2Vtbl textHostVtbl =
764{
807/* ITextHost2 */
820};
821
822static const char * const edit_messages[] =
823{
824 "EM_GETSEL", "EM_SETSEL", "EM_GETRECT", "EM_SETRECT",
825 "EM_SETRECTNP", "EM_SCROLL", "EM_LINESCROLL", "EM_SCROLLCARET",
826 "EM_GETMODIFY", "EM_SETMODIFY", "EM_GETLINECOUNT", "EM_LINEINDEX",
827 "EM_SETHANDLE", "EM_GETHANDLE", "EM_GETTHUMB", "EM_UNKNOWN_BF",
828 "EM_UNKNOWN_C0", "EM_LINELENGTH", "EM_REPLACESEL", "EM_UNKNOWN_C3",
829 "EM_GETLINE", "EM_LIMITTEXT", "EM_CANUNDO", "EM_UNDO",
830 "EM_FMTLINES", "EM_LINEFROMCHAR", "EM_UNKNOWN_CA", "EM_SETTABSTOPS",
831 "EM_SETPASSWORDCHAR", "EM_EMPTYUNDOBUFFER", "EM_GETFIRSTVISIBLELINE", "EM_SETREADONLY",
832 "EM_SETWORDBREAKPROC", "EM_GETWORDBREAKPROC", "EM_GETPASSWORDCHAR", "EM_SETMARGINS",
833 "EM_GETMARGINS", "EM_GETLIMITTEXT", "EM_POSFROMCHAR", "EM_CHARFROMPOS",
834 "EM_SETIMESTATUS", "EM_GETIMESTATUS"
835};
836
837static const char * const richedit_messages[] =
838{
839 "EM_CANPASTE", "EM_DISPLAYBAND", "EM_EXGETSEL", "EM_EXLIMITTEXT",
840 "EM_EXLINEFROMCHAR", "EM_EXSETSEL", "EM_FINDTEXT", "EM_FORMATRANGE",
841 "EM_GETCHARFORMAT", "EM_GETEVENTMASK", "EM_GETOLEINTERFACE", "EM_GETPARAFORMAT",
842 "EM_GETSELTEXT", "EM_HIDESELECTION", "EM_PASTESPECIAL", "EM_REQUESTRESIZE",
843 "EM_SELECTIONTYPE", "EM_SETBKGNDCOLOR", "EM_SETCHARFORMAT", "EM_SETEVENTMASK",
844 "EM_SETOLECALLBACK", "EM_SETPARAFORMAT", "EM_SETTARGETDEVICE", "EM_STREAMIN",
845 "EM_STREAMOUT", "EM_GETTEXTRANGE", "EM_FINDWORDBREAK", "EM_SETOPTIONS",
846 "EM_GETOPTIONS", "EM_FINDTEXTEX", "EM_GETWORDBREAKPROCEX", "EM_SETWORDBREAKPROCEX",
847 "EM_SETUNDOLIMIT", "EM_UNKNOWN_USER_83", "EM_REDO", "EM_CANREDO",
848 "EM_GETUNDONAME", "EM_GETREDONAME", "EM_STOPGROUPTYPING", "EM_SETTEXTMODE",
849 "EM_GETTEXTMODE", "EM_AUTOURLDETECT", "EM_GETAUTOURLDETECT", "EM_SETPALETTE",
850 "EM_GETTEXTEX", "EM_GETTEXTLENGTHEX", "EM_SHOWSCROLLBAR", "EM_SETTEXTEX",
851 "EM_UNKNOWN_USER_98", "EM_UNKNOWN_USER_99", "EM_SETPUNCTUATION", "EM_GETPUNCTUATION",
852 "EM_SETWORDWRAPMODE", "EM_GETWORDWRAPMODE", "EM_SETIMECOLOR", "EM_GETIMECOLOR",
853 "EM_SETIMEOPTIONS", "EM_GETIMEOPTIONS", "EM_CONVPOSITION", "EM_UNKNOWN_USER_109",
854 "EM_UNKNOWN_USER_110", "EM_UNKNOWN_USER_111", "EM_UNKNOWN_USER_112", "EM_UNKNOWN_USER_113",
855 "EM_UNKNOWN_USER_114", "EM_UNKNOWN_USER_115", "EM_UNKNOWN_USER_116", "EM_UNKNOWN_USER_117",
856 "EM_UNKNOWN_USER_118", "EM_UNKNOWN_USER_119", "EM_SETLANGOPTIONS", "EM_GETLANGOPTIONS",
857 "EM_GETIMECOMPMODE", "EM_FINDTEXTW", "EM_FINDTEXTEXW", "EM_RECONVERSION",
858 "EM_SETIMEMODEBIAS", "EM_GETIMEMODEBIAS"
859};
860
861static const char *get_msg_name( UINT msg )
862{
863 if (msg >= EM_GETSEL && msg <= EM_CHARFROMPOS)
864 return edit_messages[msg - EM_GETSEL];
867 return "";
868}
869
871{
872 struct host *host = host_create( hwnd, create, emulate_10 );
873 IUnknown *unk;
874 HRESULT hr;
875
876 if (!host) return FALSE;
877
878 hr = create_text_services( NULL, (ITextHost *)&host->ITextHost_iface, &unk, emulate_10 );
879 if (FAILED( hr ))
880 {
881 ITextHost2_Release( &host->ITextHost_iface );
882 return FALSE;
883 }
884 IUnknown_QueryInterface( unk, &IID_ITextServices, (void **)&host->text_srv );
885 IUnknown_Release( unk );
886
888
889 return TRUE;
890}
891
893{
895 WORD sizeA;
896 HRESULT hr;
897 WCHAR *buf;
898
899 *res = 0;
900 sizeA = *(WORD *)lparam;
901 *(WORD *)lparam = 0;
902 if (!sizeA) return S_OK;
903 buf = malloc( len * sizeof(WCHAR) );
904 if (!buf) return E_OUTOFMEMORY;
905 *(WORD *)buf = len;
907 if (hr == S_OK && len)
908 {
909 len = WideCharToMultiByte( CP_ACP, 0, buf, len, (char *)lparam, sizeA, NULL, NULL );
910 if (!len && GetLastError() == ERROR_INSUFFICIENT_BUFFER) len = sizeA;
911 if (len < sizeA) ((char *)lparam)[len] = '\0';
912 *res = len;
913 }
914 free( buf );
915 return hr;
916}
917
919{
921 HRESULT hr;
922 unsigned int count;
923 LRESULT len;
924
925 *res = 0;
926 if (rangeA->chrg.cpMin < 0) return S_OK;
928 range.chrg = rangeA->chrg;
929 if ((range.chrg.cpMin == 0 && range.chrg.cpMax == -1) || range.chrg.cpMax > len)
930 range.chrg.cpMax = len;
931 if (range.chrg.cpMin >= range.chrg.cpMax) return S_OK;
932 count = range.chrg.cpMax - range.chrg.cpMin + 1;
933 range.lpstrText = malloc( count * sizeof(WCHAR) );
934 if (!range.lpstrText) return E_OUTOFMEMORY;
936 if (hr == S_OK && len)
937 {
938 if (!host->emulate_10) count = INT_MAX;
939 len = WideCharToMultiByte( CP_ACP, 0, range.lpstrText, -1, rangeA->lpstrText, count, NULL, NULL );
940 if (!host->emulate_10) *res = len - 1;
941 else
942 {
943 *res = count - 1;
944 rangeA->lpstrText[*res] = '\0';
945 }
946 }
947 free( range.lpstrText );
948 return hr;
949}
950
952{
953 DWORD style, old_options, new_options, change, props_mask = 0;
956
957 new_options = old_options = SendMessageW( host->window, EM_GETOPTIONS, 0, 0 );
958
959 switch (op)
960 {
961 case ECOOP_SET:
962 new_options = value;
963 break;
964 case ECOOP_OR:
965 new_options |= value;
966 break;
967 case ECOOP_AND:
968 new_options &= value;
969 break;
970 case ECOOP_XOR:
971 new_options ^= value;
972 }
973 new_options &= mask;
974
975 change = (new_options ^ old_options);
976
977 if (change & ECO_AUTOWORDSELECTION)
978 {
980 props_mask |= TXTBIT_AUTOWORDSEL;
981 }
982 if (change & ECO_AUTOVSCROLL)
983 {
985 props_mask |= TXTBIT_SCROLLBARCHANGE;
986 }
987 if (change & ECO_AUTOHSCROLL)
988 {
990 props_mask |= TXTBIT_SCROLLBARCHANGE;
991 }
992 if (change & ECO_NOHIDESEL)
993 {
995 props_mask |= TXTBIT_HIDESELECTION;
996 }
997 if (change & ECO_READONLY)
998 {
1000 props_mask |= TXTBIT_READONLY;
1001 }
1002 if (change & ECO_SAVESEL)
1003 {
1005 props_mask |= TXTBIT_SAVESELECTION;
1006 }
1007 if (change & ECO_SELECTIONBAR)
1008 {
1009 host->sel_bar ^= 1;
1010 props_mask |= TXTBIT_SELBARCHANGE;
1011 if (host->use_set_rect)
1012 {
1015 props_mask |= TXTBIT_CLIENTRECTCHANGE;
1016 }
1017 }
1018 if (change & ECO_VERTICAL)
1019 {
1021 props_mask |= TXTBIT_VERTICAL;
1022 }
1023 if (change & ECO_WANTRETURN) host->want_return ^= 1;
1024
1025 if (props_mask)
1026 ITextServices_OnTxPropertyBitsChange( host->text_srv, props_mask, host->props & props_mask );
1027
1028 *res = new_options;
1029
1030 mask &= ~ECO_AUTOWORDSELECTION; /* doesn't correspond to a window style */
1032 style = (style & ~mask) | (*res & mask);
1034 return S_OK;
1035}
1036
1037/* handle dialog mode VK_RETURN. Returns TRUE if message has been processed */
1039{
1040 BOOL ctrl_is_down = GetKeyState( VK_CONTROL ) & 0x8000;
1041
1042 if (ctrl_is_down) return TRUE;
1043
1044 if (host->want_return) return FALSE;
1045
1046 if (host->parent)
1047 {
1048 DWORD id = SendMessageW( host->parent, DM_GETDEFID, 0, 0 );
1049 if (HIWORD( id ) == DC_HASDEFID)
1050 {
1051 HWND ctrl = GetDlgItem( host->parent, LOWORD( id ));
1052 if (ctrl)
1053 {
1056 }
1057 }
1058 }
1059 return TRUE;
1060}
1061
1063{
1064 MSGFILTER msgf;
1065 LRESULT res;
1066
1067 if (!host->parent) return 0;
1068 msgf.nmhdr.hwndFrom = host->window;
1070 msgf.nmhdr.code = EN_MSGFILTER;
1071 msgf.msg = msg;
1072 msgf.wParam = *wparam;
1073 msgf.lParam = *lparam;
1074 if ((res = SendMessageW( host->parent, WM_NOTIFY, msgf.nmhdr.idFrom, (LPARAM)&msgf )))
1075 return res;
1076 *wparam = msgf.wParam;
1077 *lparam = msgf.lParam;
1078
1079 return 0;
1080}
1081
1083 LPARAM lparam, BOOL unicode )
1084{
1085 struct host *host;
1086 HRESULT hr = S_OK;
1087 LRESULT res = 0;
1088
1089 TRACE( "enter hwnd %p msg %04x (%s) %Ix %Ix, unicode %d\n",
1090 hwnd, msg, get_msg_name(msg), wparam, lparam, unicode );
1091
1092 host = (struct host *)GetWindowLongPtrW( hwnd, 0 );
1093 if (!host)
1094 {
1095 if (msg == WM_NCCREATE)
1096 {
1098
1099 TRACE( "WM_NCCREATE: hwnd %p style 0x%08lx\n", hwnd, pcs->style );
1100 return create_windowed_editor( hwnd, pcs, FALSE );
1101 }
1102 else return DefWindowProcW( hwnd, msg, wparam, lparam );
1103 }
1104
1105 if ((((host->event_mask & ENM_KEYEVENTS) && msg >= WM_KEYFIRST && msg <= WM_KEYLAST) ||
1108 {
1109 host->notify_level++;
1111 if (!--host->notify_level && host->defer_release)
1112 {
1113 TRACE( "exit (filtered deferred release) hwnd %p msg %04x (%s) %Ix %Ix -> 0\n",
1115 ITextHost2_Release( &host->ITextHost_iface );
1116 return 0;
1117 }
1118
1119 if (res)
1120 {
1121 TRACE( "exit (filtered %Iu) hwnd %p msg %04x (%s) %Ix %Ix -> 0\n",
1123 return 0;
1124 }
1125 }
1126
1127 switch (msg)
1128 {
1129 case WM_CHAR:
1130 {
1131 WCHAR wc = wparam;
1132
1133 if (!unicode) MultiByteToWideChar( CP_ACP, 0, (char *)&wparam, 1, &wc, 1 );
1134 if (wparam == '\r' && host->dialog_mode && host->emulate_10 && handle_dialog_enter( host )) break;
1136 break;
1137 }
1138
1139 case WM_CREATE:
1140 {
1142 CREATESTRUCTA *createA = (CREATESTRUCTA *)lparam;
1143 void *text;
1144 WCHAR *textW = NULL;
1145 LONG codepage = unicode ? CP_UNICODE : CP_ACP;
1146 int len;
1147 LRESULT evmask;
1148
1150
1151 if (lparam)
1152 {
1153 text = unicode ? (void *)createW->lpszName : (void *)createA->lpszName;
1155 }
1161 break;
1162 }
1163 case WM_DESTROY:
1164 if (!host->notify_level) ITextHost2_Release( &host->ITextHost_iface );
1165 else host->defer_release = 1;
1166 return 0;
1167
1168 case WM_ERASEBKGND:
1169 {
1170 HDC hdc = (HDC)wparam;
1171 RECT rc;
1172 HBRUSH brush;
1173
1174 if (GetUpdateRect( hwnd, &rc, TRUE ))
1175 {
1177 FillRect( hdc, &rc, brush );
1178 DeleteObject( brush );
1179 }
1180 return 1;
1181 }
1182 case EM_FINDTEXT:
1183 {
1185 FINDTEXTW new_params;
1186 int len;
1187
1188 if (!unicode)
1189 {
1190 new_params.chrg = params->chrg;
1191 new_params.lpstrText = ME_ToUnicode( CP_ACP, (char *)params->lpstrText, &len );
1192 params = &new_params;
1193 }
1195 if (!unicode) ME_EndToUnicode( CP_ACP, (WCHAR *)new_params.lpstrText );
1196 break;
1197 }
1198 case EM_FINDTEXTEX:
1199 {
1200 FINDTEXTEXA *paramsA = (FINDTEXTEXA *)lparam;
1202 FINDTEXTEXW new_params;
1203 int len;
1204
1205 if (!unicode)
1206 {
1207 new_params.chrg = params->chrg;
1208 new_params.lpstrText = ME_ToUnicode( CP_ACP, (char *)params->lpstrText, &len );
1209 params = &new_params;
1210 }
1212 if (!unicode)
1213 {
1214 ME_EndToUnicode( CP_ACP, (WCHAR *)new_params.lpstrText );
1215 paramsA->chrgText = params->chrgText;
1216 }
1217 break;
1218 }
1219 case WM_GETDLGCODE:
1220 if (lparam) host->dialog_mode = TRUE;
1221
1225 break;
1226
1227 case EM_GETLINE:
1229 else hr = get_lineA( host->text_srv, wparam, lparam, &res );
1230 break;
1231
1232 case EM_GETPASSWORDCHAR:
1234 break;
1235
1236 case EM_GETRECT:
1238 break;
1239
1240 case EM_GETSELTEXT:
1241 {
1243
1245 else
1246 {
1248 range.lpstrText = (char *)lparam;
1249 range.lpstrText[0] = '\0';
1250 hr = get_text_rangeA( host, &range, &res );
1251 }
1252 break;
1253 }
1254 case EM_GETOPTIONS:
1264 break;
1265
1266 case WM_GETTEXT:
1267 {
1269
1270 params.cb = wparam * (unicode ? sizeof(WCHAR) : sizeof(CHAR));
1271 params.flags = GT_USECRLF;
1272 params.codepage = unicode ? CP_UNICODE : CP_ACP;
1273 params.lpDefaultChar = NULL;
1274 params.lpUsedDefChar = NULL;
1276 break;
1277 }
1278 case WM_GETTEXTLENGTH:
1279 {
1281
1283 params.codepage = unicode ? CP_UNICODE : CP_ACP;
1285 break;
1286 }
1287 case EM_GETTEXTRANGE:
1289 else hr = get_text_rangeA( host, (TEXTRANGEA *)lparam, &res );
1290 break;
1291
1292 case WM_KEYDOWN:
1293 switch (LOWORD( wparam ))
1294 {
1295 case VK_ESCAPE:
1296 if (host->dialog_mode && host->parent)
1297 PostMessageW( host->parent, WM_CLOSE, 0, 0 );
1298 break;
1299 case VK_TAB:
1300 if (host->dialog_mode && host->parent)
1302 break;
1303 case VK_RETURN:
1304 if (host->dialog_mode && !host->emulate_10 && handle_dialog_enter( host )) break;
1305 /* fall through */
1306 default:
1308 }
1309 break;
1310
1311 case WM_PAINT:
1312 case WM_PRINTCLIENT:
1313 {
1314 HDC hdc;
1315 RECT rc, client, update;
1316 PAINTSTRUCT ps;
1317 HBRUSH brush, old_brush;
1318 LONG view_id;
1319
1321
1322 if (msg == WM_PAINT)
1323 {
1324 /* TODO retrieve if the text document is frozen */
1325 hdc = BeginPaint( hwnd, &ps );
1326 update = ps.rcPaint;
1327 view_id = TXTVIEW_ACTIVE;
1328 }
1329 else
1330 {
1331 hdc = (HDC)wparam;
1332 update = client;
1333 view_id = TXTVIEW_INACTIVE;
1334 }
1335
1337 old_brush = SelectObject( hdc, brush );
1338
1339 /* Erase area outside of the formatting rectangle */
1340 if (update.top < client.top)
1341 {
1342 rc = update;
1343 rc.bottom = client.top;
1344 PatBlt( hdc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
1345 update.top = client.top;
1346 }
1347 if (update.bottom > client.bottom)
1348 {
1349 rc = update;
1350 rc.top = client.bottom;
1351 PatBlt( hdc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
1352 update.bottom = client.bottom;
1353 }
1354 if (update.left < client.left)
1355 {
1356 rc = update;
1357 rc.right = client.left;
1358 PatBlt( hdc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
1359 update.left = client.left;
1360 }
1361 if (update.right > client.right)
1362 {
1363 rc = update;
1364 rc.left = client.right;
1365 PatBlt( hdc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
1366 update.right = client.right;
1367 }
1368
1369 ITextServices_TxDraw( host->text_srv, DVASPECT_CONTENT, 0, NULL, NULL, hdc, NULL, NULL, NULL,
1370 &update, NULL, 0, view_id );
1371 SelectObject( hdc, old_brush );
1372 DeleteObject( brush );
1373 if (msg == WM_PAINT) EndPaint( hwnd, &ps );
1374 return 0;
1375 }
1376 case EM_REPLACESEL:
1377 {
1378 int len;
1379 LONG codepage = unicode ? CP_UNICODE : CP_ACP;
1380 WCHAR *text = ME_ToUnicode( codepage, (void *)lparam, &len );
1381
1384 res = len;
1385 break;
1386 }
1387 case EM_SETBKGNDCOLOR:
1392 break;
1393
1394 case WM_SETCURSOR:
1395 {
1396 POINT pos;
1397 RECT rect;
1398
1399 if (hwnd != (HWND)wparam) break;
1400 GetCursorPos( &pos );
1401 ScreenToClient( hwnd, &pos );
1403 if (PtInRect( &rect, pos ))
1404 ITextServices_OnTxSetCursor( host->text_srv, DVASPECT_CONTENT, 0, NULL, NULL, NULL, NULL, NULL, pos.x, pos.y );
1406 break;
1407 }
1408 case EM_SETEVENTMASK:
1411 break;
1412
1413 case EM_SETOPTIONS:
1415 break;
1416
1417 case EM_SETPASSWORDCHAR:
1418 if (wparam == host->password_char) break;
1421 else host->props &= ~TXTBIT_USEPASSWORD;
1423 break;
1424
1425 case EM_SETREADONLY:
1426 {
1428 DWORD mask = wparam ? ECO_READONLY : ~ECO_READONLY;
1429
1431 return 1;
1432 }
1433 case EM_SETRECT:
1434 case EM_SETRECTNP:
1435 {
1436 RECT *rc = (RECT *)lparam;
1437
1438 if (!rc) host->use_set_rect = 0;
1439 else
1440 {
1441 if (wparam >= 2) break;
1442 host->set_rect = *rc;
1443 if (host->client_edge)
1444 {
1445 InflateRect( &host->set_rect, 1, 0 );
1446 host->set_rect.top -= 1;
1447 }
1449 host->use_set_rect = 1;
1450 }
1452 break;
1453 }
1454 case WM_SETTEXT:
1455 {
1456 char *textA = (char *)lparam;
1457 WCHAR *text = (WCHAR *)lparam;
1458 int len;
1459
1460 if (!unicode && textA && strncmp( textA, "{\\rtf", 5 ) && strncmp( textA, "{\\urtf", 6 ))
1463 if (text != (WCHAR *)lparam) ME_EndToUnicode( CP_ACP, text );
1464 break;
1465 }
1466 case EM_SHOWSCROLLBAR:
1467 {
1468 DWORD mask = 0, new;
1469
1470 if (wparam == SB_HORZ) mask = WS_HSCROLL;
1471 else if (wparam == SB_VERT) mask = WS_VSCROLL;
1472 else if (wparam == SB_BOTH) mask = WS_HSCROLL | WS_VSCROLL;
1473
1474 if (mask)
1475 {
1476 new = lparam ? mask : 0;
1477 if ((host->scrollbars & mask) != new)
1478 {
1479 host->scrollbars &= ~mask;
1480 host->scrollbars |= new;
1482 }
1483 }
1484
1485 res = 0;
1486 break;
1487 }
1489 {
1490 RECT client;
1491 WINDOWPOS *winpos = (WINDOWPOS *)lparam;
1492
1493 hr = S_FALSE; /* call defwndproc */
1494 if (winpos->flags & SWP_NOCLIENTSIZE) break;
1496 if (host->use_set_rect)
1497 {
1500 }
1503 break;
1504 }
1505 default:
1507 }
1508
1509 if (hr == S_FALSE)
1511
1512 TRACE( "exit hwnd %p msg %04x (%s) %Ix %Ix, unicode %d -> %Iu\n",
1513 hwnd, msg, get_msg_name(msg), wparam, lparam, unicode, res );
1514
1515 return res;
1516}
1517
1519{
1520 BOOL unicode = TRUE;
1521
1522 /* Under Win9x RichEdit20W returns ANSI strings, see the tests. */
1523 if (msg == WM_GETTEXT && (GetVersion() & 0x80000000))
1524 unicode = FALSE;
1525
1526 return RichEditWndProc_common( hwnd, msg, wparam, lparam, unicode );
1527}
1528
1530{
1532}
1533
1534/******************************************************************
1535 * RichEditANSIWndProc (RICHED20.10)
1536 */
1538{
1539 return RichEditWndProcA( hwnd, msg, wparam, lparam );
1540}
1541
1542/******************************************************************
1543 * RichEdit10ANSIWndProc (RICHED20.9)
1544 */
1546{
1547 if (msg == WM_NCCREATE && !GetWindowLongPtrW( hwnd, 0 ))
1548 {
1550
1551 TRACE( "WM_NCCREATE: hwnd %p style 0x%08lx\n", hwnd, pcs->style );
1552 return create_windowed_editor( hwnd, pcs, TRUE );
1553 }
1555}
1556
1558{
1559 /* FIXME: Not implemented */
1560 TRACE( "hwnd %p msg %04x (%s) %08Ix %08Ix\n",
1562 return DefWindowProcW( hwnd, msg, wparam, lparam );
1563}
1564
1566{
1567 /* FIXME: Not implemented */
1568 TRACE( "hwnd %p msg %04x (%s) %08Ix %08Ix\n",
1570 return DefWindowProcW( hwnd, msg, wparam, lparam );
1571}
1572
1573/******************************************************************
1574 * REExtendedRegisterClass (RICHED20.8)
1575 *
1576 * FIXME undocumented
1577 * Need to check for errors and implement controls and callbacks
1578 */
1580{
1581 WNDCLASSW wc;
1582 UINT result;
1583
1584 FIXME( "semi stub\n" );
1585 wc.cbClsExtra = 0;
1586 wc.cbWndExtra = 4;
1587 wc.hInstance = NULL;
1588 wc.hIcon = NULL;
1589 wc.hCursor = NULL;
1590 wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
1591 wc.lpszMenuName = NULL;
1592
1593 if (!listbox_registered)
1594 {
1597 wc.lpszClassName = L"REListBox20W";
1599 }
1600
1602 {
1605 wc.lpszClassName = L"REComboBox20W";
1607 }
1608
1609 result = 0;
1610 if (listbox_registered) result += 1;
1611 if (combobox_registered) result += 2;
1612
1613 return result;
1614}
1615
1617{
1618 WNDCLASSW wcW;
1619 WNDCLASSA wcA;
1620
1623 wcW.cbClsExtra = 0;
1624 wcW.cbWndExtra = sizeof(struct host *);
1625 wcW.hInstance = NULL; /* hInstance would register DLL-local class */
1626 wcW.hIcon = NULL;
1629 wcW.lpszMenuName = NULL;
1630
1631 if (!(GetVersion() & 0x80000000))
1632 {
1634 if (!RegisterClassW( &wcW )) return FALSE;
1636 if (!RegisterClassW( &wcW )) return FALSE;
1637 }
1638 else
1639 {
1640 /* WNDCLASSA/W have the same layout */
1641 wcW.lpszClassName = (LPCWSTR)"RichEdit20W";
1642 if (!RegisterClassA( (WNDCLASSA *)&wcW )) return FALSE;
1643 wcW.lpszClassName = (LPCWSTR)"RichEdit50W";
1644 if (!RegisterClassA( (WNDCLASSA *)&wcW )) return FALSE;
1645 }
1646
1649 wcA.cbClsExtra = 0;
1650 wcA.cbWndExtra = sizeof(struct host *);
1651 wcA.hInstance = NULL; /* hInstance would register DLL-local class */
1652 wcA.hIcon = NULL;
1655 wcA.lpszMenuName = NULL;
1657 if (!RegisterClassA( &wcA )) return FALSE;
1658 wcA.lpszClassName = "RichEdit50A";
1659 if (!RegisterClassA( &wcA )) return FALSE;
1660
1661 return TRUE;
1662}
1663
1665{
1666 switch (reason)
1667 {
1668 case DLL_PROCESS_ATTACH:
1671 if (!register_classes( instance )) return FALSE;
1672 LookupInit();
1673 break;
1674
1675 case DLL_PROCESS_DETACH:
1676 if (reserved) break;
1680 UnregisterClassA( "RichEdit50A", 0 );
1681 if (listbox_registered) UnregisterClassW( L"REListBox20W", 0 );
1682 if (combobox_registered) UnregisterClassW( L"REComboBox20W", 0 );
1683 LookupCleanup();
1685 break;
1686 }
1687 return TRUE;
1688}
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
Arabic default style
Definition: afstyles.h:94
void release_typelib(void)
Definition: apps.c:159
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define msg(x)
Definition: auth_time.c:54
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define HandleToLong(h)
Definition: basetsd.h:80
#define LongToHandle(h)
Definition: basetsd.h:82
const GUID IID_IUnknown
#define SWP_NOCLIENTSIZE
Definition: msg.h:31
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
DWORD HIMC
Definition: dimm.idl:75
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HINSTANCE instance
Definition: main.c:40
UINT op
Definition: effect.c:236
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
static const WCHAR createW[]
Definition: object.c:35
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
DWORD WINAPI GetVersion(void)
Definition: version.c:1458
const WCHAR * text
Definition: package.c:1794
#define CP_UNICODE
Definition: stg_prop.c:74
HINSTANCE dll_instance
Definition: editor.c:253
void LookupCleanup(void)
Definition: reader.c:2190
void LookupInit(void)
Definition: reader.c:2174
#define pt(x, y)
Definition: drawing.c:79
r reserved
Definition: btrfs.c:3006
#define INFINITE
Definition: serial.h:102
#define ITextServices_TxSetText(This, a)
Definition: editor.h:425
#define ITextServices_TxDraw(This, a, b, c, d, e, f, g, h, i, j, k, l)
Definition: editor.h:415
HRESULT create_text_services(IUnknown *outer, ITextHost *text_host, IUnknown **unk, BOOL emulate_10)
Definition: txtsrv.c:579
void ME_EndToUnicode(LONG codepage, LPVOID psz)
Definition: string.c:248
#define ITextServices_TxSendMessage(This, a, b, c, d)
Definition: editor.h:414
#define ITextHost_TxGetSysColor(This, a)
Definition: editor.h:357
#define ITextServices_OnTxInPlaceActivate(This, a)
Definition: editor.h:420
#define ITextHost_TxGetClientRect(This, a)
Definition: editor.h:353
#define ITextServices_TxGetHScroll(This, a, b, c, d, e)
Definition: editor.h:416
#define ITextHost_TxGetPasswordChar(This, a)
Definition: editor.h:361
#define ITextHost_TxSetCursor(This, a, b)
Definition: editor.h:348
#define ITextServices_TxGetVScroll(This, a, b, c, d, e)
Definition: editor.h:417
#define ITextServices_OnTxPropertyBitsChange(This, a, b)
Definition: editor.h:430
LPWSTR ME_ToUnicode(LONG codepage, LPVOID psz, INT *len)
Definition: string.c:226
#define ITextServices_OnTxSetCursor(This, a, b, c, d, e, f, g, h, i)
Definition: editor.h:418
#define SELECTIONBAR_WIDTH
Definition: editstr.h:98
void bar()
Definition: ehthrow.cxx:142
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
pKey DeleteObject()
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint res
Definition: glext.h:9613
const GLubyte * c
Definition: glext.h:8905
GLuint index
Definition: glext.h:6031
GLenum GLint GLuint mask
Definition: glext.h:6028
GLenum GLint * range
Definition: glext.h:7539
GLenum mode
Definition: glext.h:6217
GLenum const GLfloat * params
Definition: glext.h:5645
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
GLbitfield flags
Definition: glext.h:7161
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLuint64EXT * result
Definition: glext.h:11304
GLenum GLsizei len
Definition: glext.h:6722
GLuint id
Definition: glext.h:5910
#define cs
Definition: i386-dis.c:442
const char cursor[]
Definition: icontest.c:13
HIMC WINAPI ImmGetContext(_In_ HWND hWnd)
Definition: imm.c:1065
BOOL WINAPI ImmReleaseContext(_In_ HWND hWnd, _In_ HIMC hIMC)
Definition: imm.c:1109
#define USHRT_MAX
Definition: limits.h:38
#define S_OK
Definition: intsafe.h:52
#define INT_MAX
Definition: intsafe.h:150
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
GLint dy
Definition: linetemp.h:97
if(dx< 0)
Definition: linetemp.h:194
GLint dx
Definition: linetemp.h:97
HDC hdc
Definition: main.c:9
static const char textA[]
Definition: registrar.c:40
static HBITMAP
Definition: button.c:44
static BOOL register_classes(void)
Definition: edit.c:2629
static HDC
Definition: imagelist.c:88
static const WCHAR textW[]
Definition: itemdlg.c:1559
static const struct access_res create[16]
Definition: package.c:7505
#define __thiscall
Definition: cpp.c:43
static ATOM item
Definition: dde.c:856
#define ctrl
Definition: input.c:1756
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define DEFINE_THISCALL_WRAPPER(func, args)
Definition: msvc-thiscall.c:2
#define LOWORD(l)
Definition: pedump.c:82
#define ES_PASSWORD
Definition: pedump.c:670
#define ES_READONLY
Definition: pedump.c:675
#define ES_AUTOVSCROLL
Definition: pedump.c:671
#define ES_WANTRETURN
Definition: pedump.c:676
#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
void redraw(int x, int y, int cx, int cy)
Definition: qtewin.cpp:1248
#define THISCALL(func)
Definition: asm.h:195
#define ENM_CHANGE
Definition: richedit.h:468
#define ECO_NOHIDESEL
Definition: richedit.h:459
#define EM_GETIMEMODEBIAS
Definition: richedit.h:152
#define PFA_RIGHT
Definition: richedit.h:922
#define ECO_WANTRETURN
Definition: richedit.h:461
#define PFA_CENTER
Definition: richedit.h:923
#define GTL_CLOSE
Definition: richedit.h:1057
#define EM_GETEVENTMASK
Definition: richedit.h:92
#define EM_GETSELTEXT
Definition: richedit.h:95
#define PFA_LEFT
Definition: richedit.h:921
#define EN_PROTECTED
Definition: richedit.h:195
#define ECO_AUTOWORDSELECTION
Definition: richedit.h:456
#define EM_SETEVENTMASK
Definition: richedit.h:102
#define EM_SETOPTIONS
Definition: richedit.h:110
#define EM_CANPASTE
Definition: richedit.h:83
static const WCHAR RICHEDIT_CLASS20W[]
Definition: richedit.h:50
#define ECO_VERTICAL
Definition: richedit.h:464
#define ECO_SAVESEL
Definition: richedit.h:462
#define EM_SETBKGNDCOLOR
Definition: richedit.h:100
#define EN_SELCHANGE
Definition: richedit.h:193
#define GTL_NUMCHARS
Definition: richedit.h:1058
#define ES_NOOLEDRAGDROP
Definition: richedit.h:223
#define EM_SHOWSCROLLBAR
Definition: richedit.h:130
#define ENM_KEYEVENTS
Definition: richedit.h:475
#define EM_GETOPTIONS
Definition: richedit.h:111
#define RICHEDIT_CLASS20A
Definition: richedit.h:43
#define ECO_AUTOHSCROLL
Definition: richedit.h:458
#define EN_REQUESTRESIZE
Definition: richedit.h:192
#define EM_CHARFROMPOS
Definition: richedit.h:78
#define ES_DISABLENOSCROLL
Definition: richedit.h:224
#define EM_GETTEXTRANGE
Definition: richedit.h:108
#define WM_PRINTCLIENT
Definition: richedit.h:70
#define EN_STOPNOUNDO
Definition: richedit.h:197
#define EM_FINDTEXTW
Definition: richedit.h:147
#define ECOOP_XOR
Definition: richedit.h:453
#define PFM_ALIGNMENT
Definition: richedit.h:841
#define EN_DROPFILES
Definition: richedit.h:194
#define EM_FINDTEXT
Definition: richedit.h:89
#define ES_SAVESEL
Definition: richedit.h:226
#define ECO_READONLY
Definition: richedit.h:460
#define ECOOP_OR
Definition: richedit.h:451
#define EM_GETTEXTLENGTHEX
Definition: richedit.h:129
#define ECOOP_SET
Definition: richedit.h:450
#define EN_MSGFILTER
Definition: richedit.h:191
static const WCHAR MSFTEDIT_CLASS[]
Definition: richedit.h:40
#define EN_LINK
Definition: richedit.h:202
#define ES_SELECTIONBAR
Definition: richedit.h:230
#define GT_USECRLF
Definition: richedit.h:1037
#define ES_VERTICAL
Definition: richedit.h:229
#define ECO_AUTOVSCROLL
Definition: richedit.h:457
#define WM_NOTIFY
Definition: richedit.h:61
#define ENM_SCROLLEVENTS
Definition: richedit.h:471
#define EM_GETTEXTEX
Definition: richedit.h:128
#define EM_FINDTEXTEXW
Definition: richedit.h:148
#define EM_EXGETSEL
Definition: richedit.h:85
#define EM_FINDTEXTEX
Definition: richedit.h:112
#define ENM_MOUSEEVENTS
Definition: richedit.h:476
#define EN_SAVECLIPBOARD
Definition: richedit.h:199
#define GTL_USECRLF
Definition: richedit.h:1055
#define ECO_SELECTIONBAR
Definition: richedit.h:463
#define ECOOP_AND
Definition: richedit.h:452
#define EN_OLEOPFAILED
Definition: richedit.h:200
#define memset(x, y, z)
Definition: compat.h:39
static FILE * client
Definition: client.c:41
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
& rect
Definition: startmenu.cpp:1413
UINT flags
Definition: winuser.h:3670
HBRUSH hbrBackground
Definition: winuser.h:3246
HICON hIcon
Definition: winuser.h:3244
HINSTANCE hInstance
Definition: winuser.h:3243
HCURSOR hCursor
Definition: winuser.h:3245
int cbWndExtra
Definition: winuser.h:3242
UINT style
Definition: winuser.h:3239
LPCSTR lpszMenuName
Definition: winuser.h:3247
LPCSTR lpszClassName
Definition: winuser.h:3248
WNDPROC lpfnWndProc
Definition: winuser.h:3240
int cbClsExtra
Definition: winuser.h:3241
LPCWSTR lpszClassName
Definition: winuser.h:3261
LPCWSTR lpszMenuName
Definition: winuser.h:3260
HBRUSH hbrBackground
Definition: winuser.h:3259
HICON hIcon
Definition: winuser.h:3257
HINSTANCE hInstance
Definition: winuser.h:3256
int cbClsExtra
Definition: winuser.h:3254
UINT style
Definition: winuser.h:3252
WNDPROC lpfnWndProc
Definition: winuser.h:3253
int cbWndExtra
Definition: winuser.h:3255
HCURSOR hCursor
Definition: winuser.h:3258
LONG cpMax
Definition: richedit.h:501
LONG cpMin
Definition: richedit.h:500
CHARRANGE chrg
Definition: richedit.h:586
LPCWSTR lpstrText
Definition: richedit.h:587
CHARRANGE chrgText
Definition: richedit.h:595
CHARRANGE chrg
Definition: richedit.h:599
LPCWSTR lpstrText
Definition: richedit.h:600
LPARAM lParam
Definition: richedit.h:643
NMHDR nmhdr
Definition: richedit.h:640
UINT msg
Definition: richedit.h:641
WPARAM wParam
Definition: richedit.h:642
WORD wAlignment
Definition: richedit.h:673
DWORD dwMask
Definition: richedit.h:667
UINT cbSize
Definition: richedit.h:666
CHARRANGE chrg
Definition: richedit.h:508
LPSTR lpstrText
Definition: richedit.h:509
Definition: uimain.c:89
Definition: http.c:7252
Definition: dsound.c:943
Definition: txthost.c:37
COLORREF back_colour
Definition: txthost.c:53
HWND parent
Definition: txthost.c:41
HWND window
Definition: txthost.c:41
ITextHost2 ITextHost_iface
Definition: txthost.c:38
DWORD event_mask
Definition: txthost.c:51
RECT client_rect
Definition: txthost.c:52
unsigned int emulate_10
Definition: txthost.c:42
unsigned int notify_level
Definition: txthost.c:55
LONG ref
Definition: txthost.c:39
unsigned int defer_release
Definition: txthost.c:49
PARAFORMAT2 para_fmt
Definition: txthost.c:50
unsigned int dialog_mode
Definition: txthost.c:43
unsigned int want_return
Definition: txthost.c:44
unsigned int sel_bar
Definition: txthost.c:45
ITextServices * text_srv
Definition: txthost.c:40
unsigned int use_set_rect
Definition: txthost.c:47
DWORD scrollbars
Definition: txthost.c:51
RECT set_rect
Definition: txthost.c:52
unsigned int use_back_colour
Definition: txthost.c:48
unsigned int client_edge
Definition: txthost.c:46
DWORD props
Definition: txthost.c:51
WCHAR password_char
Definition: txthost.c:54
Definition: send.c:48
LPCSTR lpszName
Definition: winuser.h:3025
UINT_PTR idFrom
Definition: winuser.h:3234
UINT code
Definition: winuser.h:3235
HWND hwndFrom
Definition: winuser.h:3233
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
Definition: dhcpd.h:245
EXTERN_C const IID IID_ITextServices
Definition: textserv.h:36
#define TXTBIT_AUTOWORDSEL
Definition: textserv.h:192
#define TXTBIT_WORDWRAP
Definition: textserv.h:195
#define TXTBIT_CLIENTRECTCHANGE
Definition: textserv.h:205
EXTERN_C const IID IID_ITextHost
Definition: textserv.h:37
#define TXTBIT_MULTILINE
Definition: textserv.h:186
#define TXTBIT_VERTICAL
Definition: textserv.h:193
#define TXTBIT_ALLOWBEEP
Definition: textserv.h:196
enum _TXTBACKSTYLE TXTBACKSTYLE
#define TXTBIT_SCROLLBARCHANGE
Definition: textserv.h:201
#define TXTBIT_SAVESELECTION
Definition: textserv.h:191
#define TXTBIT_READONLY
Definition: textserv.h:187
@ TXTBACK_OPAQUE
Definition: textserv.h:165
#define TXTBIT_RICHTEXT
Definition: textserv.h:185
#define TXTBIT_USEPASSWORD
Definition: textserv.h:189
@ TXTVIEW_INACTIVE
Definition: textserv.h:182
@ TXTVIEW_ACTIVE
Definition: textserv.h:181
#define TXTBIT_HIDESELECTION
Definition: textserv.h:190
EXTERN_C const IID IID_ITextHost2
Definition: textserv.h:38
#define TXTBIT_SELBARCHANGE
Definition: textserv.h:194
#define TXTBIT_DISABLEDRAG
Definition: textserv.h:197
static BOOL create_windowed_editor(HWND hwnd, CREATESTRUCTW *create, BOOL emulate_10)
Definition: txthost.c:870
static const ITextHost2Vtbl textHostVtbl
Definition: txthost.c:58
HRESULT __thiscall ITextHostImpl_TxGetBackStyle(ITextHost2 *iface, TXTBACKSTYLE *style)
Definition: txthost.c:405
HRESULT __thiscall ITextHostImpl_TxActivate(ITextHost2 *iface, LONG *old_state)
Definition: txthost.c:344
void __thiscall ITextHostImpl_TxImmReleaseContext(ITextHost2 *iface, HIMC context)
Definition: txthost.c:535
static LRESULT WINAPI RichEditWndProcA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1529
static ULONG WINAPI ITextHostImpl_Release(ITextHost2 *iface)
Definition: txthost.c:158
HRESULT __thiscall ITextHostImpl_TxGetExtent(ITextHost2 *iface, SIZEL *extent)
Definition: txthost.c:444
HRESULT __thiscall ITextHostImpl_TxGetViewInset(ITextHost2 *iface, RECT *rect)
Definition: txthost.c:375
HRESULT __thiscall ITextHostImpl_TxGetSelectionBarWidth(ITextHost2 *iface, LONG *width)
Definition: txthost.c:542
static HRESULT get_lineA(ITextServices *text_srv, WPARAM wparam, LPARAM lparam, LRESULT *res)
Definition: txthost.c:892
static const char *const richedit_messages[]
Definition: txthost.c:837
static LRESULT WINAPI REComboWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1557
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
Definition: txthost.c:1664
void __thiscall ITextHostImpl_TxKillTimer(ITextHost2 *iface, UINT id)
Definition: txthost.c:293
static ULONG WINAPI ITextHostImpl_AddRef(ITextHost2 *iface)
Definition: txthost.c:151
HDC __thiscall ITextHostImpl_TxGetDC(ITextHost2 *iface)
Definition: txthost.c:173
LRESULT WINAPI REExtendedRegisterClass(void)
Definition: txthost.c:1579
HRESULT __thiscall ITextHostImpl_TxGetWindowStyles(ITextHost2 *iface, DWORD *style, DWORD *ex_style)
Definition: txthost.c:601
HRESULT __thiscall ITextHostImpl_TxGetAcceleratorPos(ITextHost2 *iface, LONG *pos)
Definition: txthost.c:437
BOOL __thiscall ITextHostImpl_TxSetCaretPos(ITextHost2 *iface, INT x, INT y)
Definition: txthost.c:280
BOOL __thiscall ITextHostImpl_TxScreenToClient(ITextHost2 *iface, POINT *pt)
Definition: txthost.c:330
LRESULT WINAPI RichEdit10ANSIWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1545
BOOL __thiscall ITextHostImpl_TxCreateCaret(ITextHost2 *iface, HBITMAP bitmap, INT width, INT height)
Definition: txthost.c:265
HRESULT __thiscall ITextHostImpl_TxGetWindow(ITextHost2 *iface, HWND *hwnd)
Definition: txthost.c:557
static HRESULT set_options(struct host *host, DWORD op, DWORD value, LRESULT *res)
Definition: txthost.c:951
HRESULT __thiscall ITextHostImpl_TxGetScrollBars(ITextHost2 *iface, DWORD *scrollbars)
Definition: txthost.c:419
static LRESULT RichEditWndProc_common(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL unicode)
Definition: txthost.c:1082
struct host * host_create(HWND hwnd, CREATESTRUCTW *cs, BOOL emulate_10)
Definition: txthost.c:96
HRESULT __thiscall ITextHostImpl_TxGetClientRect(ITextHost2 *iface, RECT *rect)
Definition: txthost.c:359
static struct host * impl_from_ITextHost(ITextHost2 *iface)
Definition: txthost.c:131
static BOOL listbox_registered
Definition: txthost.c:60
static LRESULT WINAPI RichEditWndProcW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1518
BOOL __thiscall ITextHostImpl_TxShowCaret(ITextHost2 *iface, BOOL show)
Definition: txthost.c:272
HPALETTE __thiscall ITextHostImpl_TxGetPalette(ITextHost2 *iface)
Definition: txthost.c:571
HRESULT __thiscall ITextHostImpl_TxGetHorzExtent(ITextHost2 *iface, LONG *horz_extent)
Definition: txthost.c:619
BOOL __thiscall ITextHostImpl_TxSetScrollRange(ITextHost2 *iface, INT bar, LONG min_pos, INT max_pos, BOOL redraw)
Definition: txthost.c:201
void __thiscall ITextHostImpl_TxScrollWindowEx(ITextHost2 *iface, INT dx, INT dy, const RECT *scroll, const RECT *clip, HRGN update_rgn, RECT *update_rect, UINT flags)
Definition: txthost.c:300
void __thiscall ITextHostImpl_TxSetFocus(ITextHost2 *iface)
Definition: txthost.c:317
HRESULT __thiscall ITextHostImpl_OnTxParaFormatChange(ITextHost2 *iface, const PARAFORMAT *ppf)
Definition: txthost.c:456
BOOL __thiscall ITextHostImpl_TxEnableScrollBar(ITextHost2 *iface, INT bar, INT arrows)
Definition: txthost.c:194
static LRESULT send_msg_filter(struct host *host, UINT msg, WPARAM *wparam, LPARAM *lparam)
Definition: txthost.c:1062
static BOOL handle_dialog_enter(struct host *host)
Definition: txthost.c:1038
static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost2 *iface, REFIID iid, void **obj)
Definition: txthost.c:136
HRESULT __thiscall ITextHostImpl_TxNotify(ITextHost2 *iface, DWORD iNotify, void *pv)
Definition: txthost.c:471
INT __thiscall ITextHostImpl_TxReleaseDC(ITextHost2 *iface, HDC hdc)
Definition: txthost.c:180
HRESULT __thiscall ITextHostImpl_TxDestroyCaret(ITextHost2 *iface)
Definition: txthost.c:613
static LRESULT WINAPI REListWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1565
LRESULT WINAPI RichEditANSIWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: txthost.c:1537
HRESULT __thiscall ITextHostImpl_TxGetPropertyBits(ITextHost2 *iface, DWORD mask, DWORD *bits)
Definition: txthost.c:462
static BOOL combobox_registered
Definition: txthost.c:61
HRESULT __thiscall ITextHostImpl_TxGetEastAsianFlags(ITextHost2 *iface, LONG *flags)
Definition: txthost.c:577
HRESULT __thiscall ITextHostImpl_TxShowDropCaret(ITextHost2 *iface, BOOL show, HDC hdc, const RECT *rect)
Definition: txthost.c:607
BOOL __thiscall ITextHostImpl_TxSetTimer(ITextHost2 *iface, UINT id, UINT timeout)
Definition: txthost.c:286
static HRESULT get_text_rangeA(struct host *host, TEXTRANGEA *rangeA, LRESULT *res)
Definition: txthost.c:918
BOOL __thiscall ITextHostImpl_TxIsDoubleClickPending(ITextHost2 *iface)
Definition: txthost.c:551
BOOL __thiscall ITextHostImpl_TxClientToScreen(ITextHost2 *iface, POINT *pt)
Definition: txthost.c:337
void __thiscall ITextHostImpl_TxSetCursor(ITextHost2 *iface, HCURSOR cursor, BOOL text)
Definition: txthost.c:324
static const char * get_msg_name(UINT msg)
Definition: txthost.c:861
static const char *const edit_messages[]
Definition: txthost.c:822
HRESULT __thiscall ITextHostImpl_TxGetCharFormat(ITextHost2 *iface, const CHARFORMATW **ppCF)
Definition: txthost.c:382
HCURSOR __thiscall ITextHostImpl_TxSetCursor2(ITextHost2 *iface, HCURSOR cursor, BOOL text)
Definition: txthost.c:583
HRESULT __thiscall ITextHostImpl_TxGetPasswordChar(ITextHost2 *iface, WCHAR *c)
Definition: txthost.c:428
HRESULT __thiscall ITextHostImpl_TxGetEditStyle(ITextHost2 *iface, DWORD item, DWORD *data)
Definition: txthost.c:595
HIMC __thiscall ITextHostImpl_TxImmGetContext(ITextHost2 *iface)
Definition: txthost.c:528
HRESULT __thiscall ITextHostImpl_TxGetParaFormat(ITextHost2 *iface, const PARAFORMAT **fmt)
Definition: txthost.c:388
void __thiscall ITextHostImpl_TxInvalidateRect(ITextHost2 *iface, const RECT *rect, BOOL mode)
Definition: txthost.c:251
void __thiscall ITextHostImpl_TxViewChange(ITextHost2 *iface, BOOL update)
Definition: txthost.c:258
void __thiscall ITextHostImpl_TxSetCapture(ITextHost2 *iface, BOOL capture)
Definition: txthost.c:309
COLORREF __thiscall ITextHostImpl_TxGetSysColor(ITextHost2 *iface, int index)
Definition: txthost.c:396
void __thiscall ITextHostImpl_TxFreeTextServicesNotification(ITextHost2 *iface)
Definition: txthost.c:589
HRESULT __thiscall ITextHostImpl_OnTxCharFormatChange(ITextHost2 *iface, const CHARFORMATW *pcf)
Definition: txthost.c:450
BOOL __thiscall ITextHostImpl_TxSetScrollPos(ITextHost2 *iface, INT bar, INT pos, BOOL redraw)
Definition: txthost.c:226
BOOL __thiscall ITextHostImpl_TxShowScrollBar(ITextHost2 *iface, INT bar, BOOL show)
Definition: txthost.c:187
HRESULT __thiscall ITextHostImpl_TxSetForegroundWindow(ITextHost2 *iface)
Definition: txthost.c:565
HRESULT __thiscall ITextHostImpl_TxDeactivate(ITextHost2 *iface, LONG new_state)
Definition: txthost.c:352
static void host_init_props(struct host *host)
Definition: txthost.c:63
HRESULT __thiscall ITextHostImpl_TxGetMaxLength(ITextHost2 *iface, DWORD *length)
Definition: txthost.c:412
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
Definition: pdh_main.c:96
int ret
#define STDCALL
Definition: wdf.h:45
int codepage
Definition: win_iconv.c:156
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
DWORD COLORREF
Definition: windef.h:300
HICON HCURSOR
Definition: windef.h:299
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
#define PATCOPY
Definition: wingdi.h:335
#define NULL_BRUSH
Definition: wingdi.h:901
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define WM_PAINT
Definition: winuser.h:1639
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define EM_SETREADONLY
Definition: winuser.h:2034
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_ERASEBKGND
Definition: winuser.h:1644
#define CS_VREDRAW
Definition: winuser.h:666
DWORD WINAPI GetSysColor(_In_ int)
#define MAKEWPARAM(l, h)
Definition: winuser.h:4085
#define WM_GETTEXTLENGTH
Definition: winuser.h:1638
#define EM_GETRECT
Definition: winuser.h:2015
#define WM_CLOSE
Definition: winuser.h:1640
#define GetWindowLongPtrW
Definition: winuser.h:4905
BOOL WINAPI ShowCaret(_In_opt_ HWND)
#define VK_TAB
Definition: winuser.h:2218
#define WM_MOUSEFIRST
Definition: winuser.h:1793
#define WM_HSCROLL
Definition: winuser.h:1762
#define EN_KILLFOCUS
Definition: winuser.h:2044
#define COLOR_WINDOW
Definition: winuser.h:929
#define WM_MOUSELAST
Definition: winuser.h:1820
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
#define EM_GETPASSWORDCHAR
Definition: winuser.h:2014
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_VSCROLL
Definition: winuser.h:1763
#define SIF_RANGE
Definition: winuser.h:1246
#define WM_CREATE
Definition: winuser.h:1627
#define DLGC_WANTCHARS
Definition: winuser.h:2637
#define DLGC_WANTTAB
Definition: winuser.h:2630
#define EM_GETSEL
Definition: winuser.h:2016
#define EN_SETFOCUS
Definition: winuser.h:2046
#define EM_SETPASSWORDCHAR
Definition: winuser.h:2033
#define EN_UPDATE
Definition: winuser.h:2047
#define SB_VERT
Definition: winuser.h:553
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1759
#define CS_HREDRAW
Definition: winuser.h:661
#define EM_REPLACESEL
Definition: winuser.h:2025
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:695
#define WM_KEYFIRST
Definition: winuser.h:1733
#define VK_CONTROL
Definition: winuser.h:2222
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:3032
#define EM_SETRECT
Definition: winuser.h:2035
#define DC_HASDEFID
Definition: winuser.h:2628
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define SIF_PAGE
Definition: winuser.h:1244
#define WM_GETTEXT
Definition: winuser.h:1637
#define CS_DBLCLKS
Definition: winuser.h:659
#define EN_MAXTEXT
Definition: winuser.h:2045
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2442
#define EN_HSCROLL
Definition: winuser.h:2043
int WINAPI SetScrollPos(_In_ HWND, _In_ int, _In_ int, _In_ BOOL)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_NEXTDLGCTL
Definition: winuser.h:1662
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_NCCREATE
Definition: winuser.h:1702
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
#define WM_SETTEXT
Definition: winuser.h:1636
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define VK_RETURN
Definition: winuser.h:2220
#define EM_GETLINE
Definition: winuser.h:2010
#define EM_SETRECTNP
Definition: winuser.h:2036
HWND WINAPI SetFocus(_In_opt_ HWND)
HWND WINAPI SetActiveWindow(_In_ HWND)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define DLGC_WANTARROWS
Definition: winuser.h:2629
#define SIF_DISABLENOSCROLL
Definition: winuser.h:1247
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define IDC_IBEAM
Definition: winuser.h:696
#define SB_BOTH
Definition: winuser.h:555
HDC WINAPI GetDC(_In_opt_ HWND)
#define WM_CHAR
Definition: winuser.h:1736
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
#define CS_GLOBALCLASS
Definition: winuser.h:660
#define EN_VSCROLL
Definition: winuser.h:2048
#define GWLP_ID
Definition: winuser.h:871
#define WM_SETCURSOR
Definition: winuser.h:1655
#define VK_SHIFT
Definition: winuser.h:2221
#define DLGC_WANTMESSAGE
Definition: winuser.h:2632
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
#define WM_DESTROY
Definition: winuser.h:1628
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
#define WM_KEYDOWN
Definition: winuser.h:1734
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)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define DM_GETDEFID
Definition: winuser.h:2117
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
Definition: winuser.h:5431
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define EN_ERRSPACE
Definition: winuser.h:2042
#define GWL_STYLE
Definition: winuser.h:863
#define CS_PARENTDC
Definition: winuser.h:664
BOOL WINAPI GetUpdateRect(_In_ HWND, _Out_opt_ LPRECT, _In_ BOOL)
#define WM_KEYLAST
Definition: winuser.h:1747
#define VK_ESCAPE
Definition: winuser.h:2233
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1681
#define DLGC_HASSETSEL
Definition: winuser.h:2633
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)
#define WM_GETDLGCODE
Definition: winuser.h:1708
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SB_HORZ
Definition: winuser.h:552
SHORT WINAPI GetKeyState(_In_ int)
#define GWL_EXSTYLE
Definition: winuser.h:862
#define EN_CHANGE
Definition: winuser.h:2041
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char CHAR
Definition: xmlstorage.h:175
#define const
Definition: zconf.h:233