KERNEL_VERSION_MAJOR: 0 -> 5
[reactos.git] / include / richedit.h
1 /*
2  * Copyright (C) 2000 Jean-Claude Batista
3  * Copyright (C) 2002 Andriy Palamarchuk
4  *
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.
9  *
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.
14  *
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  */
19
20 #ifndef __WINE_RICHEDIT_H
21 #define __WINE_RICHEDIT_H
22
23 #include "pshpack4.h"
24
25 /* added definitions from the wine source */
26 #define WINELIB_NAME_AW(func) func##W
27 #define DECL_WINELIB_TYPE_AW(type)  typedef WINELIB_NAME_AW(type) type;
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #ifndef _RICHEDIT_VER
34 #define _RICHEDIT_VER   0x0210
35 #endif /* _RICHEDIT_VER */
36
37 #define cchTextLimitDefault 0x7fff
38
39 #define RICHEDIT_CLASS20A       "RichEdit20A"
40 #if defined(__GNUC__)
41 # define RICHEDIT_CLASS20W (const WCHAR []){ 'R','i','c','h','E','d','i','t','2','0','W',0 }
42 #elif defined(_MSC_VER)
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"
48
49 #if (_RICHEDIT_VER >= 0x0200 )
50 #define RICHEDIT_CLASS          WINELIB_NAME_AW(RICHEDIT_CLASS20)
51 #else
52 #define RICHEDIT_CLASS          RICHEDIT_CLASS10A
53 #endif
54
55 #define EM_CANPASTE             (WM_USER + 50)
56 #define EM_DISPLAYBAND          (WM_USER + 51)
57 #define EM_EXGETSEL             (WM_USER + 52)
58 #define EM_EXLIMITTEXT          (WM_USER + 53)
59 #define EM_EXLINEFROMCHAR       (WM_USER + 54)
60 #define EM_EXSETSEL             (WM_USER + 55)
61 #define EM_FINDTEXT             (WM_USER + 56)
62 #define EM_FORMATRANGE          (WM_USER + 57)
63 #define EM_GETCHARFORMAT        (WM_USER + 58)
64 #define EM_GETEVENTMASK         (WM_USER + 59)
65 #define EM_GETOLEINTERFACE      (WM_USER + 60)
66 #define EM_GETPARAFORMAT        (WM_USER + 61)
67 #define EM_GETSELTEXT           (WM_USER + 62)
68 #define EM_HIDESELECTION        (WM_USER + 63)
69 #define EM_PASTESPECIAL         (WM_USER + 64)
70 #define EM_REQUESTRESIZE        (WM_USER + 65)
71 #define EM_SELECTIONTYPE        (WM_USER + 66)
72 #define EM_SETBKGNDCOLOR        (WM_USER + 67)
73 #define EM_SETCHARFORMAT        (WM_USER + 68)
74 #define EM_SETEVENTMASK         (WM_USER + 69)
75 #define EM_SETOLECALLBACK       (WM_USER + 70)
76 #define EM_SETPARAFORMAT        (WM_USER + 71)
77 #define EM_SETTARGETDEVICE      (WM_USER + 72)
78 #define EM_STREAMIN             (WM_USER + 73)
79 #define EM_STREAMOUT            (WM_USER + 74)
80 #define EM_GETTEXTRANGE         (WM_USER + 75)
81 #define EM_FINDWORDBREAK        (WM_USER + 76)
82 #define EM_SETOPTIONS           (WM_USER + 77)
83 #define EM_GETOPTIONS           (WM_USER + 78)
84 #define EM_FINDTEXTEX           (WM_USER + 79)
85 #define EM_GETWORDBREAKPROCEX   (WM_USER + 80)
86 #define EM_SETWORDBREAKPROCEX   (WM_USER + 81)
87
88 #define EM_SETUNDOLIMIT         (WM_USER + 82)
89 #define EM_REDO                 (WM_USER + 84)
90 #define EM_CANREDO              (WM_USER + 85)
91 #define EM_GETUNDONAME          (WM_USER + 86)
92 #define EM_GETREDONAME          (WM_USER + 87)
93 #define EM_STOPGROUPTYPING      (WM_USER + 88)
94
95 #define EM_SETTEXTMODE          (WM_USER + 89)
96 #define EM_GETTEXTMODE          (WM_USER + 90)
97 #define EM_AUTOURLDETECT        (WM_USER + 91)
98 #define EM_GETAUTOURLDETECT     (WM_USER + 92)
99 #define EM_SETPALETTE           (WM_USER + 93)
100 #define EM_GETTEXTEX            (WM_USER + 94)
101 #define EM_GETTEXTLENGTHEX      (WM_USER + 95)
102 #define EM_SHOWSCROLLBAR        (WM_USER + 96)
103 #define EM_SETTEXTEX            (WM_USER + 97)
104
105 #define EM_SETPUNCTUATION       (WM_USER + 100)
106 #define EM_GETPUNCTUATION       (WM_USER + 101)
107 #define EM_SETWORDWRAPMODE      (WM_USER + 102)
108 #define EM_GETWORDWRAPMODE      (WM_USER + 103)
109 #define EM_SETIMECOLOR          (WM_USER + 104)
110 #define EM_GETIMECOLOR          (WM_USER + 105)
111 #define EM_SETIMEOPTIONS        (WM_USER + 106)
112 #define EM_GETIMEOPTIONS        (WM_USER + 107)
113 #define EM_CONVPOSITION         (WM_USER + 108)
114
115 #define EM_SETLANGOPTIONS       (WM_USER + 120)
116 #define EM_GETLANGOPTIONS       (WM_USER + 121)
117 #define EM_GETIMECOMPMODE       (WM_USER + 122)
118
119 #define EM_SETLANGOPTIONS       (WM_USER + 120)
120 #define EM_GETLANGOPTIONS       (WM_USER + 121)
121 #define EM_GETIMECOMPMODE       (WM_USER + 122)
122
123 #define EM_FINDTEXTW            (WM_USER + 123)
124 #define EM_FINDTEXTEXW          (WM_USER + 124)
125
126 #define EM_RECONVERSION         (WM_USER + 125)
127 #define EM_SETIMEMODEBIAS       (WM_USER + 126)
128 #define EM_GETIMEMODEBIAS       (WM_USER + 127)
129
130 #define EM_SETBIDIOPTIONS       (WM_USER + 200)
131 #define EM_GETBIDIOPTIONS       (WM_USER + 201)
132
133 #define EM_SETTYPOGRAPHYOPTIONS (WM_USER + 202)
134 #define EM_GETTYPOGRAPHYOPTIONS (WM_USER + 203)
135
136 #define EM_SETEDITSTYLE         (WM_USER + 204)
137 #define EM_GETEDITSTYLE         (WM_USER + 205)
138
139 #define EM_OUTLINE              (WM_USER + 220)
140
141 #define EM_GETSCROLLPOS         (WM_USER + 221)
142 #define EM_SETSCROLLPOS         (WM_USER + 222)
143
144 #define EM_SETFONTSIZE          (WM_USER + 223)
145 #define EM_GETZOOM              (WM_USER + 224)
146 #define EM_SETZOOM              (WM_USER + 225)
147
148 /* New notifications */
149 #define EN_MSGFILTER                    0x0700
150 #define EN_REQUESTRESIZE                0x0701
151 #define EN_SELCHANGE                    0x0702
152 #define EN_DROPFILES                    0x0703
153 #define EN_PROTECTED                    0x0704
154 #define EN_CORRECTTEXT                  0x0705
155 #define EN_STOPNOUNDO                   0x0706
156 #define EN_IMECHANGE                    0x0707
157 #define EN_SAVECLIPBOARD                0x0708
158 #define EN_OLEOPFAILED                  0x0709
159 #define EN_OBJECTPOSITIONS              0x070a
160 #define EN_LINK                         0x070b
161 #define EN_DRAGDROPDONE                 0x070c
162 #define EN_PARAGRAPHEXPANDED            0x070d
163 #define EN_ALIGNLTR                     0x0710
164 #define EN_ALIGNRTL                     0x0711
165
166
167 typedef DWORD (CALLBACK * EDITSTREAMCALLBACK)( DWORD, LPBYTE, LONG, LONG * );
168
169 /* tab stops number limit */
170 #define MAX_TAB_STOPS         0x00000020
171
172 /* Rich edit control styles */
173 #define ES_DISABLENOSCROLL    0x00002000
174 #define ES_SUNKEN             0x00004000
175 #define ES_SAVESEL            0x00008000
176 #define ES_SELFIME            0x00040000
177 #define ES_NOIME              0x00080000
178 #define ES_VERTICAL           0x00400000
179 #define ES_SELECTIONBAR       0x01000000
180 #define ES_EX_NOCALLOLEINIT   0x01000000
181
182 /* the character formatting options */
183 #define SCF_DEFAULT           0x00000000
184 #define SCF_SELECTION         0x00000001
185 #define SCF_WORD              0x00000002
186 #define SCF_ALL               0x00000004
187 #define SCF_USEUIRULES        0x00000008
188
189 /* CHARFORMAT structure */
190 typedef struct _charformat
191 {
192     UINT       cbSize;
193     DWORD      dwMask;
194     DWORD      dwEffects;
195     LONG       yHeight;
196     LONG       yOffset;
197     COLORREF   crTextColor;
198     BYTE       bCharSet;
199     BYTE       bPitchAndFamily;
200     char       szFaceName[LF_FACESIZE];
201 } CHARFORMATA;
202
203 typedef struct _charformatw
204 {
205     UINT       cbSize;
206     DWORD      dwMask;
207     DWORD      dwEffects;
208     LONG       yHeight;
209     LONG       yOffset;
210     COLORREF   crTextColor;
211     BYTE       bCharSet;
212     BYTE       bPitchAndFamily;
213     WCHAR      szFaceName[LF_FACESIZE];
214 } CHARFORMATW;
215
216 DECL_WINELIB_TYPE_AW(CHARFORMAT)
217
218 typedef struct _charformat2a {
219     UINT       cbSize;
220     DWORD      dwMask;
221     DWORD      dwEffects;
222     LONG       yHeight;
223     LONG       yOffset;
224     COLORREF   crTextColor;
225     BYTE       bCharSet;
226     BYTE       bPitchAndFamily;
227     char       szFaceName[LF_FACESIZE];
228     WORD       wWeight;
229     SHORT      sSpacing;
230     COLORREF   crBackColor;
231     LCID       lcid;
232     DWORD      dwReserved;
233     SHORT      sStyle;
234     WORD       wKerning;
235     BYTE       bUnderlineType;
236     BYTE       bAnimation;
237     BYTE       bRevAuthor;
238 } CHARFORMAT2A;
239
240 typedef struct _charformat2w {
241     UINT       cbSize;
242     DWORD      dwMask;
243     DWORD      dwEffects;
244     LONG       yHeight;
245     LONG       yOffset;
246     COLORREF   crTextColor;
247     BYTE       bCharSet;
248     BYTE       bPitchAndFamily;
249     WCHAR      szFaceName[LF_FACESIZE];
250     WORD       wWeight;
251     SHORT      sSpacing;
252     COLORREF   crBackColor;
253     LCID       lcid;
254     DWORD      dwReserved;
255     SHORT      sStyle;
256     WORD       wKerning;
257     BYTE       bUnderlineType;
258     BYTE       bAnimation;
259     BYTE       bRevAuthor;
260 } CHARFORMAT2W;
261
262 DECL_WINELIB_TYPE_AW(CHARFORMAT2)
263
264 /* CHARFORMAT masks */
265 #define CFM_BOLD              0x00000001
266 #define CFM_ITALIC            0x00000002
267 #define CFM_UNDERLINE         0x00000004
268 #define CFM_STRIKEOUT         0x00000008
269 #define CFM_PROTECTED         0x00000010
270 #define CFM_LINK              0x00000020
271 #define CFM_SMALLCAPS         0x00000040
272 #define CFM_ALLCAPS           0x00000080
273 #define CFM_HIDDEN            0x00000100
274 #define CFM_OUTLINE           0x00000200
275 #define CFM_SHADOW            0x00000400
276 #define CFM_EMBOSS            0x00000800
277 #define CFM_IMPRINT           0x00001000
278 #define CFM_DISABLED          0x00002000
279 #define CFM_REVISED           0x00004000
280 #define CFM_REVAUTHOR         0x00008000
281 #define CFM_SUBSCRIPT         0x00030000
282 #define CFM_SUPERSCRIPT       0x00030000
283 #define CFM_ANIMATION         0x00040000
284 #define CFM_STYLE             0x00080000
285 #define CFM_KERNING           0x00100000
286 #define CFM_SPACING           0x00200000
287 #define CFM_WEIGHT            0x00400000
288 #define CFM_LCID              0x02000000
289 #define CFM_BACKCOLOR         0x04000000
290 #define CFM_CHARSET           0x08000000
291 #define CFM_OFFSET            0x10000000
292 #define CFM_FACE              0x20000000
293 #define CFM_COLOR             0x40000000
294 #define CFM_SIZE              0x80000000
295 #define CFM_EFFECTS           (CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_COLOR | CFM_STRIKEOUT | CFE_PROTECTED | CFM_LINK)
296
297 /* CHARFORMAT effects */
298 #define CFE_BOLD              0x00000001
299 #define CFE_ITALIC            0x00000002
300 #define CFE_UNDERLINE         0x00000004
301 #define CFE_STRIKEOUT         0x00000008
302 #define CFE_PROTECTED         0x00000010
303 #define CFE_LINK              0x00000020
304 #define CFE_SUBSCRIPT         0x00010000
305 #define CFE_SUPERSCRIPT       0x00020000
306 #define CFE_AUTOCOLOR         0x40000000
307
308 #define CFE_SMALLCAPS         CFM_SMALLCAPS
309 #define CFE_ALLCAPS           CFM_ALLCAPS
310 #define CFE_HIDDEN            CFM_HIDDEN
311 #define CFE_OUTLINE           CFM_OUTLINE
312 #define CFE_SHADOW            CFM_SHADOW
313 #define CFE_EMBOSS            CFM_EMBOSS
314 #define CFE_IMPRINT           CFM_IMPRINT
315 #define CFE_DISABLED          CFM_DISABLED
316 #define CFE_REVISED           CFM_REVISED
317
318 #define CFU_CF1UNDERLINE      0xFF
319 #define CFU_INVERT            0xFE
320 #define CFU_UNDERLINEDOTTED   0x04
321 #define CFU_UNDERLINEDOUBLE   0x03
322 #define CFU_UNDERLINEWORD     0x02
323 #define CFU_UNDERLINE         0x01
324 #define CFU_UNDERLINENONE     0x00
325
326 /* ECO operations */
327 #define ECOOP_SET             0x0001
328 #define ECOOP_OR              0x0002
329 #define ECOOP_AND             0x0003
330 #define ECOOP_XOR             0x0004
331
332 /* edit control options */
333 #define ECO_AUTOWORDSELECTION 0x00000001
334 #define ECO_AUTOVSCROLL       0x00000040
335 #define ECO_AUTOHSCROLL       0x00000080
336 #define ECO_NOHIDESEL         0x00000100
337 #define ECO_READONLY          0x00000800
338 #define ECO_WANTRETURN        0x00001000
339 #define ECO_SAVESEL           0x00008000
340 #define ECO_SELECTIONBAR      0x01000000
341 #define ECO_VERTICAL          0x00400000
342
343 /* Event notification masks */
344 #define ENM_NONE              0x00000000
345 #define ENM_CHANGE            0x00000001
346 #define ENM_UPDATE            0x00000002
347 #define ENM_SCROLL            0x00000004
348 #define ENM_KEYEVENTS         0x00010000
349 #define ENM_MOUSEEVENTS       0x00020000
350 #define ENM_REQUESTRESIZE     0x00040000
351 #define ENM_SELCHANGE         0x00080000
352 #define ENM_DROPFILES         0x00100000
353 #define ENM_PROTECTED         0x00200000
354 #define ENM_CORRECTTEXT       0x00400000
355 #define ENM_IMECHANGE         0x00800000
356 #define ENM_LINK              0x04000000
357
358 typedef struct _charrange
359 {
360     LONG    cpMin;
361     LONG    cpMax;
362 } CHARRANGE;
363
364 typedef struct _textrange
365 {
366     CHARRANGE chrg;
367     LPSTR     lpstrText;
368 } TEXTRANGEA;
369
370 typedef struct _textrangew
371 {
372     CHARRANGE chrg;
373     LPWSTR     lpstrText;
374 } TEXTRANGEW;
375
376 DECL_WINELIB_TYPE_AW(TEXTRANGE)
377
378 typedef struct _editstream
379 {
380     DWORD               dwCookie;
381     DWORD               dwError;
382     EDITSTREAMCALLBACK  pfnCallback;
383 } EDITSTREAM;
384
385 typedef struct _compcolor {
386     COLORREF   crText;
387     COLORREF   crBackground;
388     DWORD      dwEffects;
389 } COMPCOLOR;
390
391 typedef struct _encorrecttext {
392     NMHDR      nmhdr;
393     CHARRANGE  chrg;
394     WORD       seltyp;
395 } ENCORRECTTEXT;
396
397 typedef struct _endropfiles {
398     NMHDR      nmhdr;
399     HANDLE     hDrop;
400     LONG       cp;
401     BOOL       fProtected;
402 } ENDROPFILES;
403
404 typedef struct _enlink {
405     NMHDR      nmhdr;
406     UINT       msg;
407     WPARAM     wParam;
408     LPARAM     lParam;
409     CHARRANGE  chrg;
410 } ENLINK;
411
412 typedef struct {
413     NMHDR      nmhdr;
414     LONG       iob;
415     LONG       lOper;
416     HRESULT    hr;
417 } ENOLEOPFAILED;
418
419 typedef struct _enprotected {
420     NMHDR      nmhdr;
421     UINT       msg;
422     WPARAM     wParam;
423     LPARAM     lParam;
424     CHARRANGE  chrg;
425 } ENPROTECTED, *LPENPROTECTED;
426
427 typedef struct _ensaveclipboard {
428     NMHDR      nmhdr;
429     LONG       cObjectCount;
430     LONG       cch;
431 } ENSAVECLIPBOARD;
432
433 typedef struct _findtextA {
434     CHARRANGE  chrg;
435     LPSTR      lpstrText;
436 } FINDTEXTA;
437
438 typedef struct _findtextW {
439     CHARRANGE  chrg;
440     LPWSTR     lpstrText;
441 } FINDTEXTW;
442
443 DECL_WINELIB_TYPE_AW(FINDTEXT)
444
445 typedef struct _findtextexA {
446     CHARRANGE  chrg;
447     LPSTR      lpstrText;
448     CHARRANGE  chrgText;
449 } FINDTEXTEXA;
450
451 typedef struct _findtextexW {
452     CHARRANGE  chrg;
453     LPWSTR     lpstrText;
454     CHARRANGE  chrgText;
455 } FINDTEXTEXW;
456
457 DECL_WINELIB_TYPE_AW(FINDTEXTEX)
458
459 typedef struct _formatrange {
460     HDC        hdc;
461     HDC        hdcTarget;
462     RECT       rc;
463     RECT       rcPage;
464     CHARRANGE  chrg;
465 } FORMATRANGE;
466
467 typedef struct _msgfilter {
468     NMHDR      nmhdr;
469     UINT       msg;
470     WPARAM     wParam;
471     LPARAM     lParam;
472 } MSGFILTER;
473
474 typedef struct _paraformat {
475     UINT       cbSize;
476     DWORD      dwMask;
477     WORD       wNumbering;
478     WORD       wReserved;
479     LONG       dxStartIndent;
480     LONG       dxRightIndent;
481     LONG       dxOffset;
482     WORD       wAlignment;
483     SHORT      cTabCount;
484     LONG       rgxTabs[MAX_TAB_STOPS];
485 } PARAFORMAT;
486
487 typedef struct _selchange {
488     NMHDR      nmhdr;
489     CHARRANGE  chrg;
490     WORD       seltyp;
491 } SELCHANGE;
492
493 typedef struct _reqresize {
494     NMHDR      nmhdr;
495     RECT       rc;
496 } REQRESIZE;
497
498 typedef struct _repastespecial {
499     DWORD      dwAspect;
500     DWORD      dwParam;
501 } REPASTESPECIAL;
502
503 typedef struct _punctuation {
504     UINT       iSize;
505     LPSTR      szPunctuation;
506 } PUNCTUATION;
507
508 typedef struct _gettextex {
509     DWORD      cb;
510     DWORD      flags;
511     UINT       codepage;
512     LPCSTR     lpDefaultChar;
513     LPBOOL     lpUsedDefaultChar;
514 } GETTEXTEX;
515
516 #define SF_TEXT               0x00000001
517 #define SF_RTF                0x00000002
518 #define SF_RTFNOOBJS          0x00000003
519 #define SF_TEXTIZED           0x00000004
520 #define SF_UNICODE            0x00000010
521 #define SF_USECODEPAGE        0x00000020
522 #define SF_NCRFORNONASCII     0x00000040
523 #define SF_RTFVAL             0x00000700
524
525 /* Clipboard formats */
526 #define CF_RTF          TEXT("Rich Text Format")
527 #define CF_RTFNOOBJS    TEXT("Rich Text Format Without Objects")
528 #define CF_RETEXTOBJ    TEXT("RichEdit Text and Objects")
529
530
531 /* Parameters of the EM_SETIMEOPTIONS message */
532 #define IMF_FORCENONE         0x00000001
533 #define IMF_FORCEENABLE       0x00000002
534 #define IMF_FORCEDISABLE      0x00000004
535 #define IMF_CLOSESTATUSWINDOW 0x00000008
536 #define IMF_VERTICAL          0x00000020
537 #define IMF_FORCEACTIVE       0x00000040
538 #define IMF_FORCEINACTIVE     0x00000080
539 #define IMF_FORCEREMEMBER     0x00000100
540
541 /* return values of the EM_SELECTION_TYPE message */
542 #define SEL_EMPTY             0x00000000
543 #define SEL_TEXT              0x00000001
544 #define SEL_OBJECT            0x00000002
545 #define SEL_MULTICHAR         0x00000004
546 #define SEL_MULTIOBJECT       0x00000008
547
548 /* mask values in the PARAFORMAT2 structure */
549 #define PFM_STARTINDENT       0x00000001
550 #define PFM_RIGHTINDENT       0x00000002
551 #define PFM_OFFSET            0x00000004
552 #define PFM_ALIGNMENT         0x00000008
553 #define PFM_TABSTOPS          0x00000010
554 #define PFM_NUMBERING         0x00000020
555 #define PFM_OFFSETINDENT      0x80000000
556
557 /* numbering option */
558 #define PFN_BULLET            0x00000001
559
560 /* paragraph alignment */
561 #define PFA_LEFT              0x00000001
562 #define PFA_RIGHT             0x00000002
563 #define PFA_CENTER            0x00000003
564
565 /* streaming flags */
566 #define SFF_PWD               0x00000800
567 #define SFF_KEEPDOCINFO       0x00001000
568 #define SFF_PERSISTVIEWSCALE  0x00002000
569 #define SFF_PLAINRTF          0x00004000
570 #define SFF_SELECTION         0x00008000
571
572 typedef LONG (*EDITWORDBREAKPROCEX)(char*,LONG,BYTE,INT);
573
574 /* options of the EM_FINDWORDBREAK message */
575 #define WB_CLASSIFY           0x00000003
576 #define WB_MOVEWORDLEFT       0x00000004
577 #define WB_MOVEWORDPREV       0x00000004
578 #define WB_MOVEWORDRIGHT      0x00000005
579 #define WB_MOVEWORDNEXT       0x00000005
580 #define WB_LEFTBREAK          0x00000006
581 #define WB_PREVBREAK          0x00000006
582 #define WB_RIGHTBREAK         0x00000007
583 #define WB_NEXTBREAK          0x00000007
584
585 /* options of the EM_SETWORDWRAPMODE message */
586 #define WBF_WORDWRAP          0x00000010
587 #define WBF_WORDBREAK         0x00000020
588 #define WBF_OVERFLOW          0x00000040
589 #define WBF_LEVEL1            0x00000080
590 #define WBF_LEVEL2            0x00000100
591 #define WBF_CUSTOM            0x00000200
592
593 /* options of the EM_SETTEXTMODE message */
594 #define TM_PLAINTEXT          0x00000001
595 #define TM_RICHTEXT           0x00000002
596 #define TM_SINGLELEVELUNDO    0x00000004
597 #define TM_MULTILEVELUNDO     0x00000008
598 #define TM_SINGLECODEPAGE     0x00000010
599 #define TM_MULTICODEPAGE      0x00000020
600
601 /* GETTEXT structure flags */
602 #define GT_DEFAULT            0x00000000
603 #define GT_USECRLF            0x00000001
604
605 /* Options of the EM_SETTYPOGRAPHYOPTIONS message */
606 #define TO_ADVANCEDTYPOGRAPHY 0x00000001
607 #define TO_SIMPLELINEBREAK    0x00000002
608
609 typedef struct _gettextlengthex {
610     DWORD      flags;
611     UINT       codepage;
612 } GETTEXTLENGTHEX;
613
614 /* Flags of the GETTEXTLENGTHEX structure */
615 #define GTL_DEFAULT           0x00000000
616 #define GTL_USECRLF           0x00000001
617 #define GTL_PRECISE           0x00000002
618 #define GTL_CLOSE             0x00000004
619 #define GTL_NUMCHARS          0x00000008
620 #define GTL_NUMBYTES          0x00000010
621
622 #ifdef __cplusplus
623 }
624 #endif
625
626 #include "poppack.h"
627
628 #endif /* __WINE_RICHEDIT_H */