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