advapi32/tests: Add some tests for token elevation.
[wine.git] / include / richedit.h
blob2709d787502c2541a582c078aea8be252247ad7a
1 /*
2 * Copyright (C) 2000 Jean-Claude Batista
3 * Copyright (C) 2002 Andriy Palamarchuk
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_RICHEDIT_H
21 #define __WINE_RICHEDIT_H
23 #include <pshpack4.h>
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
29 #ifndef _RICHEDIT_VER
30 #define _RICHEDIT_VER 0x0210
31 #endif /* _RICHEDIT_VER */
33 #define cchTextLimitDefault 0x7fff
35 #if defined(_MSC_VER) || defined(__MINGW32__)
36 # define MSFTEDIT_CLASS L"RichEdit50W"
37 #else
38 static const WCHAR MSFTEDIT_CLASS[] = { 'R','i','c','h','E','d','i','t','5','0','W',0 };
39 #endif
41 #define RICHEDIT_CLASS20A "RichEdit20A"
42 #if defined(_MSC_VER) || defined(__MINGW32__)
43 # define RICHEDIT_CLASS20W L"RichEdit20W"
44 #else
45 static const WCHAR RICHEDIT_CLASS20W[] = { 'R','i','c','h','E','d','i','t','2','0','W',0 };
46 #endif
47 #define RICHEDIT_CLASS10A "RICHEDIT"
49 #if (_RICHEDIT_VER >= 0x0200 )
50 #define RICHEDIT_CLASS WINELIB_NAME_AW(RICHEDIT_CLASS20)
51 #else
52 #define RICHEDIT_CLASS RICHEDIT_CLASS10A
53 #endif
55 #ifndef WM_NOTIFY
56 #define WM_NOTIFY 0x004e
57 #endif
58 #ifndef WM_CONTEXTMENU
59 #define WM_CONTEXTMENU 0x007b
60 #endif
61 #ifndef WM_UNICHAR
62 #define WM_UNICHAR 0x0109
63 #endif
64 #ifndef WM_PRINTCLIENT
65 #define WM_PRINTCLIENT 0x0318
66 #endif
68 #ifndef EM_GETLIMITTEXT
69 #define EM_GETLIMITTEXT (WM_USER + 37)
70 #endif
71 #ifndef EM_POSFROMCHAR
72 #define EM_POSFROMCHAR (WM_USER + 38)
73 #define EM_CHARFROMPOS (WM_USER + 39)
74 #endif
75 #ifndef EM_SCROLLCARET
76 #define EM_SCROLLCARET (WM_USER + 49)
77 #endif
78 #define EM_CANPASTE (WM_USER + 50)
79 #define EM_DISPLAYBAND (WM_USER + 51)
80 #define EM_EXGETSEL (WM_USER + 52)
81 #define EM_EXLIMITTEXT (WM_USER + 53)
82 #define EM_EXLINEFROMCHAR (WM_USER + 54)
83 #define EM_EXSETSEL (WM_USER + 55)
84 #define EM_FINDTEXT (WM_USER + 56)
85 #define EM_FORMATRANGE (WM_USER + 57)
86 #define EM_GETCHARFORMAT (WM_USER + 58)
87 #define EM_GETEVENTMASK (WM_USER + 59)
88 #define EM_GETOLEINTERFACE (WM_USER + 60)
89 #define EM_GETPARAFORMAT (WM_USER + 61)
90 #define EM_GETSELTEXT (WM_USER + 62)
91 #define EM_HIDESELECTION (WM_USER + 63)
92 #define EM_PASTESPECIAL (WM_USER + 64)
93 #define EM_REQUESTRESIZE (WM_USER + 65)
94 #define EM_SELECTIONTYPE (WM_USER + 66)
95 #define EM_SETBKGNDCOLOR (WM_USER + 67)
96 #define EM_SETCHARFORMAT (WM_USER + 68)
97 #define EM_SETEVENTMASK (WM_USER + 69)
98 #define EM_SETOLECALLBACK (WM_USER + 70)
99 #define EM_SETPARAFORMAT (WM_USER + 71)
100 #define EM_SETTARGETDEVICE (WM_USER + 72)
101 #define EM_STREAMIN (WM_USER + 73)
102 #define EM_STREAMOUT (WM_USER + 74)
103 #define EM_GETTEXTRANGE (WM_USER + 75)
104 #define EM_FINDWORDBREAK (WM_USER + 76)
105 #define EM_SETOPTIONS (WM_USER + 77)
106 #define EM_GETOPTIONS (WM_USER + 78)
107 #define EM_FINDTEXTEX (WM_USER + 79)
108 #define EM_GETWORDBREAKPROCEX (WM_USER + 80)
109 #define EM_SETWORDBREAKPROCEX (WM_USER + 81)
111 #define EM_SETUNDOLIMIT (WM_USER + 82)
112 #define EM_REDO (WM_USER + 84)
113 #define EM_CANREDO (WM_USER + 85)
114 #define EM_GETUNDONAME (WM_USER + 86)
115 #define EM_GETREDONAME (WM_USER + 87)
116 #define EM_STOPGROUPTYPING (WM_USER + 88)
118 #define EM_SETTEXTMODE (WM_USER + 89)
119 #define EM_GETTEXTMODE (WM_USER + 90)
120 #define EM_AUTOURLDETECT (WM_USER + 91)
121 #define EM_GETAUTOURLDETECT (WM_USER + 92)
122 #define EM_SETPALETTE (WM_USER + 93)
123 #define EM_GETTEXTEX (WM_USER + 94)
124 #define EM_GETTEXTLENGTHEX (WM_USER + 95)
125 #define EM_SHOWSCROLLBAR (WM_USER + 96)
126 #define EM_SETTEXTEX (WM_USER + 97)
128 #define EM_SETPUNCTUATION (WM_USER + 100)
129 #define EM_GETPUNCTUATION (WM_USER + 101)
130 #define EM_SETWORDWRAPMODE (WM_USER + 102)
131 #define EM_GETWORDWRAPMODE (WM_USER + 103)
132 #define EM_SETIMECOLOR (WM_USER + 104)
133 #define EM_GETIMECOLOR (WM_USER + 105)
134 #define EM_SETIMEOPTIONS (WM_USER + 106)
135 #define EM_GETIMEOPTIONS (WM_USER + 107)
136 #define EM_CONVPOSITION (WM_USER + 108)
138 #define EM_SETLANGOPTIONS (WM_USER + 120)
139 #define EM_GETLANGOPTIONS (WM_USER + 121)
140 #define EM_GETIMECOMPMODE (WM_USER + 122)
142 #define EM_FINDTEXTW (WM_USER + 123)
143 #define EM_FINDTEXTEXW (WM_USER + 124)
145 #define EM_RECONVERSION (WM_USER + 125)
146 #define EM_SETIMEMODEBIAS (WM_USER + 126)
147 #define EM_GETIMEMODEBIAS (WM_USER + 127)
149 #define EM_SETBIDIOPTIONS (WM_USER + 200)
150 #define EM_GETBIDIOPTIONS (WM_USER + 201)
152 #define EM_SETTYPOGRAPHYOPTIONS (WM_USER + 202)
153 #define EM_GETTYPOGRAPHYOPTIONS (WM_USER + 203)
155 #define EM_SETEDITSTYLE (WM_USER + 204)
156 #define EM_GETEDITSTYLE (WM_USER + 205)
158 #define EM_OUTLINE (WM_USER + 220)
160 #define EM_GETSCROLLPOS (WM_USER + 221)
161 #define EM_SETSCROLLPOS (WM_USER + 222)
163 #define EM_SETFONTSIZE (WM_USER + 223)
164 #define EM_GETZOOM (WM_USER + 224)
165 #define EM_SETZOOM (WM_USER + 225)
166 #define EM_GETVIEWKIND (WM_USER + 226)
167 #define EM_SETVIEWKIND (WM_USER + 227)
169 #define EM_GETPAGE (WM_USER + 228)
170 #define EM_SETPAGE (WM_USER + 229)
171 #define EM_GETHYPHENATEINFO (WM_USER + 230)
172 #define EM_SETHYPHENATEINFO (WM_USER + 231)
173 #define EM_GETPAGEROTATE (WM_USER + 235)
174 #define EM_SETPAGEROTATE (WM_USER + 236)
175 #define EM_GETCTFMODEBIAS (WM_USER + 237)
176 #define EM_SETCTFMODEBIAS (WM_USER + 238)
177 #define EM_GETCTFOPENSTATUS (WM_USER + 240)
178 #define EM_SETCTFOPENSTATUS (WM_USER + 241)
179 #define EM_GETIMECOMPTEXT (WM_USER + 242)
180 #define EM_ISIME (WM_USER + 243)
181 #define EM_GETIMEPROPERTY (WM_USER + 244)
182 #define EM_GETQUERYRTFOBJ (WM_USER + 269)
183 #define EM_SETQUERYRTFOBJ (WM_USER + 270)
185 /* New notifications */
186 #define EN_MSGFILTER 0x0700
187 #define EN_REQUESTRESIZE 0x0701
188 #define EN_SELCHANGE 0x0702
189 #define EN_DROPFILES 0x0703
190 #define EN_PROTECTED 0x0704
191 #define EN_CORRECTTEXT 0x0705
192 #define EN_STOPNOUNDO 0x0706
193 #define EN_IMECHANGE 0x0707
194 #define EN_SAVECLIPBOARD 0x0708
195 #define EN_OLEOPFAILED 0x0709
196 #define EN_OBJECTPOSITIONS 0x070a
197 #define EN_LINK 0x070b
198 #define EN_DRAGDROPDONE 0x070c
199 #define EN_PARAGRAPHEXPANDED 0x070d
200 #define EN_PAGECHANGE 0x070e
201 #define EN_LOWFIRTF 0x070f
202 #define EN_ALIGNLTR 0x0710
203 #define EN_ALIGNRTL 0x0711
204 #define EN_CLIPFORMAT 0x0712
205 #define EN_STARTCOMPOSITION 0x0713
206 #define EN_ENDCOMPOSITION 0x0714
209 typedef DWORD (CALLBACK * EDITSTREAMCALLBACK)( DWORD_PTR, LPBYTE, LONG, LONG * );
212 #define yHeightCharPtsMost 1638
213 #define lDefaultTab 720
215 /* tab stops number limit */
216 #define MAX_TAB_STOPS 0x00000020
218 #define MAX_TABLE_CELLS 63
220 /* Rich edit control styles */
221 #define ES_NOOLEDRAGDROP 0x00000008
222 #define ES_DISABLENOSCROLL 0x00002000
223 #define ES_SUNKEN 0x00004000
224 #define ES_SAVESEL 0x00008000
225 #define ES_SELFIME 0x00040000
226 #define ES_NOIME 0x00080000
227 #define ES_VERTICAL 0x00400000
228 #define ES_SELECTIONBAR 0x01000000
229 #define ES_EX_NOCALLOLEINIT 0x01000000
231 /* the character formatting options */
232 #define SCF_DEFAULT 0x00000000
233 #define SCF_SELECTION 0x00000001
234 #define SCF_WORD 0x00000002
235 #define SCF_ALL 0x00000004
236 #define SCF_USEUIRULES 0x00000008
237 #define SCF_ASSOCIATEFONT 0x00000010
238 #define SCF_NOKBUPDATE 0x00000020
239 #define SCF_ASSOCIATEFONT2 0x00000040
241 #ifndef WM_NOTIFY
242 typedef struct _nmhdr
244 HWND hwndFrom;
245 UINT idFrom;
246 UINT code;
247 } NMHDR;
248 #endif
250 /* CHARFORMAT structure */
251 typedef struct _charformat
253 UINT cbSize;
254 DWORD dwMask;
255 DWORD dwEffects;
256 LONG yHeight;
257 LONG yOffset;
258 COLORREF crTextColor;
259 BYTE bCharSet;
260 BYTE bPitchAndFamily;
261 char szFaceName[LF_FACESIZE];
262 } CHARFORMATA;
264 typedef struct _charformatw
266 UINT cbSize;
267 DWORD dwMask;
268 DWORD dwEffects;
269 LONG yHeight;
270 LONG yOffset;
271 COLORREF crTextColor;
272 BYTE bCharSet;
273 BYTE bPitchAndFamily;
274 WCHAR szFaceName[LF_FACESIZE];
275 } CHARFORMATW;
277 DECL_WINELIB_TYPE_AW(CHARFORMAT)
279 typedef struct _charformat2a {
280 UINT cbSize;
281 DWORD dwMask;
282 DWORD dwEffects;
283 LONG yHeight;
284 LONG yOffset;
285 COLORREF crTextColor;
286 BYTE bCharSet;
287 BYTE bPitchAndFamily;
288 char szFaceName[LF_FACESIZE];
289 WORD pad; /* Not in MS's C version, but needed to ensure that wWeight is at the correct offset to match the C++ version */
290 WORD wWeight;
291 SHORT sSpacing;
292 COLORREF crBackColor;
293 LCID lcid;
294 DWORD dwReserved;
295 SHORT sStyle;
296 WORD wKerning;
297 BYTE bUnderlineType;
298 BYTE bAnimation;
299 BYTE bRevAuthor;
300 } CHARFORMAT2A;
302 typedef struct _charformat2w {
303 UINT cbSize;
304 DWORD dwMask;
305 DWORD dwEffects;
306 LONG yHeight;
307 LONG yOffset;
308 COLORREF crTextColor;
309 BYTE bCharSet;
310 BYTE bPitchAndFamily;
311 WCHAR szFaceName[LF_FACESIZE];
312 WORD pad; /* Not in MS's C version, but needed to ensure that wWeight is at the correct offset to match the C++ version */
313 WORD wWeight;
314 SHORT sSpacing;
315 COLORREF crBackColor;
316 LCID lcid;
317 DWORD dwReserved;
318 SHORT sStyle;
319 WORD wKerning;
320 BYTE bUnderlineType;
321 BYTE bAnimation;
322 BYTE bRevAuthor;
323 } CHARFORMAT2W;
325 DECL_WINELIB_TYPE_AW(CHARFORMAT2)
327 #define CHARFORMATDELTA (sizeof(CHARFORMAT2) - sizeof(CHARFORMAT))
329 /* CHARFORMAT masks */
330 #define CFM_BOLD 0x00000001
331 #define CFM_ITALIC 0x00000002
332 #define CFM_UNDERLINE 0x00000004
333 #define CFM_STRIKEOUT 0x00000008
334 #define CFM_PROTECTED 0x00000010
335 #define CFM_LINK 0x00000020
336 #define CFM_SMALLCAPS 0x00000040
337 #define CFM_ALLCAPS 0x00000080
338 #define CFM_HIDDEN 0x00000100
339 #define CFM_OUTLINE 0x00000200
340 #define CFM_SHADOW 0x00000400
341 #define CFM_EMBOSS 0x00000800
342 #define CFM_IMPRINT 0x00001000
343 #define CFM_DISABLED 0x00002000
344 #define CFM_REVISED 0x00004000
345 #define CFM_REVAUTHOR 0x00008000
346 #define CFM_SUBSCRIPT 0x00030000
347 #define CFM_SUPERSCRIPT 0x00030000
348 #define CFM_ANIMATION 0x00040000
349 #define CFM_STYLE 0x00080000
350 #define CFM_KERNING 0x00100000
351 #define CFM_SPACING 0x00200000
352 #define CFM_WEIGHT 0x00400000
353 #define CFM_UNDERLINETYPE 0x00800000
354 #define CFM_LCID 0x02000000
355 #define CFM_BACKCOLOR 0x04000000
356 #define CFM_CHARSET 0x08000000
357 #define CFM_OFFSET 0x10000000
358 #define CFM_FACE 0x20000000
359 #define CFM_COLOR 0x40000000
360 #define CFM_SIZE 0x80000000
362 #define CFM_EFFECTS (CFM_BOLD | \
363 CFM_ITALIC | \
364 CFM_UNDERLINE | \
365 CFM_COLOR | \
366 CFM_STRIKEOUT | \
367 CFE_PROTECTED | \
368 CFM_LINK)
370 #define CFM_EFFECTS2 (CFM_EFFECTS | \
371 CFM_DISABLED | \
372 CFM_SMALLCAPS | \
373 CFM_ALLCAPS | \
374 CFM_HIDDEN | \
375 CFM_OUTLINE | \
376 CFM_SHADOW | \
377 CFM_EMBOSS | \
378 CFM_IMPRINT | \
379 CFM_DISABLED | \
380 CFM_REVISED | \
381 CFM_SUBSCRIPT | \
382 CFM_SUPERSCRIPT | \
383 CFM_BACKCOLOR)
385 #define CFM_ALL (CFM_EFFECTS | \
386 CFM_SIZE | \
387 CFM_FACE | \
388 CFM_OFFSET | \
389 CFM_CHARSET)
391 #define CFM_ALL2 (CFM_ALL | \
392 CFM_EFFECTS2 | \
393 CFM_BACKCOLOR | \
394 CFM_LCID | \
395 CFM_UNDERLINETYPE | \
396 CFM_WEIGHT | \
397 CFM_REVAUTHOR | \
398 CFM_SPACING | \
399 CFM_KERNING | \
400 CFM_STYLE | \
401 CFM_ANIMATION)
403 /* CHARFORMAT effects */
404 #define CFE_BOLD 0x00000001
405 #define CFE_ITALIC 0x00000002
406 #define CFE_UNDERLINE 0x00000004
407 #define CFE_STRIKEOUT 0x00000008
408 #define CFE_PROTECTED 0x00000010
409 #define CFE_LINK 0x00000020
410 #define CFE_SUBSCRIPT 0x00010000
411 #define CFE_SUPERSCRIPT 0x00020000
412 #define CFE_AUTOCOLOR 0x40000000
414 #define CFE_SMALLCAPS CFM_SMALLCAPS
415 #define CFE_ALLCAPS CFM_ALLCAPS
416 #define CFE_HIDDEN CFM_HIDDEN
417 #define CFE_OUTLINE CFM_OUTLINE
418 #define CFE_SHADOW CFM_SHADOW
419 #define CFE_EMBOSS CFM_EMBOSS
420 #define CFE_IMPRINT CFM_IMPRINT
421 #define CFE_DISABLED CFM_DISABLED
422 #define CFE_REVISED CFM_REVISED
423 #define CFE_AUTOBACKCOLOR CFM_BACKCOLOR
425 #define CFU_UNDERLINENONE 0x00
426 #define CFU_UNDERLINE 0x01
427 #define CFU_UNDERLINEWORD 0x02
428 #define CFU_UNDERLINEDOUBLE 0x03
429 #define CFU_UNDERLINEDOTTED 0x04
430 #define CFU_UNDERLINEDASH 0x05
431 #define CFU_UNDERLINEDASHDOT 0x06
432 #define CFU_UNDERLINEDASHDOTDOT 0x07
433 #define CFU_UNDERLINEWAVE 0x08
434 #define CFU_UNDERLINETHICK 0x09
435 #define CFU_UNDERLINEHAIRLINE 0x0a
436 #define CFU_UNDERLINEDOUBLEWAVE 0x0b
437 #define CFU_UNDERLINEHEAVYWAVE 0x0c
438 #define CFU_UNDERLINELONGDASH 0x0d
439 #define CFU_UNDERLINETHICKDASH 0x0e
440 #define CFU_UNDERLINETHICKDASHDOT 0x0f
441 #define CFU_UNDERLINETHICKDASHDOTDOT 0x10
442 #define CFU_UNDERLINETHICKDOTTED 0x11
443 #define CFU_UNDERLINETHICKLONGDASH 0x12
444 #define CFU_INVERT 0xFE
445 #define CFU_CF1UNDERLINE 0xFF
447 /* ECO operations */
448 #define ECOOP_SET 0x0001
449 #define ECOOP_OR 0x0002
450 #define ECOOP_AND 0x0003
451 #define ECOOP_XOR 0x0004
453 /* edit control options */
454 #define ECO_AUTOWORDSELECTION 0x00000001
455 #define ECO_AUTOVSCROLL 0x00000040
456 #define ECO_AUTOHSCROLL 0x00000080
457 #define ECO_NOHIDESEL 0x00000100
458 #define ECO_READONLY 0x00000800
459 #define ECO_WANTRETURN 0x00001000
460 #define ECO_SAVESEL 0x00008000
461 #define ECO_SELECTIONBAR 0x01000000
462 #define ECO_VERTICAL 0x00400000
464 /* Event notification masks */
465 #define ENM_NONE 0x00000000
466 #define ENM_CHANGE 0x00000001
467 #define ENM_UPDATE 0x00000002
468 #define ENM_SCROLL 0x00000004
469 #define ENM_SCROLLEVENTS 0x00000008
470 #define ENM_DRAGDROPDONE 0x00000010
471 #define ENM_PARAGRAPHEXPANDED 0x00000020
472 #define ENM_PAGECHANGE 0x00000040
473 #define ENM_KEYEVENTS 0x00010000
474 #define ENM_MOUSEEVENTS 0x00020000
475 #define ENM_REQUESTRESIZE 0x00040000
476 #define ENM_SELCHANGE 0x00080000
477 #define ENM_DROPFILES 0x00100000
478 #define ENM_PROTECTED 0x00200000
479 #define ENM_CORRECTTEXT 0x00400000
480 #define ENM_IMECHANGE 0x00800000
481 #define ENM_LANGCHANGE 0x01000000
482 #define ENM_OBJECTPOSITIONS 0x02000000
483 #define ENM_LINK 0x04000000
484 #define ENM_LOWFIRTF 0x08000000
486 typedef struct _bidioptions
488 UINT cbSize;
489 WORD wMask;
490 WORD wEffects;
491 } BIDIOPTIONS;
493 #ifndef __RICHEDIT_CHARRANGE_DEFINED
494 #define __RICHEDIT_CHARRANGE_DEFINED
496 typedef struct _charrange
498 LONG cpMin;
499 LONG cpMax;
500 } CHARRANGE;
502 #endif /* __RICHEDIT_CHARRANGE_DEFINED */
504 typedef struct _textrange
506 CHARRANGE chrg;
507 LPSTR lpstrText;
508 } TEXTRANGEA;
510 typedef struct _textrangew
512 CHARRANGE chrg;
513 LPWSTR lpstrText;
514 } TEXTRANGEW;
516 DECL_WINELIB_TYPE_AW(TEXTRANGE)
518 typedef struct _editstream
520 DWORD_PTR dwCookie;
521 DWORD dwError;
522 EDITSTREAMCALLBACK pfnCallback;
523 } EDITSTREAM;
525 typedef struct _compcolor {
526 COLORREF crText;
527 COLORREF crBackground;
528 DWORD dwEffects;
529 } COMPCOLOR;
531 typedef struct _encorrecttext {
532 NMHDR nmhdr;
533 CHARRANGE chrg;
534 WORD seltyp;
535 } ENCORRECTTEXT;
537 typedef struct _endropfiles {
538 NMHDR nmhdr;
539 HANDLE hDrop;
540 LONG cp;
541 BOOL fProtected;
542 } ENDROPFILES;
544 typedef struct _enlink {
545 NMHDR nmhdr;
546 UINT msg;
547 WPARAM wParam;
548 LPARAM lParam;
549 CHARRANGE chrg;
550 } ENLINK;
552 typedef struct _enlowfirtf {
553 NMHDR nmhdr;
554 char *szControl;
555 } ENLOWFIRTF;
557 typedef struct {
558 NMHDR nmhdr;
559 LONG iob;
560 LONG lOper;
561 HRESULT hr;
562 } ENOLEOPFAILED;
564 typedef struct _enprotected {
565 NMHDR nmhdr;
566 UINT msg;
567 WPARAM wParam;
568 LPARAM lParam;
569 CHARRANGE chrg;
570 } ENPROTECTED, *LPENPROTECTED;
572 typedef struct _ensaveclipboard {
573 NMHDR nmhdr;
574 LONG cObjectCount;
575 LONG cch;
576 } ENSAVECLIPBOARD;
578 typedef struct _findtextA {
579 CHARRANGE chrg;
580 LPCSTR lpstrText;
581 } FINDTEXTA;
583 typedef struct _findtextW {
584 CHARRANGE chrg;
585 LPCWSTR lpstrText;
586 } FINDTEXTW;
588 DECL_WINELIB_TYPE_AW(FINDTEXT)
590 typedef struct _findtextexA {
591 CHARRANGE chrg;
592 LPCSTR lpstrText;
593 CHARRANGE chrgText;
594 } FINDTEXTEXA;
596 typedef struct _findtextexW {
597 CHARRANGE chrg;
598 LPCWSTR lpstrText;
599 CHARRANGE chrgText;
600 } FINDTEXTEXW;
602 DECL_WINELIB_TYPE_AW(FINDTEXTEX)
604 typedef struct _formatrange {
605 HDC hdc;
606 HDC hdcTarget;
607 RECT rc;
608 RECT rcPage;
609 CHARRANGE chrg;
610 } FORMATRANGE;
612 typedef enum tagKHYPH
614 khyphNil = 0,
615 khyphNormal = 1,
616 khyphAddBefore = 2,
617 khyphChangeBefore = 3,
618 khyphDeleteBefore = 4,
619 khyphChangeAfter = 5,
620 khyphDelAndChange = 6
621 } KHYPH;
623 typedef struct hyphresult
625 KHYPH khyph;
626 LONG ichHyph;
627 WCHAR chHyph;
628 } HYPHRESULT;
630 typedef struct tagHyphenateInfo
632 SHORT cbSize;
633 SHORT dxHyphenateZone;
634 void (WINAPI* pfnHyphenate)(WCHAR*, LANGID, LONG, HYPHRESULT*);
635 } HYPHENATEINFO;
637 typedef struct _msgfilter {
638 NMHDR nmhdr;
639 UINT msg;
640 WPARAM wParam;
641 LPARAM lParam;
642 } MSGFILTER;
644 typedef struct _objectpositions {
645 NMHDR nmhdr;
646 LONG cObjectCount;
647 LONG *pcpPositions;
648 } OBJECTPOSITIONS;
650 typedef struct _paraformat {
651 UINT cbSize;
652 DWORD dwMask;
653 WORD wNumbering;
654 WORD wReserved;
655 LONG dxStartIndent;
656 LONG dxRightIndent;
657 LONG dxOffset;
658 WORD wAlignment;
659 SHORT cTabCount;
660 LONG rgxTabs[MAX_TAB_STOPS];
661 } PARAFORMAT;
663 typedef struct _paraformat2 {
664 UINT cbSize;
665 DWORD dwMask;
666 WORD wNumbering;
667 WORD wEffects;
668 LONG dxStartIndent;
669 LONG dxRightIndent;
670 LONG dxOffset;
671 WORD wAlignment;
672 SHORT cTabCount;
673 LONG rgxTabs[MAX_TAB_STOPS];
674 LONG dySpaceBefore, dySpaceAfter, dyLineSpacing;
675 SHORT sStyle;
676 BYTE bLineSpacingRule, bOutlineLevel;
677 WORD wShadingWeight, wShadingStyle;
678 WORD wNumberingStart, wNumberingStyle, wNumberingTab;
679 WORD wBorderSpace, wBorderWidth, wBorders;
680 } PARAFORMAT2;
682 typedef struct _selchange {
683 NMHDR nmhdr;
684 CHARRANGE chrg;
685 WORD seltyp;
686 } SELCHANGE;
688 typedef struct _reqresize {
689 NMHDR nmhdr;
690 RECT rc;
691 } REQRESIZE;
693 typedef struct _repastespecial {
694 DWORD dwAspect;
695 DWORD_PTR dwParam;
696 } REPASTESPECIAL;
698 typedef struct _punctuation {
699 UINT iSize;
700 LPSTR szPunctuation;
701 } PUNCTUATION;
703 typedef struct _gettextex {
704 DWORD cb;
705 DWORD flags;
706 UINT codepage;
707 LPCSTR lpDefaultChar;
708 LPBOOL lpUsedDefChar;
709 } GETTEXTEX;
711 typedef struct _imecomptext {
712 LONG cb;
713 DWORD flags;
714 } IMECOMPTEXT;
716 void WINAPI HyphenateProc(WCHAR*, LANGID, LONG, HYPHRESULT*);
718 #define SF_TEXT 0x00000001
719 #define SF_RTF 0x00000002
720 #define SF_RTFNOOBJS 0x00000003
721 #define SF_TEXTIZED 0x00000004
722 #define SF_UNICODE 0x00000010
723 #define SF_USECODEPAGE 0x00000020
724 #define SF_NCRFORNONASCII 0x00000040
725 #define SF_RTFVAL 0x00000700
727 /* BIDIOPTIONS.wMask flag values */
728 #define BOM_DEFPARADIR 0x00000001
729 #define BOM_PLAINTEXT 0x00000002
730 #define BOM_NEUTRALOVERRIDE 0x00000004
731 #define BOM_CONTEXTREADING 0x00000008
732 #define BOM_CONTEXTALIGNMENT 0x00000010
733 #define BOM_LEGACYBIDICLASS 0x00000040
735 /* BIDIOPTIONS.wEffects flag values */
736 #define BOE_RTLDIR 0x00000001
737 #define BOE_PLAINTEXT 0x00000002
738 #define BOE_NEUTRALOVERRIDE 0x00000004
739 #define BOE_CONTEXTREADING 0x00000008
740 #define BOE_CONTEXTALIGNMENT 0x00000010
741 #define BOE_LEGACYBIDICLASS 0x00000040
743 /* Clipboard formats */
744 #define CF_RTF TEXT("Rich Text Format")
745 #define CF_RTFNOOBJS TEXT("Rich Text Format Without Objects")
746 #define CF_RETEXTOBJ TEXT("RichEdit Text and Objects")
748 /* Mode bias wParam values for EM_SETCTFMODEBIAS message */
749 #define CTFMODEBIAS_DEFAULT 0x00000000
750 #define CTFMODEBIAS_FILENAME 0x00000001
751 #define CTFMODEBIAS_NAME 0x00000002
752 #define CTFMODEBIAS_READING 0x00000003
753 #define CTFMODEBIAS_DATETIME 0x00000004
754 #define CTFMODEBIAS_CONVERSATION 0x00000005
755 #define CTFMODEBIAS_NUMERIC 0x00000006
756 #define CTFMODEBIAS_HIRAGANA 0x00000007
757 #define CTFMODEBIAS_KATAKANA 0x00000008
758 #define CTFMODEBIAS_HANGUL 0x00000009
759 #define CTFMODEBIAS_HALFWIDTHKATAKANA 0x0000000a
760 #define CTFMODEBIAS_FULLWIDTHALPHANUMERIC 0x0000000b
761 #define CTFMODEBIAS_HALFWIDTHALPHANUMERIC 0x0000000c
763 #define EMO_EXIT 0x00000000
764 #define EMO_ENTER 0x00000001
765 #define EMO_PROMOTE 0x00000002
766 #define EMO_EXPAND 0x00000003
767 #define EMO_MOVESELECTION 0x00000004
768 #define EMO_GETVIEWMODE 0x00000005
770 #define EMO_EXPANDSELECTION 0x00000000
771 #define EMO_EXPANDDOCUMENT 0x00000001
773 /* Page Rotate values used in wParam of EM_SETPAGEROTATE message */
774 #define EPR_0 0x00000000
775 #define EPR_270 0x00000001
776 #define EPR_180 0x00000002
777 #define EPR_90 0x00000003
779 /* Find flags for wParam of EM_FINDTEXT message */
780 #define FR_MATCHDIAC 0x20000000
781 #define FR_MATCHKASHIDA 0x40000000
782 #define FR_MATCHALEFHAMZA 0x80000000
784 /* IME Compatibility Mode return values for EM_GETIMECOMPMODE message */
785 #define ICM_NOTOPEN 0x00000000
786 #define ICM_LEVEL3 0x00000001
787 #define ICM_LEVEL2 0x00000002
788 #define ICM_LEVEL2_5 0x00000003
789 #define ICM_LEVEL2_SUI 0x00000004
790 #define ICM_CTF 0x00000005
792 /* Flags value for IMECOMPTEXT structure */
793 #define ICT_RESULTREADSTR 0x00000001
795 /* Input Method Flags used in EM_SETLANGOPTIONS message */
796 #define IMF_AUTOKEYBOARD 0x00000001
797 #define IMF_AUTOFONT 0x00000002
798 #define IMF_IMECANCELCOMPLETE 0x00000004
799 #define IMF_IMEALWAYSSENDNOTIFY 0x00000008
800 #define IMF_AUTOFONTSIZEADJUST 0x00000010
801 #define IMF_UIFONTS 0x00000020
802 #define IMF_DUALFONT 0x00000080
804 /* Parameters values for the EM_SETIMEMODEBIAS message */
805 #define IMF_SMODE_PLAURALCLAUSE 0x00000001
806 #define IMF_SMODE_NONE 0x00000002
808 /* Parameters of the EM_SETIMEOPTIONS message */
809 #define IMF_FORCENONE 0x00000001
810 #define IMF_FORCEENABLE 0x00000002
811 #define IMF_FORCEDISABLE 0x00000004
812 #define IMF_CLOSESTATUSWINDOW 0x00000008
813 #define IMF_VERTICAL 0x00000020
814 #define IMF_FORCEACTIVE 0x00000040
815 #define IMF_FORCEINACTIVE 0x00000080
816 #define IMF_FORCEREMEMBER 0x00000100
817 #define IMF_MULTIPLEEDIT 0x00000400
819 /* return values of the EM_SELECTION_TYPE message */
820 #define SEL_EMPTY 0x00000000
821 #define SEL_TEXT 0x00000001
822 #define SEL_OBJECT 0x00000002
823 #define SEL_MULTICHAR 0x00000004
824 #define SEL_MULTIOBJECT 0x00000008
826 /* ENOLEOPFAILED.lOper value that indicates operation failure */
827 #define OLEOP_DOVERB 0x00000001
829 /* punctionation type values for wParam of EM_SETPUNCTUATION message */
830 #define PC_FOLLOWING 0x00000001
831 #define PC_LEADING 0x00000002
832 #define PC_OVERFLOW 0x00000003
833 #define PC_DELIMITER 0x00000004
835 /* mask values in the PARAFORMAT structure */
836 #define PFM_STARTINDENT 0x00000001
837 #define PFM_RIGHTINDENT 0x00000002
838 #define PFM_OFFSET 0x00000004
839 #define PFM_ALIGNMENT 0x00000008
840 #define PFM_TABSTOPS 0x00000010
841 #define PFM_NUMBERING 0x00000020
842 #define PFM_OFFSETINDENT 0x80000000
844 /* mask values in the PARAFORMAT2 structure */
845 #define PFM_SPACEBEFORE 0x00000040
846 #define PFM_SPACEAFTER 0x00000080
847 #define PFM_LINESPACING 0x00000100
848 #define PFM_STYLE 0x00000400
849 #define PFM_BORDER 0x00000800
850 #define PFM_SHADING 0x00001000
851 #define PFM_NUMBERINGSTYLE 0x00002000
852 #define PFM_NUMBERINGTAB 0x00004000
853 #define PFM_NUMBERINGSTART 0x00008000
854 #define PFM_RTLPARA 0x00010000
855 #define PFM_KEEP 0x00020000
856 #define PFM_KEEPNEXT 0x00040000
857 #define PFM_PAGEBREAKBEFORE 0x00080000
858 #define PFM_NOLINENUMBER 0x00100000
859 #define PFM_NOWIDOWCONTROL 0x00200000
860 #define PFM_DONOTHYPHEN 0x00400000
861 #define PFM_SIDEBYSIDE 0x00800000
862 #define PFM_COLLAPSED 0x01000000
863 #define PFM_OUTLINELEVEL 0x02000000
864 #define PFM_BOX 0x04000000
865 #define PFM_RESERVED2 0x08000000
866 #define PFM_TABLEROWDELIMITER 0x10000000
867 #define PFM_TEXTWRAPPINGBREAK 0x20000000
868 #define PFM_TABLE 0x40000000
870 #define PFM_ALL (PFM_STARTINDENT | \
871 PFM_RIGHTINDENT | \
872 PFM_OFFSET | \
873 PFM_ALIGNMENT | \
874 PFM_TABSTOPS | \
875 PFM_NUMBERING | \
876 PFM_OFFSETINDENT | \
877 PFM_RTLPARA)
879 #define PFM_EFFECTS (PFM_RTLPARA | \
880 PFM_KEEP | \
881 PFM_KEEPNEXT | \
882 PFM_PAGEBREAKBEFORE | \
883 PFM_NOLINENUMBER | \
884 PFM_NOWIDOWCONTROL | \
885 PFM_DONOTHYPHEN | \
886 PFM_SIDEBYSIDE | \
887 PFM_TABLEROWDELIMITER | \
888 PFM_TABLE)
890 #define PFM_ALL2 (PFM_ALL | \
891 PFM_EFFECTS | \
892 PFM_SPACEBEFORE | \
893 PFM_SPACEAFTER | \
894 PFM_LINESPACING | \
895 PFM_STYLE | \
896 PFM_BORDER | \
897 PFM_SHADING | \
898 PFM_NUMBERINGSTYLE | \
899 PFM_NUMBERINGTAB | \
900 PFM_NUMBERINGSTART)
902 /* numbering option */
903 #define PFN_BULLET 0x00000001
904 #define PFN_ARABIC 0x00000002
905 #define PFN_LCLETTER 0x00000003
906 #define PFN_UCLETTER 0x00000004
907 #define PFN_LCROMAN 0x00000005
908 #define PFN_UCROMAN 0x00000006
910 /* paragraph format numbering styles */
911 #define PFNS_PAREN 0x00000000
912 #define PFNS_PARENS 0x00000100
913 #define PFNS_PERIOD 0x00000200
914 #define PFNS_PLAIN 0x00000300
915 #define PFNS_NONUMBER 0x00000400
916 #define PFNS_NEWNUMBER 0x00008000
918 /* paragraph alignment */
919 #define PFA_LEFT 0x00000001
920 #define PFA_RIGHT 0x00000002
921 #define PFA_CENTER 0x00000003
922 #define PFA_JUSTIFY 0x00000004
923 #define PFA_FULL_INTERWORD 0x00000004
924 #define PFA_FULL_INTERLETTER 0x00000005
925 #define PFA_FULL_SCALED 0x00000006
926 #define PFA_FULL_GLYPHS 0x00000007
927 #define PFA_SNAP_GRID 0x00000008
929 /* paragraph effects */
930 #define PFE_RTLPARA 0x00000001
931 #define PFE_KEEP 0x00000002
932 #define PFE_KEEPNEXT 0x00000004
933 #define PFE_PAGEBREAKBEFORE 0x00000008
934 #define PFE_NOLINENUMBER 0x00000010
935 #define PFE_NOWIDOWCONTROL 0x00000020
936 #define PFE_DONOTHYPHEN 0x00000040
937 #define PFE_SIDEBYSIDE 0x00000080
938 #define PFE_COLLAPSED 0x00000100
939 #define PFE_BOX 0x00000400
940 #define PFE_TABLEROWDELIMITER 0x00001000
941 #define PFE_TEXTWRAPPINGBREAK 0x00002000
942 #define PFE_TABLE 0x00004000
944 /* Set Edit Style flags for EM_SETEDITSTYLE message */
945 #define SES_EMULATESYSEDIT 0x00000001
946 #define SES_BEEPONMAXTEXT 0x00000002
947 #define SES_EXTENDBACKCOLOR 0x00000004
948 #define SES_MAPCPS 0x00000008
949 #define SES_EMULATE10 0x00000010
950 #define SES_USECRLF 0x00000020
951 #define SES_NOXLTSYMBOLRANGE 0x00000020
952 #define SES_USEAIMM 0x00000040
953 #define SES_NOIME 0x00000080
954 #define SES_ALLOWBEEPS 0x00000100
955 #define SES_UPPERCASE 0x00000200
956 #define SES_LOWERCASE 0x00000400
957 #define SES_NOINPUTSEQUENCECHK 0x00000800
958 #define SES_BIDI 0x00001000
959 #define SES_SCROLLONKILLFOCUS 0x00002000
960 #define SES_XLTCRCRLFTOCR 0x00004000
961 #define SES_DRAFTMODE 0x00008000
962 #define SES_USECTF 0x00010000
963 #define SES_HIDEGRIDLINES 0x00020000
964 #define SES_USEATFONT 0x00040000
965 #define SES_CUSTOMLOOK 0x00080000
966 #define SES_LBSCROLLNOTIFY 0x00100000
967 #define SES_CTFALLOWEMBED 0x00200000
968 #define SES_CTFALLOWSMARTTAG 0x00400000
969 #define SES_CTFALLOWPROOFING 0x00800000
971 /* streaming flags */
972 #define SFF_WRITEXTRAPAR 0x00000080
973 #define SFF_PWD 0x00000800
974 #define SFF_KEEPDOCINFO 0x00001000
975 #define SFF_PERSISTVIEWSCALE 0x00002000
976 #define SFF_PLAINRTF 0x00004000
977 #define SFF_SELECTION 0x00008000
979 typedef enum _undonameid
981 UID_UNKNOWN = 0,
982 UID_TYPING = 1,
983 UID_DELETE = 2,
984 UID_DRAGDROP = 3,
985 UID_CUT = 4,
986 UID_PASTE = 5,
987 UID_AUTOCORRECT = 6
988 } UNDONAMEID;
990 typedef LONG (*EDITWORDBREAKPROCEX)(char*,LONG,BYTE,INT);
992 #define VM_OUTLINE 0x00000002
993 #define VM_NORMAL 0x00000004
994 #define VM_PAGE 0x00000009
996 /* options of the EM_FINDWORDBREAK message */
997 #define WB_CLASSIFY 0x00000003
998 #define WB_MOVEWORDLEFT 0x00000004
999 #define WB_MOVEWORDPREV 0x00000004
1000 #define WB_MOVEWORDRIGHT 0x00000005
1001 #define WB_MOVEWORDNEXT 0x00000005
1002 #define WB_LEFTBREAK 0x00000006
1003 #define WB_PREVBREAK 0x00000006
1004 #define WB_RIGHTBREAK 0x00000007
1005 #define WB_NEXTBREAK 0x00000007
1007 /* options of the EM_SETWORDWRAPMODE message */
1008 #define WBF_WORDWRAP 0x00000010
1009 #define WBF_WORDBREAK 0x00000020
1010 #define WBF_OVERFLOW 0x00000040
1011 #define WBF_LEVEL1 0x00000080
1012 #define WBF_LEVEL2 0x00000100
1013 #define WBF_CUSTOM 0x00000200
1015 #define WBF_CLASS ((BYTE) 0x0F)
1016 #define WBF_ISWHITE ((BYTE) 0x10)
1017 #define WBF_BREAKLINE ((BYTE) 0x20)
1018 #define WBF_BREAKAFTER ((BYTE) 0x40)
1020 /* Placeholder unicode character for an embedded object */
1021 #ifndef WCH_EMBEDDING
1022 #define WCH_EMBEDDING (WCHAR)0xFFFC
1023 #endif
1025 /* options of the EM_SETTEXTMODE message */
1026 #define TM_PLAINTEXT 0x00000001
1027 #define TM_RICHTEXT 0x00000002
1028 #define TM_SINGLELEVELUNDO 0x00000004
1029 #define TM_MULTILEVELUNDO 0x00000008
1030 #define TM_SINGLECODEPAGE 0x00000010
1031 #define TM_MULTICODEPAGE 0x00000020
1033 /* GETTEXTEX structure flags */
1034 #define GT_DEFAULT 0x00000000
1035 #define GT_USECRLF 0x00000001
1036 #define GT_SELECTION 0x00000002
1037 #define GT_RAWTEXT 0x00000004
1038 #define GT_NOHIDDENTEXT 0x00000008
1040 /* Options of the EM_SETTYPOGRAPHYOPTIONS message */
1041 #define TO_ADVANCEDTYPOGRAPHY 0x00000001
1042 #define TO_SIMPLELINEBREAK 0x00000002
1043 #define TO_DISABLECUSTOMTEXTOUT 0x00000004
1044 #define TO_ADVANCEDLAYOUT 0x00000008
1046 typedef struct _gettextlengthex {
1047 DWORD flags;
1048 UINT codepage;
1049 } GETTEXTLENGTHEX;
1051 /* Flags of the GETTEXTLENGTHEX structure */
1052 #define GTL_DEFAULT 0x00000000
1053 #define GTL_USECRLF 0x00000001
1054 #define GTL_PRECISE 0x00000002
1055 #define GTL_CLOSE 0x00000004
1056 #define GTL_NUMCHARS 0x00000008
1057 #define GTL_NUMBYTES 0x00000010
1059 #define GCM_RIGHTMOUSEDROP 0x8000
1061 /* Options of the EM_SETTEXTEX message */
1062 typedef struct _settextex {
1063 DWORD flags;
1064 UINT codepage;
1065 } SETTEXTEX;
1067 /* Flags of the EM_SETTEXTEX message */
1068 #define ST_DEFAULT 0x00000000
1069 #define ST_KEEPUNDO 0x00000001
1070 #define ST_SELECTION 0x00000002
1071 #define ST_NEWCHARS 0x00000004
1072 #define ST_UNICODE 0x00000008
1074 /* Flags for EM_AUTOURLDETECT message */
1075 #define AURL_ENABLEURL 0x00000001
1076 #define AURL_ENABLEMAILADDR 0x00000002
1077 #define AURL_ENABLETELNO 0x00000004
1078 #define AURL_ENABLEEAURLS 0x00000008
1079 #define AURL_ENABLEDRIVELETTERS 0x00000010
1080 #define AURL_DISABLEMIXEDLGC 0x00000020
1082 #ifdef __cplusplus
1084 #endif
1086 #include <poppack.h>
1088 #endif /* __WINE_RICHEDIT_H */