ReactOS 0.4.15-dev-8064-gdaf8068
textserv.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2005 Mike McCormack
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#ifndef _TEXTSERV_H
20#define _TEXTSERV_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#ifdef __REACTOS__
27#include <wine/asm.h>
28#endif
29
30#ifdef __cplusplus
31#define THISCALLMETHOD_(type,method) virtual type __thiscall method
32#else
33#define THISCALLMETHOD_(type,method) type (__thiscall *method)
34#endif
35
36DEFINE_GUID(IID_ITextServices,0x8d33f740,0xcf58,0x11ce,0xa8,0x9d,0x00,0xaa,0x00,0x6c,0xad,0xc5);
37DEFINE_GUID(IID_ITextHost, 0xc5bdd8d0,0xd26e,0x11ce,0xa8,0x9e,0x00,0xaa,0x00,0x6c,0xad,0xc5);
38DEFINE_GUID(IID_ITextHost2, 0xc5bdd8d0,0xd26e,0x11ce,0xa8,0x9e,0x00,0xaa,0x00,0x6c,0xad,0xc5);
39
40/*****************************************************************************
41 * ITextServices interface
42 */
43#define INTERFACE ITextServices
45{
46 /*** IUnknown methods ***/
49 void** ppvObject) PURE;
50
52
54
55 /*** ITextServices methods ***/
56
57 THISCALLMETHOD_(HRESULT,TxSendMessage)( THIS_
59
61 DWORD dwDrawAspect,
62 LONG lindex,
63 void* pvAspect,
64 DVTARGETDEVICE* ptd,
65 HDC hdcDraw,
66 HDC hicTargetDev,
67 LPCRECTL lprcBounds,
68 LPCRECTL lprcWBounds,
69 LPRECT lprcUpdate,
70 BOOL (CALLBACK * pfnContinue)(DWORD),
71 DWORD dwContinue,
72 LONG lViewId) PURE;
73
74 THISCALLMETHOD_(HRESULT,TxGetHScroll)( THIS_
75 LONG* plMin,
76 LONG* plMax,
77 LONG* plPos,
78 LONG* plPage,
79 BOOL* pfEnabled) PURE;
80
81 THISCALLMETHOD_(HRESULT,TxGetVScroll)( THIS_
82 LONG* plMin,
83 LONG* plMax,
84 LONG* plPos,
85 LONG* plPage,
86 BOOL* pfEnabled) PURE;
87
88 THISCALLMETHOD_(HRESULT,OnTxSetCursor)( THIS_
89 DWORD dwDrawAspect,
90 LONG lindex,
91 void* pvAspect,
92 DVTARGETDEVICE* ptd,
93 HDC hdcDraw,
94 HDC hicTargetDev,
95 LPCRECT lprcClient,
96 INT x,
97 INT y) PURE;
98
99 THISCALLMETHOD_(HRESULT,TxQueryHitPoint)( THIS_
100 DWORD dwDrawAspect,
101 LONG lindex,
102 void* pvAspect,
103 DVTARGETDEVICE* ptd,
104 HDC hdcDraw,
105 HDC hicTargetDev,
106 LPCRECT lprcClient,
107 INT x,
108 INT y,
109 DWORD* pHitResult) PURE;
110
111 THISCALLMETHOD_(HRESULT,OnTxInplaceActivate)( THIS_
112 LPCRECT prcClient) PURE;
113
114 THISCALLMETHOD_(HRESULT,OnTxInplaceDeactivate)( THIS ) PURE;
115
116 THISCALLMETHOD_(HRESULT,OnTxUIActivate)( THIS ) PURE;
117
118 THISCALLMETHOD_(HRESULT,OnTxUIDeactivate)( THIS ) PURE;
119
120 THISCALLMETHOD_(HRESULT,TxGetText)( THIS_
121 BSTR* pbstrText) PURE;
122
123 THISCALLMETHOD_(HRESULT,TxSetText)( THIS_
124 LPCWSTR pszText) PURE;
125
126 THISCALLMETHOD_(HRESULT,TxGetCurTargetX)( THIS_
127 LONG* x) PURE;
128
129 THISCALLMETHOD_(HRESULT,TxGetBaseLinePos)( THIS_
130 LONG* x) PURE;
131
132 THISCALLMETHOD_(HRESULT,TxGetNaturalSize)( THIS_
133 DWORD dwAspect,
134 HDC hdcDraw,
135 HDC hicTargetDev,
136 DVTARGETDEVICE* ptd,
137 DWORD dwMode,
138 const SIZEL* psizelExtent,
139 LONG* pwidth,
140 LONG* pheight) PURE;
141
142 THISCALLMETHOD_(HRESULT,TxGetDropTarget)( THIS_
143 IDropTarget** ppDropTarget) PURE;
144
145 THISCALLMETHOD_(HRESULT,OnTxPropertyBitsChange)( THIS_
146 DWORD dwMask,
147 DWORD dwBits) PURE;
148
149 THISCALLMETHOD_(HRESULT,TxGetCachedSize)( THIS_
150 DWORD* pdwWidth,
151 DWORD* pdwHeight) PURE;
152
153};
154
155#ifdef COBJMACROS
156/*** IUnknown methods ***/
157#define ITextServices_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
158#define ITextServices_AddRef(p) (p)->lpVtbl->AddRef(p)
159#define ITextServices_Release(p) (p)->lpVtbl->Release(p)
160#endif
161
162#undef INTERFACE
163
164typedef enum _TXTBACKSTYLE {
168
175
180
185
186#define TXTBIT_RICHTEXT 0x000001
187#define TXTBIT_MULTILINE 0x000002
188#define TXTBIT_READONLY 0x000004
189#define TXTBIT_SHOWACCELERATOR 0x000008
190#define TXTBIT_USEPASSWORD 0x000010
191#define TXTBIT_HIDESELECTION 0x000020
192#define TXTBIT_SAVESELECTION 0x000040
193#define TXTBIT_AUTOWORDSEL 0x000080
194#define TXTBIT_VERTICAL 0x000100
195#define TXTBIT_SELBARCHANGE 0x000200
196#define TXTBIT_WORDWRAP 0x000400
197#define TXTBIT_ALLOWBEEP 0x000800
198#define TXTBIT_DISABLEDRAG 0x001000
199#define TXTBIT_VIEWINSETCHANGE 0x002000
200#define TXTBIT_BACKSTYLECHANGE 0x004000
201#define TXTBIT_MAXLENGTHCHANGE 0x008000
202#define TXTBIT_SCROLLBARCHANGE 0x010000
203#define TXTBIT_CHARFORMATCHANGE 0x020000
204#define TXTBIT_PARAFORMATCHANGE 0x040000
205#define TXTBIT_EXTENTCHANGE 0x080000
206#define TXTBIT_CLIENTRECTCHANGE 0x100000
207#define TXTBIT_USECURRENTBKG 0x200000
208
209/*****************************************************************************
210 * ITextHost interface
211 */
212#define INTERFACE ITextHost
214{
215 /*** IUnknown methods ***/
217 REFIID riid,
218 void** ppvObject) PURE;
219
221
223
224 /*** ITextHost methods ***/
225 THISCALLMETHOD_(HDC,TxGetDC)( THIS
226 ) PURE;
227
228 THISCALLMETHOD_(INT,TxReleaseDC)( THIS_
229 HDC hdc) PURE;
230
231 THISCALLMETHOD_(BOOL,TxShowScrollBar)( THIS_
232 INT fnBar,
233 BOOL fShow) PURE;
234
235 THISCALLMETHOD_(BOOL,TxEnableScrollBar)( THIS_
236 INT fuSBFlags,
237 INT fuArrowflags) PURE;
238
239 THISCALLMETHOD_(BOOL,TxSetScrollRange)( THIS_
240 INT fnBar,
241 LONG nMinPos,
242 INT nMaxPos,
243 BOOL fRedraw) PURE;
244
245 THISCALLMETHOD_(BOOL,TxSetScrollPos)( THIS_
246 INT fnBar,
247 INT nPos,
248 BOOL fRedraw) PURE;
249
250 THISCALLMETHOD_(void,TxInvalidateRect)( THIS_
251 LPCRECT prc,
252 BOOL fMode) PURE;
253
254 THISCALLMETHOD_(void,TxViewChange)( THIS_
255 BOOL fUpdate) PURE;
256
257 THISCALLMETHOD_(BOOL,TxCreateCaret)( THIS_
259 INT xWidth,
260 INT yHeight) PURE;
261
262 THISCALLMETHOD_(BOOL,TxShowCaret)( THIS_
263 BOOL fShow) PURE;
264
265 THISCALLMETHOD_(BOOL,TxSetCaretPos)( THIS_
266 INT x,
267 INT y) PURE;
268
269 THISCALLMETHOD_(BOOL,TxSetTimer)( THIS_
270 UINT idTimer,
271 UINT uTimeout) PURE;
272
273 THISCALLMETHOD_(void,TxKillTimer)( THIS_
274 UINT idTimer) PURE;
275
276 THISCALLMETHOD_(void,TxScrollWindowEx)( THIS_
277 INT dx,
278 INT dy,
279 LPCRECT lprcScroll,
280 LPCRECT lprcClip,
281 HRGN hRgnUpdate,
282 LPRECT lprcUpdate,
283 UINT fuScroll) PURE;
284
285 THISCALLMETHOD_(void,TxSetCapture)( THIS_
286 BOOL fCapture) PURE;
287
288 THISCALLMETHOD_(void,TxSetFocus)( THIS
289 ) PURE;
290
291 THISCALLMETHOD_(void,TxSetCursor)( THIS_
292 HCURSOR hcur,
293 BOOL fText) PURE;
294
295 THISCALLMETHOD_(BOOL,TxScreenToClient)( THIS_
296 LPPOINT lppt) PURE;
297
298 THISCALLMETHOD_(BOOL,TxClientToScreen)( THIS_
299 LPPOINT lppt) PURE;
300
301 THISCALLMETHOD_(HRESULT,TxActivate)( THIS_
302 LONG* plOldState) PURE;
303
304 THISCALLMETHOD_(HRESULT,TxDeactivate)( THIS_
305 LONG lNewState) PURE;
306
307 THISCALLMETHOD_(HRESULT,TxGetClientRect)( THIS_
308 LPRECT prc) PURE;
309
310 THISCALLMETHOD_(HRESULT,TxGetViewInset)( THIS_
311 LPRECT prc) PURE;
312
313 THISCALLMETHOD_(HRESULT,TxGetCharFormat)( THIS_
314 const CHARFORMATW** ppCF) PURE;
315
316 THISCALLMETHOD_(HRESULT,TxGetParaFormat)( THIS_
317 const PARAFORMAT** ppPF) PURE;
318
319 THISCALLMETHOD_(COLORREF,TxGetSysColor)( THIS_
320 int nIndex) PURE;
321
322 THISCALLMETHOD_(HRESULT,TxGetBackStyle)( THIS_
323 TXTBACKSTYLE* pStyle) PURE;
324
325 THISCALLMETHOD_(HRESULT,TxGetMaxLength)( THIS_
326 DWORD* plength) PURE;
327
328 THISCALLMETHOD_(HRESULT,TxGetScrollBars)( THIS_
329 DWORD* pdwScrollBar) PURE;
330
331 THISCALLMETHOD_(HRESULT,TxGetPasswordChar)( THIS_
332 WCHAR* pch) PURE;
333
334 THISCALLMETHOD_(HRESULT,TxGetAcceleratorPos)( THIS_
335 LONG* pch) PURE;
336
337 THISCALLMETHOD_(HRESULT,TxGetExtent)( THIS_
338 LPSIZEL lpExtent) PURE;
339
340 THISCALLMETHOD_(HRESULT,OnTxCharFormatChange)( THIS_
341 const CHARFORMATW* pcf) PURE;
342
343 THISCALLMETHOD_(HRESULT,OnTxParaFormatChange)( THIS_
344 const PARAFORMAT* ppf) PURE;
345
346 THISCALLMETHOD_(HRESULT,TxGetPropertyBits)( THIS_
347 DWORD dwMask,
348 DWORD* pdwBits) PURE;
349
350 THISCALLMETHOD_(HRESULT,TxNotify)( THIS_
351 DWORD iNotify,
352 void* pv) PURE;
353
354 THISCALLMETHOD_(HIMC,TxImmGetContext)( THIS
355 ) PURE;
356
357 THISCALLMETHOD_(void,TxImmReleaseContext)( THIS_
358 HIMC himc) PURE;
359
360 THISCALLMETHOD_(HRESULT,TxGetSelectionBarWidth)( THIS_
361 LONG* lSelBarWidth) PURE;
362
363};
364
365#ifdef COBJMACROS
366/*** IUnknown methods ***/
367#define ITextHost_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
368#define ITextHost_AddRef(p) (p)->lpVtbl->AddRef(p)
369#define ITextHost_Release(p) (p)->lpVtbl->Release(p)
370#endif
371
372#undef INTERFACE
373
375
377
378#ifdef __cplusplus
379}
380#endif
381
382#endif /* _TEXTSERV_H */
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
#define msg(x)
Definition: auth_time.c:54
#define DECLARE_INTERFACE_(i, b)
Definition: basetyps.h:78
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define STDMETHOD(m)
Definition: basetyps.h:62
HBITMAP hbmp
_In_ BOOLEAN Release
Definition: cdrom.h:920
DWORD HIMC
Definition: dimm.idl:75
OLECHAR * BSTR
Definition: compat.h:2293
#define CALLBACK
Definition: compat.h:35
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
REFIID riid
Definition: atlbase.h:39
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
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
unsigned int UINT
Definition: ndis.h:50
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
_Out_ LPRECT prc
Definition: ntgdi.h:1658
long LONG
Definition: pedump.c:60
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define REFIID
Definition: guiddef.h:118
TXTNATURALSIZE
Definition: textserv.h:176
@ TXTNS_FITTOCONTENT
Definition: textserv.h:177
@ TXTNS_ROUNDTOLINE
Definition: textserv.h:178
TXTHITRESULT
Definition: textserv.h:169
@ TXTHITRESULT_TRANSPARENT
Definition: textserv.h:171
@ TXTHITRESULT_CLOSE
Definition: textserv.h:172
@ TXTHITRESULT_HIT
Definition: textserv.h:173
@ TXTHITRESULT_NOHIT
Definition: textserv.h:170
enum _TXTBACKSTYLE TXTBACKSTYLE
#define THISCALLMETHOD_(type, method)
Definition: textserv.h:33
_TXTBACKSTYLE
Definition: textserv.h:164
@ TXTBACK_OPAQUE
Definition: textserv.h:166
@ TXTBACK_TRANSPARENT
Definition: textserv.h:165
TXTVIEW
Definition: textserv.h:181
@ TXTVIEW_INACTIVE
Definition: textserv.h:183
@ TXTVIEW_ACTIVE
Definition: textserv.h:182
HRESULT(WINAPI * PCreateTextServices)(IUnknown *, ITextHost *, IUnknown **)
Definition: textserv.h:376
HRESULT WINAPI CreateTextServices(IUnknown *, ITextHost *, IUnknown **)
Definition: txtsrv.c:387
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
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 HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185