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