ReactOS 0.4.16-dev-1007-g2e85425
txtsrv.c
Go to the documentation of this file.
1/*
2 * RichEdit - functions and interfaces around CreateTextServices
3 *
4 * Copyright 2005, 2006, Maarten Lankhorst
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 "oleauto.h"
26#include "richole.h"
27#include "tom.h"
28#include "imm.h"
29#include "textserv.h"
30#include "wine/debug.h"
31#include "editstr.h"
32#include "riched20.h"
33
35
36static inline struct text_services *impl_from_IUnknown( IUnknown *iface )
37{
38 return CONTAINING_RECORD( iface, struct text_services, IUnknown_inner );
39}
40
42{
43 struct text_services *services = impl_from_IUnknown( iface );
44
45 TRACE( "(%p)->(%s, %p)\n", iface, debugstr_guid( iid ), obj );
46
47 if (IsEqualIID( iid, &IID_IUnknown )) *obj = &services->IUnknown_inner;
48 else if (IsEqualIID( iid, &IID_ITextServices )) *obj = &services->ITextServices_iface;
49 else if (IsEqualIID( iid, &IID_IRichEditOle )) *obj= &services->IRichEditOle_iface;
50 else if (IsEqualIID( iid, &IID_IDispatch ) ||
51 IsEqualIID( iid, &IID_ITextDocument ) ||
52 IsEqualIID( iid, &IID_ITextDocument2Old )) *obj = &services->ITextDocument2Old_iface;
53 else
54 {
55 *obj = NULL;
56 FIXME( "Unknown interface: %s\n", debugstr_guid( iid ) );
57 return E_NOINTERFACE;
58 }
59
60 IUnknown_AddRef( (IUnknown *)*obj );
61 return S_OK;
62}
63
65{
66 struct text_services *services = impl_from_IUnknown( iface );
68
69 TRACE( "(%p) ref = %d\n", services, ref );
70
71 return ref;
72}
73
75{
76 struct text_services *services = impl_from_IUnknown( iface );
78
79 TRACE( "(%p) ref = %d\n", services, ref );
80
81 if (!ref)
82 {
84 ME_DestroyEditor( services->editor );
86 }
87 return ref;
88}
89
90static const IUnknownVtbl textservices_inner_vtbl =
91{
95};
96
97static inline struct text_services *impl_from_ITextServices( ITextServices *iface )
98{
100}
101
102static HRESULT WINAPI fnTextSrv_QueryInterface( ITextServices *iface, REFIID iid, void **obj )
103{
105 return IUnknown_QueryInterface( services->outer_unk, iid, obj );
106}
107
108static ULONG WINAPI fnTextSrv_AddRef(ITextServices *iface)
109{
111 return IUnknown_AddRef( services->outer_unk );
112}
113
114static ULONG WINAPI fnTextSrv_Release(ITextServices *iface)
115{
117 return IUnknown_Release( services->outer_unk );
118}
119
123{
125 HRESULT hr;
126 LRESULT res;
127
129 if (result) *result = res;
130 return hr;
131}
132
134{
135 RECT rect;
136 HRESULT hr;
137
138 if (!client)
139 {
140 if (!services->editor->in_place_active) return E_INVALIDARG;
141 hr = ITextHost_TxGetClientRect( services->editor->texthost, &rect );
142 if (FAILED( hr )) return hr;
143 }
144 else rect = *client;
145
146 rect.left += services->editor->selofs;
147
148 if (EqualRect( &rect, &services->editor->rcFormat )) return S_FALSE;
149 services->editor->rcFormat = rect;
150 return S_OK;
151}
152
154DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxDraw( ITextServices *iface, DWORD aspect, LONG index, void *aspect_info,
155 DVTARGETDEVICE *td, HDC draw, HDC target,
156 const RECTL *bounds, const RECTL *mf_bounds, RECT *update,
157 BOOL (CALLBACK *continue_fn)(DWORD), DWORD continue_param,
158 LONG view_id )
159{
161 HRESULT hr;
162 HDC dc = draw;
163 BOOL rewrap = FALSE;
164
165 TRACE( "%p: aspect %d, %d, %p, %p, draw %p, target %p, bounds %s, mf_bounds %s, update %s, %p, %d, view %d\n",
166 services, aspect, index, aspect_info, td, draw, target, wine_dbgstr_rect( (RECT *)bounds ),
167 wine_dbgstr_rect( (RECT *)mf_bounds ), wine_dbgstr_rect( update ), continue_fn, continue_param, view_id );
168
169 if (aspect != DVASPECT_CONTENT || aspect_info || td || target || mf_bounds || continue_fn )
170 FIXME( "Many arguments are ignored\n" );
171
172 hr = update_client_rect( services, (RECT *)bounds );
173 if (FAILED( hr )) return hr;
174 if (hr == S_OK) rewrap = TRUE;
175
176 if (!dc && services->editor->in_place_active)
177 dc = ITextHost_TxGetDC( services->editor->texthost );
178 if (!dc) return E_FAIL;
179
180 if (rewrap)
181 {
184 }
185
186 if (!services->editor->bEmulateVersion10 || services->editor->nEventMask & ENM_UPDATE)
187 ITextHost_TxNotify( services->editor->texthost, EN_UPDATE, NULL );
188
189 editor_draw( services->editor, dc, update );
190
191 if (!draw) ITextHost_TxReleaseDC( services->editor->texthost, dc );
192 return S_OK;
193}
194
196DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetHScroll( ITextServices *iface, LONG *min_pos, LONG *max_pos, LONG *pos,
197 LONG *page, BOOL *enabled )
198{
200
201 if (min_pos) *min_pos = services->editor->horz_si.nMin;
202 if (max_pos) *max_pos = services->editor->horz_si.nMax;
203 if (pos) *pos = services->editor->horz_si.nPos;
204 if (page) *page = services->editor->horz_si.nPage;
205 if (enabled) *enabled = services->editor->horz_sb_enabled;
206 return S_OK;
207}
208
210DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetVScroll( ITextServices *iface, LONG *min_pos, LONG *max_pos, LONG *pos,
211 LONG *page, BOOL *enabled )
212{
214
215 if (min_pos) *min_pos = services->editor->vert_si.nMin;
216 if (max_pos) *max_pos = services->editor->vert_si.nMax;
217 if (pos) *pos = services->editor->vert_si.nPos;
218 if (page) *page = services->editor->vert_si.nPage;
219 if (enabled) *enabled = services->editor->vert_sb_enabled;
220 return S_OK;
221}
222
225 void *aspect_info, DVTARGETDEVICE *td, HDC draw,
227{
229
230 TRACE( "%p: %d, %d, %p, %p, draw %p target %p client %s pos (%d, %d)\n", services, aspect, index, aspect_info, td, draw,
232
233 if (aspect != DVASPECT_CONTENT || index || aspect_info || td || draw || target || client)
234 FIXME( "Ignoring most params\n" );
235
236 link_notify( services->editor, WM_SETCURSOR, 0, MAKELPARAM( x, y ) );
237 editor_set_cursor( services->editor, x, y );
238 return S_OK;
239}
240
242DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxQueryHitPoint(ITextServices *iface, DWORD dwDrawAspect, LONG lindex,
243 void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcDraw,
244 HDC hicTargetDev, LPCRECT lprcClient, INT x, INT y,
245 DWORD *pHitResult)
246{
248
249 FIXME( "%p: STUB\n", services );
250 return E_NOTIMPL;
251}
252
255{
257 HRESULT hr;
258 BOOL old_active = services->editor->in_place_active;
259
260 TRACE( "%p: %s\n", services, wine_dbgstr_rect( client ) );
261
262 services->editor->in_place_active = TRUE;
264 if (FAILED( hr ))
265 {
266 services->editor->in_place_active = old_active;
267 return hr;
268 }
269 ME_RewrapRepaint( services->editor );
270 return S_OK;
271}
272
275{
277
278 TRACE( "%p\n", services );
279 services->editor->in_place_active = FALSE;
280 return S_OK;
281}
282
285{
287
288 FIXME( "%p: STUB\n", services );
289 return E_NOTIMPL;
290}
291
294{
296
297 FIXME( "%p: STUB\n", services );
298 return E_NOTIMPL;
299}
300
303{
305 int length;
306
307 length = ME_GetTextLength( services->editor );
308 if (length)
309 {
311 BSTR bstr;
312 bstr = SysAllocStringByteLen( NULL, length * sizeof(WCHAR) );
313 if (bstr == NULL) return E_OUTOFMEMORY;
314
315 cursor_from_char_ofs( services->editor, 0, &start );
316 ME_GetTextW( services->editor, bstr, length, &start, INT_MAX, FALSE, FALSE );
317 *text = bstr;
318 }
319 else *text = NULL;
320
321 return S_OK;
322}
323
326{
329
332 if (text) ME_InsertTextFromCursor( services->editor, 0, text, -1, services->editor->pBuffer->pDefaultStyle );
333 set_selection_cursors( services->editor, 0, 0);
334 services->editor->nModifyStep = 0;
336 ME_EmptyUndoStack( services->editor );
337 ME_UpdateRepaint( services->editor, FALSE );
338
339 return S_OK;
340}
341
344{
346
347 FIXME( "%p: STUB\n", services );
348 return E_NOTIMPL;
349}
350
353{
355
356 FIXME( "%p: STUB\n", services );
357 return E_NOTIMPL;
358}
359
362 HDC target, DVTARGETDEVICE *td, DWORD mode,
364{
366 RECT rect;
367 HDC dc = draw;
368 BOOL rewrap = FALSE;
369 HRESULT hr;
370
371 TRACE( "%p: aspect %d, draw %p, target %p, td %p, mode %08x, extent %s, *width %d, *height %d\n", services,
372 aspect, draw, target, td, mode, wine_dbgstr_point( (POINT *)extent ), *width, *height );
373
374 if (aspect != DVASPECT_CONTENT || target || td || mode != TXTNS_FITTOCONTENT )
375 FIXME( "Many arguments are ignored\n" );
376
377 SetRect( &rect, 0, 0, *width, *height );
378
380 if (FAILED( hr )) return hr;
381 if (hr == S_OK) rewrap = TRUE;
382
383 if (!dc && services->editor->in_place_active)
384 dc = ITextHost_TxGetDC( services->editor->texthost );
385 if (!dc) return E_FAIL;
386
387 if (rewrap)
388 {
391 }
392
393 *width = services->editor->nTotalWidth;
394 *height = services->editor->nTotalLength;
395
396 if (!draw) ITextHost_TxReleaseDC( services->editor->texthost, dc );
397 return S_OK;
398}
399
402{
404
405 FIXME( "%p: STUB\n", services );
406 return E_NOTIMPL;
407}
408
411{
413 DWORD scrollbars;
414 HRESULT hr;
415 BOOL repaint = FALSE;
416
417 TRACE( "%p, mask %08x, bits %08x\n", services, mask, bits );
418
419 services->editor->props = (services->editor->props & ~mask) | (bits & mask);
421 services->editor->bWordWrap = (services->editor->props & TXTBIT_WORDWRAP) && (services->editor->props & TXTBIT_MULTILINE);
422
424 {
425 hr = ITextHost_TxGetScrollBars( services->editor->texthost, &scrollbars );
426 if (SUCCEEDED( hr ))
427 {
428 if ((services->editor->scrollbars ^ scrollbars) & WS_HSCROLL)
429 ITextHost_TxShowScrollBar( services->editor->texthost, SB_HORZ, (scrollbars & WS_HSCROLL) &&
430 services->editor->nTotalWidth > services->editor->sizeWindow.cx );
431 if ((services->editor->scrollbars ^ scrollbars) & WS_VSCROLL)
432 ITextHost_TxShowScrollBar( services->editor->texthost, SB_VERT, (scrollbars & WS_VSCROLL) &&
433 services->editor->nTotalLength > services->editor->sizeWindow.cy );
434 services->editor->scrollbars = scrollbars;
435 }
436 }
437
438 if ((mask & TXTBIT_HIDESELECTION) && !services->editor->bHaveFocus) ME_InvalidateSelection( services->editor );
439
441 {
442 LONG width;
443
444 hr = ITextHost_TxGetSelectionBarWidth( services->editor->texthost, &width );
445 if (hr == S_OK)
446 {
447 ITextHost_TxInvalidateRect( services->editor->texthost, &services->editor->rcFormat, TRUE );
448 services->editor->rcFormat.left -= services->editor->selofs;
449 services->editor->selofs = width ? SELECTIONBAR_WIDTH : 0; /* FIXME: convert from HIMETRIC */
450 services->editor->rcFormat.left += services->editor->selofs;
451 repaint = TRUE;
452 }
453 }
454
456 {
458 if (SUCCEEDED( hr )) repaint = TRUE;
459 }
460
462 {
463 if (bits & TXTBIT_USEPASSWORD) ITextHost_TxGetPasswordChar( services->editor->texthost, &services->editor->password_char );
464 else services->editor->password_char = 0;
465 repaint = TRUE;
466 }
467
468 if (repaint) ME_RewrapRepaint( services->editor );
469
470 return S_OK;
471}
472
474DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetCachedSize(ITextServices *iface, DWORD *pdwWidth, DWORD *pdwHeight)
475{
477
478 FIXME( "%p: STUB\n", services );
479 return E_NOTIMPL;
480}
481
482#ifdef __ASM_USE_THISCALL_WRAPPER
483
484#define STDCALL(func) (void *) __stdcall_ ## func
485#ifdef _MSC_VER
486#define DEFINE_STDCALL_WRAPPER(num,func) \
487 __declspec(naked) HRESULT __stdcall_##func(void) \
488 { \
489 __asm pop eax \
490 __asm pop ecx \
491 __asm push eax \
492 __asm mov eax, [ecx] \
493 __asm jmp dword ptr [eax + 4*num] \
494 }
495#else /* _MSC_VER */
496#define DEFINE_STDCALL_WRAPPER(num,func) \
497 extern HRESULT __stdcall_ ## func(void); \
498 __ASM_GLOBAL_FUNC(__stdcall_ ## func, \
499 "popl %eax\n\t" \
500 "popl %ecx\n\t" \
501 "pushl %eax\n\t" \
502 "movl (%ecx), %eax\n\t" \
503 "jmp *(4*(" #num "))(%eax)" )
504#endif /* _MSC_VER */
505
506DEFINE_STDCALL_WRAPPER(3, ITextServices_TxSendMessage)
507DEFINE_STDCALL_WRAPPER(4, ITextServices_TxDraw)
508DEFINE_STDCALL_WRAPPER(5, ITextServices_TxGetHScroll)
509DEFINE_STDCALL_WRAPPER(6, ITextServices_TxGetVScroll)
510DEFINE_STDCALL_WRAPPER(7, ITextServices_OnTxSetCursor)
511DEFINE_STDCALL_WRAPPER(8, ITextServices_TxQueryHitPoint)
512DEFINE_STDCALL_WRAPPER(9, ITextServices_OnTxInPlaceActivate)
513DEFINE_STDCALL_WRAPPER(10, ITextServices_OnTxInPlaceDeactivate)
514DEFINE_STDCALL_WRAPPER(11, ITextServices_OnTxUIActivate)
515DEFINE_STDCALL_WRAPPER(12, ITextServices_OnTxUIDeactivate)
516DEFINE_STDCALL_WRAPPER(13, ITextServices_TxGetText)
517DEFINE_STDCALL_WRAPPER(14, ITextServices_TxSetText)
518DEFINE_STDCALL_WRAPPER(15, ITextServices_TxGetCurTargetX)
519DEFINE_STDCALL_WRAPPER(16, ITextServices_TxGetBaseLinePos)
520DEFINE_STDCALL_WRAPPER(17, ITextServices_TxGetNaturalSize)
521DEFINE_STDCALL_WRAPPER(18, ITextServices_TxGetDropTarget)
522DEFINE_STDCALL_WRAPPER(19, ITextServices_OnTxPropertyBitsChange)
523DEFINE_STDCALL_WRAPPER(20, ITextServices_TxGetCachedSize)
524
525const ITextServicesVtbl text_services_stdcall_vtbl =
526{
527 NULL,
528 NULL,
529 NULL,
548};
549
550#endif /* __ASM_USE_THISCALL_WRAPPER */
551
552static const ITextServicesVtbl textservices_vtbl =
553{
575};
576
577HRESULT create_text_services( IUnknown *outer, ITextHost *text_host, IUnknown **unk, BOOL emulate_10 )
578{
579 struct text_services *services;
580
581 TRACE( "%p %p --> %p\n", outer, text_host, unk );
582 if (text_host == NULL) return E_POINTER;
583
584 services = CoTaskMemAlloc( sizeof(*services) );
585 if (services == NULL) return E_OUTOFMEMORY;
586 services->ref = 1;
587 services->IUnknown_inner.lpVtbl = &textservices_inner_vtbl;
588 services->ITextServices_iface.lpVtbl = &textservices_vtbl;
589 services->IRichEditOle_iface.lpVtbl = &re_ole_vtbl;
590 services->ITextDocument2Old_iface.lpVtbl = &text_doc2old_vtbl;
591 services->editor = ME_MakeEditor( text_host, emulate_10 );
592 services->editor->richole = &services->IRichEditOle_iface;
593
594 if (outer) services->outer_unk = outer;
595 else services->outer_unk = &services->IUnknown_inner;
596
597 services->text_selection = NULL;
598 list_init( &services->rangelist );
599 list_init( &services->clientsites );
600
601 *unk = &services->IUnknown_inner;
602 return S_OK;
603}
604
605/******************************************************************
606 * CreateTextServices (RICHED20.4)
607 */
608HRESULT WINAPI CreateTextServices( IUnknown *outer, ITextHost *text_host, IUnknown **unk )
609{
610 return create_text_services( outer, text_host, unk, FALSE );
611}
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
static const char * wine_dbgstr_point(const POINT *ppt)
Definition: atltest.h:138
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define msg(x)
Definition: auth_time.c:54
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static void list_init(struct list_entry *head)
Definition: list.h:51
#define FIXME(fmt,...)
Definition: precomp.h:53
const GUID IID_IUnknown
_In_ size_t const _In_ int _In_ bool const _In_ unsigned const _In_ __acrt_rounding_mode const _Inout_ __crt_cached_ptd_host & ptd
Definition: cvt.cpp:355
HDC dc
Definition: cylfrac.c:34
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
OLECHAR * BSTR
Definition: compat.h:2293
#define CALLBACK
Definition: compat.h:35
const WCHAR * text
Definition: package.c:1794
HRESULT WINAPI OleFlushClipboard(void)
Definition: clipboard.c:2293
void ME_SetCursorToStart(ME_TextEditor *editor, ME_Cursor *cursor)
Definition: caret.c:27
void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, const WCHAR *str, int len, ME_Style *style)
Definition: caret.c:553
BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start, int nChars, BOOL bForce)
Definition: caret.c:339
int set_selection_cursors(ME_TextEditor *editor, int from, int to)
Definition: caret.c:132
int ME_GetTextLength(ME_TextEditor *editor)
Definition: caret.c:83
ME_TextEditor * ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
Definition: editor.c:2933
void editor_set_cursor(ME_TextEditor *editor, int x, int y)
Definition: editor.c:2824
int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, const ME_Cursor *start, int srcChars, BOOL bCRLF, BOOL bEOP)
Definition: editor.c:4310
LRESULT editor_handle_message(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam, HRESULT *phresult)
Definition: editor.c:3256
void ME_DestroyEditor(ME_TextEditor *editor)
Definition: editor.c:3066
void link_notify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: editor.c:3122
const IRichEditOleVtbl re_ole_vtbl
Definition: richole.c:1408
const ITextDocument2OldVtbl text_doc2old_vtbl
Definition: richole.c:4469
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxPropertyBitsChange(ITextServices *iface, DWORD mask, DWORD bits)
Definition: txtsrv.c:410
static ULONG WINAPI ITextServicesImpl_Release(IUnknown *iface)
Definition: txtsrv.c:74
static const IUnknownVtbl textservices_inner_vtbl
Definition: txtsrv.c:90
HRESULT create_text_services(IUnknown *outer, ITextHost *text_host, IUnknown **unk, BOOL emulate_10)
Definition: txtsrv.c:577
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetHScroll(ITextServices *iface, LONG *min_pos, LONG *max_pos, LONG *pos, LONG *page, BOOL *enabled)
Definition: txtsrv.c:196
static ULONG WINAPI ITextServicesImpl_AddRef(IUnknown *iface)
Definition: txtsrv.c:64
static ULONG WINAPI fnTextSrv_Release(ITextServices *iface)
Definition: txtsrv.c:114
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetVScroll(ITextServices *iface, LONG *min_pos, LONG *max_pos, LONG *pos, LONG *page, BOOL *enabled)
Definition: txtsrv.c:210
static HRESULT WINAPI ITextServicesImpl_QueryInterface(IUnknown *iface, REFIID iid, void **obj)
Definition: txtsrv.c:41
static HRESULT WINAPI fnTextSrv_QueryInterface(ITextServices *iface, REFIID iid, void **obj)
Definition: txtsrv.c:102
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetNaturalSize(ITextServices *iface, DWORD aspect, HDC draw, HDC target, DVTARGETDEVICE *td, DWORD mode, const SIZEL *extent, LONG *width, LONG *height)
Definition: txtsrv.c:361
static ULONG WINAPI fnTextSrv_AddRef(ITextServices *iface)
Definition: txtsrv.c:108
static const ITextServicesVtbl textservices_vtbl
Definition: txtsrv.c:552
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxDraw(ITextServices *iface, DWORD aspect, LONG index, void *aspect_info, DVTARGETDEVICE *td, HDC draw, HDC target, const RECTL *bounds, const RECTL *mf_bounds, RECT *update, BOOL(CALLBACK *continue_fn)(DWORD), DWORD continue_param, LONG view_id)
Definition: txtsrv.c:154
HRESULT WINAPI CreateTextServices(IUnknown *outer, ITextHost *text_host, IUnknown **unk)
Definition: txtsrv.c:608
static struct text_services * impl_from_ITextServices(ITextServices *iface)
Definition: txtsrv.c:97
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxSetCursor(ITextServices *iface, DWORD aspect, LONG index, void *aspect_info, DVTARGETDEVICE *td, HDC draw, HDC target, const RECT *client, INT x, INT y)
Definition: txtsrv.c:224
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetDropTarget(ITextServices *iface, IDropTarget **ppDropTarget)
Definition: txtsrv.c:401
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxInPlaceActivate(ITextServices *iface, const RECT *client)
Definition: txtsrv.c:254
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxQueryHitPoint(ITextServices *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcDraw, HDC hicTargetDev, LPCRECT lprcClient, INT x, INT y, DWORD *pHitResult)
Definition: txtsrv.c:242
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetBaseLinePos(ITextServices *iface, LONG *x)
Definition: txtsrv.c:352
static struct text_services * impl_from_IUnknown(IUnknown *iface)
Definition: txtsrv.c:36
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxSetText(ITextServices *iface, const WCHAR *text)
Definition: txtsrv.c:325
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetCachedSize(ITextServices *iface, DWORD *pdwWidth, DWORD *pdwHeight)
Definition: txtsrv.c:474
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxUIActivate(ITextServices *iface)
Definition: txtsrv.c:284
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxInPlaceDeactivate(ITextServices *iface)
Definition: txtsrv.c:274
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_OnTxUIDeactivate(ITextServices *iface)
Definition: txtsrv.c:293
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxSendMessage(ITextServices *iface, UINT msg, WPARAM wparam, LPARAM lparam, LRESULT *result)
Definition: txtsrv.c:121
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetText(ITextServices *iface, BSTR *text)
Definition: txtsrv.c:302
static HRESULT update_client_rect(struct text_services *services, const RECT *client)
Definition: txtsrv.c:133
DECLSPEC_HIDDEN HRESULT __thiscall fnTextSrv_TxGetCurTargetX(ITextServices *iface, LONG *x)
Definition: txtsrv.c:343
#define ITextHost_TxShowScrollBar(This, a, b)
Definition: editor.h:335
#define ITextServices_TxSetText(This, a)
Definition: editor.h:419
void editor_draw(ME_TextEditor *editor, HDC hDC, const RECT *update) DECLSPEC_HIDDEN
Definition: paint.c:33
#define ITextServices_TxDraw(This, a, b, c, d, e, f, g, h, i, j, k, l)
Definition: editor.h:409
#define ITextHost_TxInvalidateRect(This, a, b)
Definition: editor.h:339
BOOL wrap_marked_paras_dc(ME_TextEditor *editor, HDC hdc, BOOL invalidate) DECLSPEC_HIDDEN
Definition: wrap.c:1023
#define ITextServices_TxGetCachedSize(This, a, b)
Definition: editor.h:425
void editor_mark_rewrap_all(ME_TextEditor *editor) DECLSPEC_HIDDEN
Definition: para.c:237
#define ITextServices_TxGetCurTargetX(This, a)
Definition: editor.h:420
#define ITextServices_OnTxInPlaceDeactivate(This)
Definition: editor.h:415
void cursor_from_char_ofs(ME_TextEditor *editor, int char_ofs, ME_Cursor *cursor) DECLSPEC_HIDDEN
Definition: run.c:240
#define ITextServices_OnTxUIActivate(This)
Definition: editor.h:416
void ME_EmptyUndoStack(ME_TextEditor *editor) DECLSPEC_HIDDEN
Definition: undo.c:53
#define ITextServices_TxQueryHitPoint(This, a, b, c, d, e, f, g, h, i, j)
Definition: editor.h:413
#define ITextServices_OnTxUIDeactivate(This)
Definition: editor.h:417
#define ITextServices_TxSendMessage(This, a, b, c, d)
Definition: editor.h:408
#define ITextHost_TxNotify(This, a, b)
Definition: editor.h:368
#define ITextServices_OnTxInPlaceActivate(This, a)
Definition: editor.h:414
#define ITextHost_TxGetClientRect(This, a)
Definition: editor.h:354
void richole_release_children(struct text_services *services) DECLSPEC_HIDDEN
Definition: richole.c:5853
#define ITextHost_TxGetDC(This)
Definition: editor.h:333
void ME_InvalidateSelection(ME_TextEditor *editor) DECLSPEC_HIDDEN
Definition: paint.c:1247
#define ITextServices_TxGetHScroll(This, a, b, c, d, e)
Definition: editor.h:410
#define ITextHost_TxGetScrollBars(This, a)
Definition: editor.h:361
void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now) DECLSPEC_HIDDEN
Definition: paint.c:129
#define ITextHost_TxGetSelectionBarWidth(This, a)
Definition: editor.h:371
void ME_RewrapRepaint(ME_TextEditor *editor) DECLSPEC_HIDDEN
Definition: paint.c:156
#define ITextHost_TxGetPasswordChar(This, a)
Definition: editor.h:362
#define ITextHost_TxReleaseDC(This, a)
Definition: editor.h:334
#define ITextServices_TxGetDropTarget(This, a)
Definition: editor.h:423
#define ITextServices_TxGetVScroll(This, a, b, c, d, e)
Definition: editor.h:411
#define ITextServices_TxGetBaseLinePos(This, a)
Definition: editor.h:421
#define ITextServices_OnTxPropertyBitsChange(This, a, b)
Definition: editor.h:424
#define ITextServices_TxGetText(This, a)
Definition: editor.h:418
#define ITextServices_TxGetNaturalSize(This, a, b, c, d, e, f, g, h)
Definition: editor.h:422
#define ITextServices_OnTxSetCursor(This, a, b, c, d, e, f, g, h, i)
Definition: editor.h:412
#define SELECTIONBAR_WIDTH
Definition: editstr.h:99
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint start
Definition: gl.h:1545
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
GLuint res
Definition: glext.h:9613
GLuint index
Definition: glext.h:6031
GLenum GLint GLuint mask
Definition: glext.h:6028
GLenum mode
Definition: glext.h:6217
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLuint64EXT * result
Definition: glext.h:11304
GLenum target
Definition: glext.h:7315
const char cursor[]
Definition: icontest.c:13
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define INT_MAX
Definition: intsafe.h:150
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
static HDC
Definition: imagelist.c:88
#define __thiscall
Definition: cpp.c:43
unsigned int UINT
Definition: ndis.h:50
#define DEFINE_THISCALL_WRAPPER(func, args)
Definition: msvc-thiscall.c:2
BSTR WINAPI DECLSPEC_HOTPATCH SysAllocStringByteLen(LPCSTR str, UINT len)
Definition: oleaut.c:428
const GUID IID_IDispatch
#define WS_VSCROLL
Definition: pedump.c:627
long LONG
Definition: pedump.c:60
#define WS_HSCROLL
Definition: pedump.c:628
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define THISCALL(func)
Definition: asm.h:153
#define ENM_UPDATE
Definition: richedit.h:469
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
Definition: module.h:576
Definition: send.c:48
IUnknown IUnknown_inner
Definition: editstr.h:478
ITextServices ITextServices_iface
Definition: editstr.h:479
@ TXTNS_FITTOCONTENT
Definition: textserv.h:176
EXTERN_C const IID IID_ITextServices
Definition: textserv.h:36
#define TXTBIT_WORDWRAP
Definition: textserv.h:195
#define TXTBIT_CLIENTRECTCHANGE
Definition: textserv.h:205
#define TXTBIT_MULTILINE
Definition: textserv.h:186
#define TXTBIT_SCROLLBARCHANGE
Definition: textserv.h:201
#define TXTBIT_USEPASSWORD
Definition: textserv.h:189
#define TXTBIT_HIDESELECTION
Definition: textserv.h:190
#define TXTBIT_SELBARCHANGE
Definition: textserv.h:194
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 STDCALL
Definition: wdf.h:45
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365
#define MAKELPARAM(l, h)
Definition: winuser.h:4019
#define EN_UPDATE
Definition: winuser.h:2039
#define SB_VERT
Definition: winuser.h:553
#define WM_SETCURSOR
Definition: winuser.h:1647
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
#define SB_HORZ
Definition: winuser.h:552
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define const
Definition: zconf.h:233