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