comparison fuhtark_test/include/winapi/richedit.h @ 1500:91c8c3b7cbf0

add: futhark tests for generating vulkan api
author sam <sam@basx.dev>
date Wed, 26 Nov 2025 21:36:48 +0700
parents
children
comparison
equal deleted inserted replaced
1499:1f58458b7ef7 1500:91c8c3b7cbf0
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #ifndef _RICHEDIT_
7 #define _RICHEDIT_
8
9 #include <pshpack4.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 #ifndef _RICHEDIT_VER
16 #define _RICHEDIT_VER 0x0300
17 #endif
18
19 #define cchTextLimitDefault 32767
20
21 #define MSFTEDIT_CLASS L"RICHEDIT50W"
22
23 #define CERICHEDIT_CLASSA "RichEditCEA"
24 #define CERICHEDIT_CLASSW L"RichEditCEW"
25
26 #define RICHEDIT_CLASSA "RichEdit20A"
27 #define RICHEDIT_CLASS10A "RICHEDIT"
28
29 #define RICHEDIT_CLASSW L"RichEdit20W"
30
31 #if (_RICHEDIT_VER >= 0x0200)
32 #ifdef UNICODE
33 #define RICHEDIT_CLASS RICHEDIT_CLASSW
34 #else
35 #define RICHEDIT_CLASS RICHEDIT_CLASSA
36 #endif
37 #else
38 #define RICHEDIT_CLASS RICHEDIT_CLASS10A
39 #endif
40
41 #ifndef WM_CONTEXTMENU
42 #define WM_CONTEXTMENU 0x007B
43 #endif
44
45 #ifndef WM_UNICHAR
46 #define WM_UNICHAR 0x0109
47 #endif
48
49 #ifndef WM_PRINTCLIENT
50 #define WM_PRINTCLIENT 0x0318
51 #endif
52
53 #ifndef EM_GETLIMITTEXT
54 #define EM_GETLIMITTEXT (WM_USER + 37)
55 #endif
56
57 #ifndef EM_POSFROMCHAR
58 #define EM_POSFROMCHAR (WM_USER + 38)
59 #define EM_CHARFROMPOS (WM_USER + 39)
60 #endif
61
62 #ifndef EM_SCROLLCARET
63 #define EM_SCROLLCARET (WM_USER + 49)
64 #endif
65 #define EM_CANPASTE (WM_USER + 50)
66 #define EM_DISPLAYBAND (WM_USER + 51)
67 #define EM_EXGETSEL (WM_USER + 52)
68 #define EM_EXLIMITTEXT (WM_USER + 53)
69 #define EM_EXLINEFROMCHAR (WM_USER + 54)
70 #define EM_EXSETSEL (WM_USER + 55)
71 #define EM_FINDTEXT (WM_USER + 56)
72 #define EM_FORMATRANGE (WM_USER + 57)
73 #define EM_GETCHARFORMAT (WM_USER + 58)
74 #define EM_GETEVENTMASK (WM_USER + 59)
75 #define EM_GETOLEINTERFACE (WM_USER + 60)
76 #define EM_GETPARAFORMAT (WM_USER + 61)
77 #define EM_GETSELTEXT (WM_USER + 62)
78 #define EM_HIDESELECTION (WM_USER + 63)
79 #define EM_PASTESPECIAL (WM_USER + 64)
80 #define EM_REQUESTRESIZE (WM_USER + 65)
81 #define EM_SELECTIONTYPE (WM_USER + 66)
82 #define EM_SETBKGNDCOLOR (WM_USER + 67)
83 #define EM_SETCHARFORMAT (WM_USER + 68)
84 #define EM_SETEVENTMASK (WM_USER + 69)
85 #define EM_SETOLECALLBACK (WM_USER + 70)
86 #define EM_SETPARAFORMAT (WM_USER + 71)
87 #define EM_SETTARGETDEVICE (WM_USER + 72)
88 #define EM_STREAMIN (WM_USER + 73)
89 #define EM_STREAMOUT (WM_USER + 74)
90 #define EM_GETTEXTRANGE (WM_USER + 75)
91 #define EM_FINDWORDBREAK (WM_USER + 76)
92 #define EM_SETOPTIONS (WM_USER + 77)
93 #define EM_GETOPTIONS (WM_USER + 78)
94 #define EM_FINDTEXTEX (WM_USER + 79)
95 #define EM_GETWORDBREAKPROCEX (WM_USER + 80)
96 #define EM_SETWORDBREAKPROCEX (WM_USER + 81)
97 #define EM_SETUNDOLIMIT (WM_USER + 82)
98 #define EM_REDO (WM_USER + 84)
99 #define EM_CANREDO (WM_USER + 85)
100 #define EM_GETUNDONAME (WM_USER + 86)
101 #define EM_GETREDONAME (WM_USER + 87)
102 #define EM_STOPGROUPTYPING (WM_USER + 88)
103
104 #define EM_SETTEXTMODE (WM_USER + 89)
105 #define EM_GETTEXTMODE (WM_USER + 90)
106
107 typedef enum tagTextMode {
108 TM_PLAINTEXT = 1,TM_RICHTEXT = 2,TM_SINGLELEVELUNDO = 4,TM_MULTILEVELUNDO = 8,TM_SINGLECODEPAGE = 16,TM_MULTICODEPAGE = 32
109 } TEXTMODE;
110
111 #define EM_AUTOURLDETECT (WM_USER + 91)
112 #define EM_GETAUTOURLDETECT (WM_USER + 92)
113 #define EM_SETPALETTE (WM_USER + 93)
114 #define EM_GETTEXTEX (WM_USER + 94)
115 #define EM_GETTEXTLENGTHEX (WM_USER + 95)
116 #define EM_SHOWSCROLLBAR (WM_USER + 96)
117 #define EM_SETTEXTEX (WM_USER + 97)
118
119 #define EM_SETPUNCTUATION (WM_USER + 100)
120 #define EM_GETPUNCTUATION (WM_USER + 101)
121 #define EM_SETWORDWRAPMODE (WM_USER + 102)
122 #define EM_GETWORDWRAPMODE (WM_USER + 103)
123 #define EM_SETIMECOLOR (WM_USER + 104)
124 #define EM_GETIMECOLOR (WM_USER + 105)
125 #define EM_SETIMEOPTIONS (WM_USER + 106)
126 #define EM_GETIMEOPTIONS (WM_USER + 107)
127 #define EM_CONVPOSITION (WM_USER + 108)
128
129 #define EM_SETLANGOPTIONS (WM_USER + 120)
130 #define EM_GETLANGOPTIONS (WM_USER + 121)
131 #define EM_GETIMECOMPMODE (WM_USER + 122)
132
133 #define EM_FINDTEXTW (WM_USER + 123)
134 #define EM_FINDTEXTEXW (WM_USER + 124)
135
136 #define EM_RECONVERSION (WM_USER + 125)
137 #define EM_SETIMEMODEBIAS (WM_USER + 126)
138 #define EM_GETIMEMODEBIAS (WM_USER + 127)
139
140 #define EM_SETBIDIOPTIONS (WM_USER + 200)
141 #define EM_GETBIDIOPTIONS (WM_USER + 201)
142
143 #define EM_SETTYPOGRAPHYOPTIONS (WM_USER + 202)
144 #define EM_GETTYPOGRAPHYOPTIONS (WM_USER + 203)
145
146 #define EM_SETEDITSTYLE (WM_USER + 204)
147 #define EM_GETEDITSTYLE (WM_USER + 205)
148
149 #define SES_EMULATESYSEDIT 1
150 #define SES_BEEPONMAXTEXT 2
151 #define SES_EXTENDBACKCOLOR 4
152 #define SES_MAPCPS 8
153 #define SES_EMULATE10 16
154 #define SES_USECRLF 32
155 #define SES_USEAIMM 64
156 #define SES_NOIME 128
157
158 #define SES_ALLOWBEEPS 256
159 #define SES_UPPERCASE 512
160 #define SES_LOWERCASE 1024
161 #define SES_NOINPUTSEQUENCECHK 2048
162 #define SES_BIDI 4096
163 #define SES_SCROLLONKILLFOCUS 8192
164 #define SES_XLTCRCRLFTOCR 16384
165 #define SES_DRAFTMODE 32768
166
167 #define SES_USECTF 0x0010000
168 #define SES_HIDEGRIDLINES 0x0020000
169 #define SES_USEATFONT 0x0040000
170 #define SES_CUSTOMLOOK 0x0080000
171 #define SES_LBSCROLLNOTIFY 0x0100000
172 #define SES_CTFALLOWEMBED 0x0200000
173 #define SES_CTFALLOWSMARTTAG 0x0400000
174 #define SES_CTFALLOWPROOFING 0x0800000
175
176 #define IMF_AUTOKEYBOARD 0x0001
177 #define IMF_AUTOFONT 0x0002
178 #define IMF_IMECANCELCOMPLETE 0x0004
179 #define IMF_IMEALWAYSSENDNOTIFY 0x0008
180 #define IMF_AUTOFONTSIZEADJUST 0x0010
181 #define IMF_UIFONTS 0x0020
182 #define IMF_DUALFONT 0x0080
183
184 #define ICM_NOTOPEN 0x0000
185 #define ICM_LEVEL3 0x0001
186 #define ICM_LEVEL2 0x0002
187 #define ICM_LEVEL2_5 0x0003
188 #define ICM_LEVEL2_SUI 0x0004
189 #define ICM_CTF 0x0005
190
191 #define TO_ADVANCEDTYPOGRAPHY 1
192 #define TO_SIMPLELINEBREAK 2
193 #define TO_DISABLECUSTOMTEXTOUT 4
194 #define TO_ADVANCEDLAYOUT 8
195
196 #define EM_OUTLINE (WM_USER + 220)
197
198 #define EM_GETSCROLLPOS (WM_USER + 221)
199 #define EM_SETSCROLLPOS (WM_USER + 222)
200
201 #define EM_SETFONTSIZE (WM_USER + 223)
202 #define EM_GETZOOM (WM_USER + 224)
203 #define EM_SETZOOM (WM_USER + 225)
204 #define EM_GETVIEWKIND (WM_USER + 226)
205 #define EM_SETVIEWKIND (WM_USER + 227)
206
207 #define EM_GETPAGE (WM_USER + 228)
208 #define EM_SETPAGE (WM_USER + 229)
209 #define EM_GETHYPHENATEINFO (WM_USER + 230)
210 #define EM_SETHYPHENATEINFO (WM_USER + 231)
211 #define EM_GETPAGEROTATE (WM_USER + 235)
212 #define EM_SETPAGEROTATE (WM_USER + 236)
213 #define EM_GETCTFMODEBIAS (WM_USER + 237)
214 #define EM_SETCTFMODEBIAS (WM_USER + 238)
215 #define EM_GETCTFOPENSTATUS (WM_USER + 240)
216 #define EM_SETCTFOPENSTATUS (WM_USER + 241)
217 #define EM_GETIMECOMPTEXT (WM_USER + 242)
218 #define EM_ISIME (WM_USER + 243)
219 #define EM_GETIMEPROPERTY (WM_USER + 244)
220
221 #define EM_GETQUERYRTFOBJ (WM_USER + 269)
222 #define EM_SETQUERYRTFOBJ (WM_USER + 270)
223
224 #define EPR_0 0
225 #define EPR_270 1
226 #define EPR_180 2
227 #define EPR_90 3
228
229 #define CTFMODEBIAS_DEFAULT 0x0000
230 #define CTFMODEBIAS_FILENAME 0x0001
231 #define CTFMODEBIAS_NAME 0x0002
232 #define CTFMODEBIAS_READING 0x0003
233 #define CTFMODEBIAS_DATETIME 0x0004
234 #define CTFMODEBIAS_CONVERSATION 0x0005
235 #define CTFMODEBIAS_NUMERIC 0x0006
236 #define CTFMODEBIAS_HIRAGANA 0x0007
237 #define CTFMODEBIAS_KATAKANA 0x0008
238 #define CTFMODEBIAS_HANGUL 0x0009
239 #define CTFMODEBIAS_HALFWIDTHKATAKANA 0x000A
240 #define CTFMODEBIAS_FULLWIDTHALPHANUMERIC 0x000B
241 #define CTFMODEBIAS_HALFWIDTHALPHANUMERIC 0x000C
242
243 #define IMF_SMODE_PLAURALCLAUSE 0x0001
244 #define IMF_SMODE_NONE 0x0002
245
246 typedef struct _imecomptext {
247 LONG cb;
248 DWORD flags;
249 } IMECOMPTEXT;
250
251 #define ICT_RESULTREADSTR 1
252
253 #define EMO_EXIT 0
254 #define EMO_ENTER 1
255 #define EMO_PROMOTE 2
256 #define EMO_EXPAND 3
257 #define EMO_MOVESELECTION 4
258 #define EMO_GETVIEWMODE 5
259
260 #define EMO_EXPANDSELECTION 0
261 #define EMO_EXPANDDOCUMENT 1
262
263 #define VM_NORMAL 4
264 #define VM_OUTLINE 2
265 #define VM_PAGE 9
266
267 #define EN_MSGFILTER 0x0700
268 #define EN_REQUESTRESIZE 0x0701
269 #define EN_SELCHANGE 0x0702
270 #define EN_DROPFILES 0x0703
271 #define EN_PROTECTED 0x0704
272 #define EN_CORRECTTEXT 0x0705
273 #define EN_STOPNOUNDO 0x0706
274 #define EN_IMECHANGE 0x0707
275 #define EN_SAVECLIPBOARD 0x0708
276 #define EN_OLEOPFAILED 0x0709
277 #define EN_OBJECTPOSITIONS 0x070a
278 #define EN_LINK 0x070b
279 #define EN_DRAGDROPDONE 0x070c
280 #define EN_PARAGRAPHEXPANDED 0x070d
281 #define EN_PAGECHANGE 0x070e
282 #define EN_LOWFIRTF 0x070f
283 #define EN_ALIGNLTR 0x0710
284 #define EN_ALIGNRTL 0x0711
285
286 #define ENM_NONE 0x00000000
287 #define ENM_CHANGE 0x00000001
288 #define ENM_UPDATE 0x00000002
289 #define ENM_SCROLL 0x00000004
290 #define ENM_SCROLLEVENTS 0x00000008
291 #define ENM_DRAGDROPDONE 0x00000010
292 #define ENM_PARAGRAPHEXPANDED 0x00000020
293 #define ENM_PAGECHANGE 0x00000040
294 #define ENM_KEYEVENTS 0x00010000
295 #define ENM_MOUSEEVENTS 0x00020000
296 #define ENM_REQUESTRESIZE 0x00040000
297 #define ENM_SELCHANGE 0x00080000
298 #define ENM_DROPFILES 0x00100000
299 #define ENM_PROTECTED 0x00200000
300 #define ENM_CORRECTTEXT 0x00400000
301 #define ENM_IMECHANGE 0x00800000
302 #define ENM_LANGCHANGE 0x01000000
303 #define ENM_OBJECTPOSITIONS 0x02000000
304 #define ENM_LINK 0x04000000
305 #define ENM_LOWFIRTF 0x08000000
306
307 #define ES_SAVESEL 0x00008000
308 #define ES_SUNKEN 0x00004000
309 #define ES_DISABLENOSCROLL 0x00002000
310 #define ES_SELECTIONBAR 0x01000000
311 #define ES_NOOLEDRAGDROP 0x00000008
312 #define ES_EX_NOCALLOLEINIT 0x00000000
313 #define ES_VERTICAL 0x00400000
314 #define ES_NOIME 0x00080000
315 #define ES_SELFIME 0x00040000
316
317 #define ECO_AUTOWORDSELECTION 0x00000001
318 #define ECO_AUTOVSCROLL 0x00000040
319 #define ECO_AUTOHSCROLL 0x00000080
320 #define ECO_NOHIDESEL 0x00000100
321 #define ECO_READONLY 0x00000800
322 #define ECO_WANTRETURN 0x00001000
323 #define ECO_SAVESEL 0x00008000
324 #define ECO_SELECTIONBAR 0x01000000
325 #define ECO_VERTICAL 0x00400000
326
327 #define ECOOP_SET 0x0001
328 #define ECOOP_OR 0x0002
329 #define ECOOP_AND 0x0003
330 #define ECOOP_XOR 0x0004
331
332 #define WB_CLASSIFY 3
333 #define WB_MOVEWORDLEFT 4
334 #define WB_MOVEWORDRIGHT 5
335 #define WB_LEFTBREAK 6
336 #define WB_RIGHTBREAK 7
337
338 #define WB_MOVEWORDPREV 4
339 #define WB_MOVEWORDNEXT 5
340 #define WB_PREVBREAK 6
341 #define WB_NEXTBREAK 7
342
343 #define PC_FOLLOWING 1
344 #define PC_LEADING 2
345 #define PC_OVERFLOW 3
346 #define PC_DELIMITER 4
347 #define WBF_WORDWRAP 0x010
348 #define WBF_WORDBREAK 0x020
349 #define WBF_OVERFLOW 0x040
350 #define WBF_LEVEL1 0x080
351 #define WBF_LEVEL2 0x100
352 #define WBF_CUSTOM 0x200
353
354 #define IMF_FORCENONE 0x0001
355 #define IMF_FORCEENABLE 0x0002
356 #define IMF_FORCEDISABLE 0x0004
357 #define IMF_CLOSESTATUSWINDOW 0x0008
358 #define IMF_VERTICAL 0x0020
359 #define IMF_FORCEACTIVE 0x0040
360 #define IMF_FORCEINACTIVE 0x0080
361 #define IMF_FORCEREMEMBER 0x0100
362 #define IMF_MULTIPLEEDIT 0x0400
363
364 #define WBF_CLASS ((BYTE) 0x0F)
365 #define WBF_ISWHITE ((BYTE) 0x10)
366 #define WBF_BREAKLINE ((BYTE) 0x20)
367 #define WBF_BREAKAFTER ((BYTE) 0x40)
368
369 typedef LONG (*EDITWORDBREAKPROCEX)(char *pchText,LONG cchText,BYTE bCharSet,INT action);
370
371 typedef struct _charformat {
372 UINT cbSize;
373 DWORD dwMask;
374 DWORD dwEffects;
375 LONG yHeight;
376 LONG yOffset;
377 COLORREF crTextColor;
378 BYTE bCharSet;
379 BYTE bPitchAndFamily;
380 char szFaceName[LF_FACESIZE];
381 } CHARFORMATA;
382
383 typedef struct _charformatw {
384 UINT cbSize;
385 DWORD dwMask;
386 DWORD dwEffects;
387 LONG yHeight;
388 LONG yOffset;
389 COLORREF crTextColor;
390 BYTE bCharSet;
391 BYTE bPitchAndFamily;
392 WCHAR szFaceName[LF_FACESIZE];
393 } CHARFORMATW;
394
395 #if (_RICHEDIT_VER >= 0x0200)
396 #ifdef UNICODE
397 #define CHARFORMAT CHARFORMATW
398 #else
399 #define CHARFORMAT CHARFORMATA
400 #endif
401 #else
402 #define CHARFORMAT CHARFORMATA
403 #endif
404
405 #ifdef __cplusplus
406
407 struct CHARFORMAT2W : _charformatw {
408 WORD wWeight;
409 SHORT sSpacing;
410 COLORREF crBackColor;
411 LCID lcid;
412 DWORD dwReserved;
413 SHORT sStyle;
414 WORD wKerning;
415 BYTE bUnderlineType;
416 BYTE bAnimation;
417 BYTE bRevAuthor;
418 };
419
420 struct CHARFORMAT2A : _charformat {
421 WORD wWeight;
422 SHORT sSpacing;
423 COLORREF crBackColor;
424 LCID lcid;
425 DWORD dwReserved;
426 SHORT sStyle;
427 WORD wKerning;
428 BYTE bUnderlineType;
429 BYTE bAnimation;
430 BYTE bRevAuthor;
431 };
432 #else
433
434 typedef struct _charformat2w {
435 UINT cbSize;
436 DWORD dwMask;
437 DWORD dwEffects;
438 LONG yHeight;
439 LONG yOffset;
440 COLORREF crTextColor;
441 BYTE bCharSet;
442 BYTE bPitchAndFamily;
443 WCHAR szFaceName[LF_FACESIZE];
444 WORD wWeight;
445 SHORT sSpacing;
446 COLORREF crBackColor;
447 LCID lcid;
448 DWORD dwReserved;
449 SHORT sStyle;
450 WORD wKerning;
451 BYTE bUnderlineType;
452 BYTE bAnimation;
453 BYTE bRevAuthor;
454 BYTE bReserved1;
455 } CHARFORMAT2W;
456
457 typedef struct _charformat2a {
458 UINT cbSize;
459 DWORD dwMask;
460 DWORD dwEffects;
461 LONG yHeight;
462 LONG yOffset;
463 COLORREF crTextColor;
464 BYTE bCharSet;
465 BYTE bPitchAndFamily;
466 char szFaceName[LF_FACESIZE];
467 WORD wWeight;
468 SHORT sSpacing;
469 COLORREF crBackColor;
470 LCID lcid;
471 DWORD dwReserved;
472 SHORT sStyle;
473 WORD wKerning;
474 BYTE bUnderlineType;
475 BYTE bAnimation;
476 BYTE bRevAuthor;
477 } CHARFORMAT2A;
478 #endif
479
480 #ifdef UNICODE
481 #define CHARFORMAT2 CHARFORMAT2W
482 #else
483 #define CHARFORMAT2 CHARFORMAT2A
484 #endif
485
486 #define CHARFORMATDELTA (sizeof(CHARFORMAT2) - sizeof(CHARFORMAT))
487
488 #define CFM_BOLD 0x00000001
489 #define CFM_ITALIC 0x00000002
490 #define CFM_UNDERLINE 0x00000004
491 #define CFM_STRIKEOUT 0x00000008
492 #define CFM_PROTECTED 0x00000010
493 #define CFM_LINK 0x00000020
494 #define CFM_SIZE 0x80000000
495 #define CFM_COLOR 0x40000000
496 #define CFM_FACE 0x20000000
497 #define CFM_OFFSET 0x10000000
498 #define CFM_CHARSET 0x08000000
499
500 #define CFE_BOLD 0x0001
501 #define CFE_ITALIC 0x0002
502 #define CFE_UNDERLINE 0x0004
503 #define CFE_STRIKEOUT 0x0008
504 #define CFE_PROTECTED 0x0010
505 #define CFE_LINK 0x0020
506 #define CFE_AUTOCOLOR 0x40000000
507
508 #define CFM_SMALLCAPS 0x0040
509 #define CFM_ALLCAPS 0x0080
510 #define CFM_HIDDEN 0x0100
511 #define CFM_OUTLINE 0x0200
512 #define CFM_SHADOW 0x0400
513 #define CFM_EMBOSS 0x0800
514 #define CFM_IMPRINT 0x1000
515 #define CFM_DISABLED 0x2000
516 #define CFM_REVISED 0x4000
517
518 #define CFM_BACKCOLOR 0x04000000
519 #define CFM_LCID 0x02000000
520 #define CFM_UNDERLINETYPE 0x00800000
521 #define CFM_WEIGHT 0x00400000
522 #define CFM_SPACING 0x00200000
523 #define CFM_KERNING 0x00100000
524 #define CFM_STYLE 0x00080000
525 #define CFM_ANIMATION 0x00040000
526 #define CFM_REVAUTHOR 0x00008000
527
528 #define CFE_SUBSCRIPT 0x00010000
529 #define CFE_SUPERSCRIPT 0x00020000
530
531 #define CFM_SUBSCRIPT CFE_SUBSCRIPT | CFE_SUPERSCRIPT
532 #define CFM_SUPERSCRIPT CFM_SUBSCRIPT
533
534 #define CFM_EFFECTS (CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_COLOR | CFM_STRIKEOUT | CFE_PROTECTED | CFM_LINK)
535 #define CFM_ALL (CFM_EFFECTS | CFM_SIZE | CFM_FACE | CFM_OFFSET | CFM_CHARSET)
536 #define CFM_EFFECTS2 (CFM_EFFECTS | CFM_DISABLED | CFM_SMALLCAPS | CFM_ALLCAPS | CFM_HIDDEN | CFM_OUTLINE | CFM_SHADOW | CFM_EMBOSS | CFM_IMPRINT | CFM_DISABLED | CFM_REVISED | CFM_SUBSCRIPT | CFM_SUPERSCRIPT | CFM_BACKCOLOR)
537 #define CFM_ALL2 (CFM_ALL | CFM_EFFECTS2 | CFM_BACKCOLOR | CFM_LCID | CFM_UNDERLINETYPE | CFM_WEIGHT | CFM_REVAUTHOR | CFM_SPACING | CFM_KERNING | CFM_STYLE | CFM_ANIMATION)
538
539 #define CFE_SMALLCAPS CFM_SMALLCAPS
540 #define CFE_ALLCAPS CFM_ALLCAPS
541 #define CFE_HIDDEN CFM_HIDDEN
542 #define CFE_OUTLINE CFM_OUTLINE
543 #define CFE_SHADOW CFM_SHADOW
544 #define CFE_EMBOSS CFM_EMBOSS
545 #define CFE_IMPRINT CFM_IMPRINT
546 #define CFE_DISABLED CFM_DISABLED
547 #define CFE_REVISED CFM_REVISED
548
549 #define CFE_AUTOBACKCOLOR CFM_BACKCOLOR
550
551 #define CFU_CF1UNDERLINE 0xFF
552 #define CFU_INVERT 0xFE
553 #define CFU_UNDERLINETHICKLONGDASH 18
554 #define CFU_UNDERLINETHICKDOTTED 17
555 #define CFU_UNDERLINETHICKDASHDOTDOT 16
556 #define CFU_UNDERLINETHICKDASHDOT 15
557 #define CFU_UNDERLINETHICKDASH 14
558 #define CFU_UNDERLINELONGDASH 13
559 #define CFU_UNDERLINEHEAVYWAVE 12
560 #define CFU_UNDERLINEDOUBLEWAVE 11
561 #define CFU_UNDERLINEHAIRLINE 10
562 #define CFU_UNDERLINETHICK 9
563 #define CFU_UNDERLINEWAVE 8
564 #define CFU_UNDERLINEDASHDOTDOT 7
565 #define CFU_UNDERLINEDASHDOT 6
566 #define CFU_UNDERLINEDASH 5
567 #define CFU_UNDERLINEDOTTED 4
568 #define CFU_UNDERLINEDOUBLE 3
569 #define CFU_UNDERLINEWORD 2
570 #define CFU_UNDERLINE 1
571 #define CFU_UNDERLINENONE 0
572
573 #define yHeightCharPtsMost 1638
574
575 #define SCF_SELECTION 0x0001
576 #define SCF_WORD 0x0002
577 #define SCF_DEFAULT 0x0000
578 #define SCF_ALL 0x0004
579 #define SCF_USEUIRULES 0x0008
580
581 #define SCF_ASSOCIATEFONT 0x0010
582
583 #define SCF_NOKBUPDATE 0x0020
584
585 #define SCF_ASSOCIATEFONT2 0x0040
586
587 typedef struct _charrange {
588 LONG cpMin;
589 LONG cpMax;
590 } CHARRANGE;
591
592 typedef struct _textrange {
593 CHARRANGE chrg;
594 LPSTR lpstrText;
595 } TEXTRANGEA;
596
597 typedef struct _textrangew {
598 CHARRANGE chrg;
599 LPWSTR lpstrText;
600 } TEXTRANGEW;
601
602 #if (_RICHEDIT_VER >= 0x0200)
603 #ifdef UNICODE
604 #define TEXTRANGE TEXTRANGEW
605 #else
606 #define TEXTRANGE TEXTRANGEA
607 #endif
608 #else
609 #define TEXTRANGE TEXTRANGEA
610 #endif
611
612 typedef DWORD (CALLBACK *EDITSTREAMCALLBACK)(DWORD_PTR dwCookie,LPBYTE pbBuff,LONG cb,LONG *pcb);
613
614 typedef struct _editstream {
615 DWORD_PTR dwCookie;
616 DWORD dwError;
617 EDITSTREAMCALLBACK pfnCallback;
618 } EDITSTREAM;
619
620 #define SF_TEXT 0x0001
621 #define SF_RTF 0x0002
622 #define SF_RTFNOOBJS 0x0003
623 #define SF_TEXTIZED 0x0004
624
625 #define SF_UNICODE 0x0010
626 #define SF_USECODEPAGE 0x0020
627 #define SF_NCRFORNONASCII 0x40
628 #define SFF_WRITEXTRAPAR 0x80
629
630 #define SFF_SELECTION 0x8000
631
632 #define SFF_PLAINRTF 0x4000
633
634 #define SFF_PERSISTVIEWSCALE 0x2000
635
636 #define SFF_KEEPDOCINFO 0x1000
637
638 #define SFF_PWD 0x0800
639
640 #define SF_RTFVAL 0x0700
641
642 typedef struct _findtext {
643 CHARRANGE chrg;
644 LPCSTR lpstrText;
645 } FINDTEXTA;
646
647 typedef struct _findtextw {
648 CHARRANGE chrg;
649 LPCWSTR lpstrText;
650 } FINDTEXTW;
651
652 #if (_RICHEDIT_VER >= 0x0200)
653 #ifdef UNICODE
654 #define FINDTEXT FINDTEXTW
655 #else
656 #define FINDTEXT FINDTEXTA
657 #endif
658 #else
659 #define FINDTEXT FINDTEXTA
660 #endif
661
662 typedef struct _findtextexa {
663 CHARRANGE chrg;
664 LPCSTR lpstrText;
665 CHARRANGE chrgText;
666 } FINDTEXTEXA;
667
668 typedef struct _findtextexw {
669 CHARRANGE chrg;
670 LPCWSTR lpstrText;
671 CHARRANGE chrgText;
672 } FINDTEXTEXW;
673
674 #if (_RICHEDIT_VER >= 0x0200)
675 #ifdef UNICODE
676 #define FINDTEXTEX FINDTEXTEXW
677 #else
678 #define FINDTEXTEX FINDTEXTEXA
679 #endif
680 #else
681 #define FINDTEXTEX FINDTEXTEXA
682 #endif
683
684 typedef struct _formatrange {
685 HDC hdc;
686 HDC hdcTarget;
687 RECT rc;
688 RECT rcPage;
689 CHARRANGE chrg;
690 } FORMATRANGE;
691
692 #define MAX_TAB_STOPS 32
693 #define lDefaultTab 720
694 #define MAX_TABLE_CELLS 63
695
696 #define wReserved wEffects
697
698 typedef struct _paraformat {
699 UINT cbSize;
700 DWORD dwMask;
701 WORD wNumbering;
702 WORD wEffects;
703 LONG dxStartIndent;
704 LONG dxRightIndent;
705 LONG dxOffset;
706 WORD wAlignment;
707 SHORT cTabCount;
708 LONG rgxTabs[MAX_TAB_STOPS];
709 } PARAFORMAT;
710
711 #ifdef __cplusplus
712 struct PARAFORMAT2 : _paraformat {
713 LONG dySpaceBefore;
714 LONG dySpaceAfter;
715 LONG dyLineSpacing;
716 SHORT sStyle;
717 BYTE bLineSpacingRule;
718 BYTE bOutlineLevel;
719 WORD wShadingWeight;
720 WORD wShadingStyle;
721 WORD wNumberingStart;
722 WORD wNumberingStyle;
723 WORD wNumberingTab;
724 WORD wBorderSpace;
725 WORD wBorderWidth;
726 WORD wBorders;
727 };
728 #else
729 typedef struct _paraformat2 {
730 UINT cbSize;
731 DWORD dwMask;
732 WORD wNumbering;
733 WORD wReserved;
734 LONG dxStartIndent;
735 LONG dxRightIndent;
736 LONG dxOffset;
737 WORD wAlignment;
738 SHORT cTabCount;
739 LONG rgxTabs[MAX_TAB_STOPS];
740 LONG dySpaceBefore;
741 LONG dySpaceAfter;
742 LONG dyLineSpacing;
743 SHORT sStyle;
744 BYTE bLineSpacingRule;
745 BYTE bOutlineLevel;
746 WORD wShadingWeight;
747 WORD wShadingStyle;
748 WORD wNumberingStart;
749 WORD wNumberingStyle;
750 WORD wNumberingTab;
751 WORD wBorderSpace;
752 WORD wBorderWidth;
753 WORD wBorders;
754 } PARAFORMAT2;
755 #endif
756
757 #define PFM_STARTINDENT 0x00000001
758 #define PFM_RIGHTINDENT 0x00000002
759 #define PFM_OFFSET 0x00000004
760 #define PFM_ALIGNMENT 0x00000008
761 #define PFM_TABSTOPS 0x00000010
762 #define PFM_NUMBERING 0x00000020
763 #define PFM_OFFSETINDENT 0x80000000
764
765 #define PFM_SPACEBEFORE 0x00000040
766 #define PFM_SPACEAFTER 0x00000080
767 #define PFM_LINESPACING 0x00000100
768 #define PFM_STYLE 0x00000400
769 #define PFM_BORDER 0x00000800
770 #define PFM_SHADING 0x00001000
771 #define PFM_NUMBERINGSTYLE 0x00002000
772 #define PFM_NUMBERINGTAB 0x00004000
773 #define PFM_NUMBERINGSTART 0x00008000
774
775 #define PFM_RTLPARA 0x00010000
776 #define PFM_KEEP 0x00020000
777 #define PFM_KEEPNEXT 0x00040000
778 #define PFM_PAGEBREAKBEFORE 0x00080000
779 #define PFM_NOLINENUMBER 0x00100000
780 #define PFM_NOWIDOWCONTROL 0x00200000
781 #define PFM_DONOTHYPHEN 0x00400000
782 #define PFM_SIDEBYSIDE 0x00800000
783 #define PFM_TABLE 0x40000000
784 #define PFM_TEXTWRAPPINGBREAK 0x20000000
785 #define PFM_TABLEROWDELIMITER 0x10000000
786
787 #define PFM_COLLAPSED 0x01000000
788 #define PFM_OUTLINELEVEL 0x02000000
789 #define PFM_BOX 0x04000000
790 #define PFM_RESERVED2 0x08000000
791
792 #define PFM_ALL (PFM_STARTINDENT | PFM_RIGHTINDENT | PFM_OFFSET | PFM_ALIGNMENT | PFM_TABSTOPS | PFM_NUMBERING | PFM_OFFSETINDENT| PFM_RTLPARA)
793 #define PFM_EFFECTS (PFM_RTLPARA | PFM_KEEP | PFM_KEEPNEXT | PFM_TABLE | PFM_PAGEBREAKBEFORE | PFM_NOLINENUMBER | PFM_NOWIDOWCONTROL | PFM_DONOTHYPHEN | PFM_SIDEBYSIDE | PFM_TABLE | PFM_TABLEROWDELIMITER)
794 #define PFM_ALL2 (PFM_ALL | PFM_EFFECTS | PFM_SPACEBEFORE | PFM_SPACEAFTER | PFM_LINESPACING | PFM_STYLE | PFM_SHADING | PFM_BORDER | PFM_NUMBERINGTAB | PFM_NUMBERINGSTART | PFM_NUMBERINGSTYLE)
795
796 #define PFE_RTLPARA (PFM_RTLPARA >> 16)
797 #define PFE_KEEP (PFM_KEEP >> 16)
798 #define PFE_KEEPNEXT (PFM_KEEPNEXT >> 16)
799 #define PFE_PAGEBREAKBEFORE (PFM_PAGEBREAKBEFORE >> 16)
800 #define PFE_NOLINENUMBER (PFM_NOLINENUMBER >> 16)
801 #define PFE_NOWIDOWCONTROL (PFM_NOWIDOWCONTROL >> 16)
802 #define PFE_DONOTHYPHEN (PFM_DONOTHYPHEN >> 16)
803 #define PFE_SIDEBYSIDE (PFM_SIDEBYSIDE >> 16)
804 #define PFE_TEXTWRAPPINGBREAK (PFM_TEXTWRAPPINGBREAK>>16)
805
806 #define PFE_COLLAPSED (PFM_COLLAPSED >> 16)
807 #define PFE_BOX (PFM_BOX >> 16)
808 #define PFE_TABLE (PFM_TABLE >> 16)
809 #define PFE_TABLEROWDELIMITER (PFM_TABLEROWDELIMITER>>16)
810
811 #define PFN_BULLET 1
812
813 #define PFN_ARABIC 2
814 #define PFN_LCLETTER 3
815 #define PFN_UCLETTER 4
816 #define PFN_LCROMAN 5
817 #define PFN_UCROMAN 6
818
819 #define PFNS_PAREN 0x000
820 #define PFNS_PARENS 0x100
821 #define PFNS_PERIOD 0x200
822 #define PFNS_PLAIN 0x300
823 #define PFNS_NONUMBER 0x400
824
825 #define PFNS_NEWNUMBER 0x8000
826
827 #define PFA_LEFT 1
828 #define PFA_RIGHT 2
829 #define PFA_CENTER 3
830
831 #define PFA_JUSTIFY 4
832 #define PFA_FULL_INTERWORD 4
833 #define PFA_FULL_INTERLETTER 5
834 #define PFA_FULL_SCALED 6
835 #define PFA_FULL_GLYPHS 7
836 #define PFA_SNAP_GRID 8
837
838 #ifndef WM_NOTIFY
839 #define WM_NOTIFY 0x004E
840
841 typedef struct _nmhdr {
842 HWND hwndFrom;
843 UINT idFrom;
844 UINT code;
845 } NMHDR;
846 #endif
847
848 typedef struct _msgfilter {
849 NMHDR nmhdr;
850 UINT msg;
851 WPARAM wParam;
852 LPARAM lParam;
853 } MSGFILTER;
854
855 typedef struct _reqresize {
856 NMHDR nmhdr;
857 RECT rc;
858 } REQRESIZE;
859
860 typedef struct _selchange {
861 NMHDR nmhdr;
862 CHARRANGE chrg;
863 WORD seltyp;
864 } SELCHANGE;
865
866 #define SEL_EMPTY 0x0000
867 #define SEL_TEXT 0x0001
868 #define SEL_OBJECT 0x0002
869 #define SEL_MULTICHAR 0x0004
870 #define SEL_MULTIOBJECT 0x0008
871
872 #define GCM_RIGHTMOUSEDROP 0x8000
873
874 typedef struct _endropfiles {
875 NMHDR nmhdr;
876 HANDLE hDrop;
877 LONG cp;
878 WINBOOL fProtected;
879 } ENDROPFILES;
880
881 typedef struct _enprotected {
882 NMHDR nmhdr;
883 UINT msg;
884 WPARAM wParam;
885 LPARAM lParam;
886 CHARRANGE chrg;
887 } ENPROTECTED;
888
889 typedef struct _ensaveclipboard {
890 NMHDR nmhdr;
891 LONG cObjectCount;
892 LONG cch;
893 } ENSAVECLIPBOARD;
894
895 typedef struct _enoleopfailed {
896 NMHDR nmhdr;
897 LONG iob;
898 LONG lOper;
899 HRESULT hr;
900 } ENOLEOPFAILED;
901
902 #define OLEOP_DOVERB 1
903
904 typedef struct _objectpositions {
905 NMHDR nmhdr;
906 LONG cObjectCount;
907 LONG *pcpPositions;
908 } OBJECTPOSITIONS;
909
910 typedef struct _enlink {
911 NMHDR nmhdr;
912 UINT msg;
913 WPARAM wParam;
914 LPARAM lParam;
915 CHARRANGE chrg;
916 } ENLINK;
917
918 typedef struct _enlowfirtf {
919 NMHDR nmhdr;
920 char *szControl;
921 } ENLOWFIRTF;
922
923 typedef struct _encorrecttext {
924 NMHDR nmhdr;
925 CHARRANGE chrg;
926 WORD seltyp;
927 } ENCORRECTTEXT;
928
929 typedef struct _punctuation {
930 UINT iSize;
931 LPSTR szPunctuation;
932 } PUNCTUATION;
933
934 typedef struct _compcolor {
935 COLORREF crText;
936 COLORREF crBackground;
937 DWORD dwEffects;
938 } COMPCOLOR;
939
940 #define CF_RTF TEXT("Rich Text Format")
941 #define CF_RTFNOOBJS TEXT("Rich Text Format Without Objects")
942 #define CF_RETEXTOBJ TEXT("RichEdit Text and Objects")
943
944 typedef struct _repastespecial {
945 DWORD dwAspect;
946 DWORD_PTR dwParam;
947 } REPASTESPECIAL;
948
949 typedef enum _undonameid {
950 UID_UNKNOWN = 0,UID_TYPING = 1,UID_DELETE = 2,UID_DRAGDROP = 3,UID_CUT = 4,UID_PASTE = 5,UID_AUTOCORRECT = 6
951 } UNDONAMEID;
952
953 #define ST_DEFAULT 0
954 #define ST_KEEPUNDO 1
955 #define ST_SELECTION 2
956 #define ST_NEWCHARS 4
957
958 typedef struct _settextex {
959 DWORD flags;
960 UINT codepage;
961 } SETTEXTEX;
962
963 #define GT_DEFAULT 0
964 #define GT_USECRLF 1
965 #define GT_SELECTION 2
966 #define GT_RAWTEXT 4
967 #define GT_NOHIDDENTEXT 8
968
969 typedef struct _gettextex {
970 DWORD cb;
971 DWORD flags;
972 UINT codepage;
973 LPCSTR lpDefaultChar;
974 LPBOOL lpUsedDefChar;
975 } GETTEXTEX;
976
977 #define GTL_DEFAULT 0
978 #define GTL_USECRLF 1
979 #define GTL_PRECISE 2
980 #define GTL_CLOSE 4
981 #define GTL_NUMCHARS 8
982 #define GTL_NUMBYTES 16
983
984 typedef struct _gettextlengthex {
985 DWORD flags;
986 UINT codepage;
987 } GETTEXTLENGTHEX;
988
989 typedef struct _bidioptions {
990 UINT cbSize;
991 WORD wMask;
992 WORD wEffects;
993 } BIDIOPTIONS;
994
995 #if (_RICHEDIT_VER==0x0100)
996 #define BOM_DEFPARADIR 0x0001
997 #define BOM_PLAINTEXT 0x0002
998 #endif
999 #define BOM_NEUTRALOVERRIDE 0x0004
1000 #define BOM_CONTEXTREADING 0x0008
1001 #define BOM_CONTEXTALIGNMENT 0x0010
1002
1003 #if (_RICHEDIT_VER==0x0100)
1004 #define BOE_RTLDIR 0x0001
1005 #define BOE_PLAINTEXT 0x0002
1006 #endif
1007 #define BOE_NEUTRALOVERRIDE 0x0004
1008 #define BOE_CONTEXTREADING 0x0008
1009 #define BOE_CONTEXTALIGNMENT 0x0010
1010
1011 #define FR_MATCHDIAC 0x20000000
1012 #define FR_MATCHKASHIDA 0x40000000
1013 #define FR_MATCHALEFHAMZA 0x80000000
1014
1015 #ifndef WCH_EMBEDDING
1016 #define WCH_EMBEDDING (WCHAR)0xFFFC
1017 #endif
1018
1019 typedef enum tagKHYPH {
1020 khyphNil,khyphNormal,khyphAddBefore,khyphChangeBefore,khyphDeleteBefore,khyphChangeAfter,khyphDelAndChange
1021 } KHYPH;
1022
1023 typedef struct hyphresult {
1024 KHYPH khyph;
1025 long ichHyph;
1026 WCHAR chHyph;
1027 } HYPHRESULT;
1028
1029 void WINAPI HyphenateProc(WCHAR *pszWord,LANGID langid,long ichExceed,HYPHRESULT *phyphresult);
1030
1031 typedef struct tagHyphenateInfo {
1032 SHORT cbSize;
1033 SHORT dxHyphenateZone;
1034 void (WINAPI *pfnHyphenate)(WCHAR*,LANGID,long,HYPHRESULT*);
1035 } HYPHENATEINFO;
1036
1037 #include <poppack.h>
1038
1039 #ifdef __cplusplus
1040 }
1041 #endif
1042 #endif