source: Daodan/MinGW/include/richedit.h@ 1054

Last change on this file since 1054 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 12.6 KB
Line 
1#ifndef _RICHEDIT_H
2#define _RICHEDIT_H
3#if __GNUC__ >= 3
4#pragma GCC system_header
5#endif
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10#pragma pack(push,4)
11
12#ifdef UNICODE
13#define RICHEDIT_CLASS L"RichEdit20W"
14#else
15#define RICHEDIT_CLASS "RichEdit20A"
16#endif
17#define RICHEDIT_CLASS10A "RICHEDIT"
18#define CF_RTF TEXT("Rich Text Format")
19#define CF_RTFNOOBJS TEXT("Rich Text Format Without Objects")
20#define CF_RETEXTOBJ TEXT("RichEdit Text and Objects")
21#define CFM_BOLD 1
22#define CFM_ITALIC 2
23#define CFM_UNDERLINE 4
24#define CFM_STRIKEOUT 8
25#define CFM_PROTECTED 16
26#define CFM_LINK 32
27#define CFM_SIZE 0x80000000
28#define CFM_COLOR 0x40000000
29#define CFM_FACE 0x20000000
30#define CFM_OFFSET 0x10000000
31#define CFM_CHARSET 0x08000000
32#define CFM_SUBSCRIPT 0x00030000
33#define CFM_SUPERSCRIPT 0x00030000
34#define CFM_EFFECTS (CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_COLOR | CFM_STRIKEOUT | CFE_PROTECTED | CFM_LINK)
35#define CFE_BOLD 1
36#define CFE_ITALIC 2
37#define CFE_UNDERLINE 4
38#define CFE_STRIKEOUT 8
39#define CFE_PROTECTED 16
40#define CFE_AUTOCOLOR 0x40000000
41#define CFE_SUBSCRIPT 0x00010000
42#define CFE_SUPERSCRIPT 0x00020000
43#define IMF_FORCENONE 1
44#define IMF_FORCEENABLE 2
45#define IMF_FORCEDISABLE 4
46#define IMF_CLOSESTATUSWINDOW 8
47#define IMF_VERTICAL 32
48#define IMF_FORCEACTIVE 64
49#define IMF_FORCEINACTIVE 128
50#define IMF_FORCEREMEMBER 256
51#define SEL_EMPTY 0
52#define SEL_TEXT 1
53#define SEL_OBJECT 2
54#define SEL_MULTICHAR 4
55#define SEL_MULTIOBJECT 8
56#define MAX_TAB_STOPS 32
57#define PFM_ALIGNMENT 8
58#define PFM_NUMBERING 32
59#define PFM_OFFSET 4
60#define PFM_OFFSETINDENT 0x80000000
61#define PFM_RIGHTINDENT 2
62#define PFM_STARTINDENT 1
63#define PFM_TABSTOPS 16
64#define PFM_BORDER 2048
65#define PFM_LINESPACING 256
66#define PFM_NUMBERINGSTART 32768
67#define PFM_NUMBERINGSTYLE 8192
68#define PFM_NUMBERINGTAB 16384
69#define PFM_SHADING 4096
70#define PFM_SPACEAFTER 128
71#define PFM_SPACEBEFORE 64
72#define PFM_STYLE 1024
73#define PFM_DONOTHYPHEN 4194304
74#define PFM_KEEP 131072
75#define PFM_KEEPNEXT 262144
76#define PFM_NOLINENUMBER 1048576
77#define PFM_NOWIDOWCONTROL 2097152
78#define PFM_PAGEBREAKBEFORE 524288
79#define PFM_RTLPARA 65536
80#define PFM_SIDEBYSIDE 8388608
81#define PFM_TABLE 1073741824
82#define PFN_BULLET 1
83#define PFE_DONOTHYPHEN 64
84#define PFE_KEEP 2
85#define PFE_KEEPNEXT 4
86#define PFE_NOLINENUMBER 16
87#define PFE_NOWIDOWCONTROL 32
88#define PFE_PAGEBREAKBEFORE 8
89#define PFE_RTLPARA 1
90#define PFE_SIDEBYSIDE 128
91#define PFE_TABLE 16384
92#define PFA_LEFT 1
93#define PFA_RIGHT 2
94#define PFA_CENTER 3
95#define PFA_JUSTIFY 4
96#define PFA_FULL_INTERWORD 4
97#define SF_TEXT 1
98#define SF_RTF 2
99#define SF_RTFNOOBJS 3
100#define SF_TEXTIZED 4
101#define SF_UNICODE 16
102#define SF_USECODEPAGE 32
103#define SF_NCRFORNONASCII 64
104#define SF_RTFVAL 0x0700
105#define SFF_PWD 0x0800
106#define SFF_KEEPDOCINFO 0x1000
107#define SFF_PERSISTVIEWSCALE 0x2000
108#define SFF_PLAINRTF 0x4000
109#define SFF_SELECTION 0x8000
110#define WB_CLASSIFY 3
111#define WB_MOVEWORDLEFT 4
112#define WB_MOVEWORDRIGHT 5
113#define WB_LEFTBREAK 6
114#define WB_RIGHTBREAK 7
115#define WB_MOVEWORDPREV 4
116#define WB_MOVEWORDNEXT 5
117#define WB_PREVBREAK 6
118#define WB_NEXTBREAK 7
119#define WBF_WORDWRAP 16
120#define WBF_WORDBREAK 32
121#define WBF_OVERFLOW 64
122#define WBF_LEVEL1 128
123#define WBF_LEVEL2 256
124#define WBF_CUSTOM 512
125#define ES_DISABLENOSCROLL 8192
126#define ES_EX_NOCALLOLEINIT 16777216
127#define ES_NOIME 524288
128#define ES_NOOLEDRAGDROP 8
129#define ES_SAVESEL 32768
130#define ES_SELECTIONBAR 16777216
131#define ES_SELFIME 262144
132#define ES_SUNKEN 16384
133#define ES_VERTICAL 4194304
134#define EM_CANPASTE (WM_USER+50)
135#define EM_DISPLAYBAND (WM_USER+51)
136#define EM_EXGETSEL (WM_USER+52)
137#define EM_EXLIMITTEXT (WM_USER+53)
138#define EM_EXLINEFROMCHAR (WM_USER+54)
139#define EM_EXSETSEL (WM_USER+55)
140#define EM_FINDTEXT (WM_USER+56)
141#define EM_FORMATRANGE (WM_USER+57)
142#define EM_GETCHARFORMAT (WM_USER+58)
143#define EM_GETEVENTMASK (WM_USER+59)
144#define EM_GETOLEINTERFACE (WM_USER+60)
145#define EM_GETPARAFORMAT (WM_USER+61)
146#define EM_GETSELTEXT (WM_USER+62)
147#define EM_HIDESELECTION (WM_USER+63)
148#define EM_PASTESPECIAL (WM_USER+64)
149#define EM_REQUESTRESIZE (WM_USER+65)
150#define EM_SELECTIONTYPE (WM_USER+66)
151#define EM_SETBKGNDCOLOR (WM_USER+67)
152#define EM_SETCHARFORMAT (WM_USER+68)
153#define EM_SETEVENTMASK (WM_USER+69)
154#define EM_SETOLECALLBACK (WM_USER+70)
155#define EM_SETPARAFORMAT (WM_USER+71)
156#define EM_SETTARGETDEVICE (WM_USER+72)
157#define EM_STREAMIN (WM_USER+73)
158#define EM_STREAMOUT (WM_USER+74)
159#define EM_GETTEXTRANGE (WM_USER+75)
160#define EM_FINDWORDBREAK (WM_USER+76)
161#define EM_SETOPTIONS (WM_USER+77)
162#define EM_GETOPTIONS (WM_USER+78)
163#define EM_FINDTEXTEX (WM_USER+79)
164#define EM_GETWORDBREAKPROCEX (WM_USER+80)
165#define EM_SETWORDBREAKPROCEX (WM_USER+81)
166/* RichEdit 2.0 messages */
167#define EM_SETUNDOLIMIT (WM_USER+82)
168#define EM_REDO (WM_USER+84)
169#define EM_CANREDO (WM_USER+85)
170#define EM_GETUNDONAME (WM_USER+86)
171#define EM_GETREDONAME (WM_USER+87)
172#define EM_STOPGROUPTYPING (WM_USER+88)
173#define EM_SETTEXTMODE (WM_USER+89)
174#define EM_GETTEXTMODE (WM_USER+90)
175#define EM_AUTOURLDETECT (WM_USER+91)
176#define EM_GETAUTOURLDETECT (WM_USER + 92)
177#define EM_SETPALETTE (WM_USER + 93)
178#define EM_GETTEXTEX (WM_USER+94)
179#define EM_GETTEXTLENGTHEX (WM_USER+95)
180#define EM_SHOWSCROLLBAR (WM_USER+96)
181#define EM_SETTEXTEX (WM_USER + 97)
182#define EM_SETPUNCTUATION (WM_USER + 100)
183#define EM_GETPUNCTUATION (WM_USER + 101)
184#define EM_SETWORDWRAPMODE (WM_USER + 102)
185#define EM_GETWORDWRAPMODE (WM_USER + 103)
186#define EM_SETIMECOLOR (WM_USER + 104)
187#define EM_GETIMECOLOR (WM_USER + 105)
188#define EM_SETIMEOPTIONS (WM_USER + 106)
189#define EM_GETIMEOPTIONS (WM_USER + 107)
190#define EM_SETLANGOPTIONS (WM_USER+120)
191#define EM_GETLANGOPTIONS (WM_USER+121)
192#define EM_GETIMECOMPMODE (WM_USER+122)
193#define EM_FINDTEXTW (WM_USER + 123)
194#define EM_FINDTEXTEXW (WM_USER + 124)
195#define EM_RECONVERSION (WM_USER + 125)
196#define EM_SETBIDIOPTIONS (WM_USER + 200)
197#define EM_GETBIDIOPTIONS (WM_USER + 201)
198#define EM_SETTYPOGRAPHYOPTIONS (WM_USER+202)
199#define EM_GETTYPOGRAPHYOPTIONS (WM_USER+203)
200#define EM_SETEDITSTYLE (WM_USER + 204)
201#define EM_GETEDITSTYLE (WM_USER + 205)
202#define EM_GETSCROLLPOS (WM_USER+221)
203#define EM_SETSCROLLPOS (WM_USER+222)
204#define EM_SETFONTSIZE (WM_USER+223)
205#define EM_GETZOOM (WM_USER+224)
206#define EM_SETZOOM (WM_USER+225)
207
208#define EN_CORRECTTEXT 1797
209#define EN_DROPFILES 1795
210#define EN_IMECHANGE 1799
211#define EN_LINK 1803
212#define EN_MSGFILTER 1792
213#define EN_OLEOPFAILED 1801
214#define EN_PROTECTED 1796
215#define EN_REQUESTRESIZE 1793
216#define EN_SAVECLIPBOARD 1800
217#define EN_SELCHANGE 1794
218#define EN_STOPNOUNDO 1798
219#define ENM_NONE 0
220#define ENM_CHANGE 1
221#define ENM_CORRECTTEXT 4194304
222#define ENM_DRAGDROPDONE 16
223#define ENM_DROPFILES 1048576
224#define ENM_IMECHANGE 8388608
225#define ENM_KEYEVENTS 65536
226#define ENM_LANGCHANGE 16777216
227#define ENM_LINK 67108864
228#define ENM_MOUSEEVENTS 131072
229#define ENM_OBJECTPOSITIONS 33554432
230#define ENM_PROTECTED 2097152
231#define ENM_REQUESTRESIZE 262144
232#define ENM_SCROLL 4
233#define ENM_SCROLLEVENTS 8
234#define ENM_SELCHANGE 524288
235#define ENM_UPDATE 2
236#define ECO_AUTOWORDSELECTION 1
237#define ECO_AUTOVSCROLL 64
238#define ECO_AUTOHSCROLL 128
239#define ECO_NOHIDESEL 256
240#define ECO_READONLY 2048
241#define ECO_WANTRETURN 4096
242#define ECO_SAVESEL 0x8000
243#define ECO_SELECTIONBAR 0x1000000
244#define ECO_VERTICAL 0x400000
245#define ECOOP_SET 1
246#define ECOOP_OR 2
247#define ECOOP_AND 3
248#define ECOOP_XOR 4
249#define SCF_DEFAULT 0
250#define SCF_SELECTION 1
251#define SCF_WORD 2
252#define SCF_ALL 4
253#define SCF_USEUIRULES 8
254#define TM_PLAINTEXT 1
255#define TM_RICHTEXT 2
256#define TM_SINGLELEVELUNDO 4
257#define TM_MULTILEVELUNDO 8
258#define TM_SINGLECODEPAGE 16
259#define TM_MULTICODEPAGE 32
260#define yHeightCharPtsMost 1638
261#define lDefaultTab 720
262
263typedef struct _charformat {
264 UINT cbSize;
265 DWORD dwMask;
266 DWORD dwEffects;
267 LONG yHeight;
268 LONG yOffset;
269 COLORREF crTextColor;
270 BYTE bCharSet;
271 BYTE bPitchAndFamily;
272 char szFaceName[LF_FACESIZE];
273} CHARFORMATA;
274typedef struct _charformatw {
275 UINT cbSize;
276 DWORD dwMask;
277 DWORD dwEffects;
278 LONG yHeight;
279 LONG yOffset;
280 COLORREF crTextColor;
281 BYTE bCharSet;
282 BYTE bPitchAndFamily;
283 WCHAR szFaceName[LF_FACESIZE];
284} CHARFORMATW;
285typedef struct _charformat2a {
286 UINT cbSize;
287 DWORD dwMask;
288 DWORD dwEffects;
289 LONG yHeight;
290 LONG yOffset;
291 COLORREF crTextColor;
292 BYTE bCharSet;
293 BYTE bPitchAndFamily;
294 char szFaceName[LF_FACESIZE];
295 WORD wWeight;
296 SHORT sSpacing;
297 COLORREF crBackColor;
298 LCID lcid;
299 DWORD dwReserved;
300 SHORT sStyle;
301 WORD wKerning;
302 BYTE bUnderlineType;
303 BYTE bAnimation;
304 BYTE bRevAuthor;
305} CHARFORMAT2A;
306typedef 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 wWeight;
317 SHORT sSpacing;
318 COLORREF crBackColor;
319 LCID lcid;
320 DWORD dwReserved;
321 SHORT sStyle;
322 WORD wKerning;
323 BYTE bUnderlineType;
324 BYTE bAnimation;
325 BYTE bRevAuthor;
326} CHARFORMAT2W;
327typedef struct _charrange {
328 LONG cpMin;
329 LONG cpMax;
330} CHARRANGE;
331typedef struct _compcolor {
332 COLORREF crText;
333 COLORREF crBackground;
334 DWORD dwEffects;
335} COMPCOLOR;
336typedef DWORD(CALLBACK *EDITSTREAMCALLBACK)(DWORD,PBYTE,LONG,LONG*);
337typedef struct _editstream {
338 DWORD dwCookie;
339 DWORD dwError;
340 EDITSTREAMCALLBACK pfnCallback;
341} EDITSTREAM;
342typedef struct _encorrecttext {
343 NMHDR nmhdr;
344 CHARRANGE chrg;
345 WORD seltyp;
346} ENCORRECTTEXT;
347typedef struct _endropfiles {
348 NMHDR nmhdr;
349 HANDLE hDrop;
350 LONG cp;
351 BOOL fProtected;
352} ENDROPFILES;
353typedef struct _enlink {
354 NMHDR nmhdr;
355 UINT msg;
356 WPARAM wParam;
357 LPARAM lParam;
358 CHARRANGE chrg;
359} ENLINK;
360typedef struct {
361 NMHDR nmhdr;
362 LONG iob;
363 LONG lOper;
364 HRESULT hr;
365} ENOLEOPFAILED;
366typedef struct _enprotected {
367 NMHDR nmhdr;
368 UINT msg;
369 WPARAM wParam;
370 LPARAM lParam;
371 CHARRANGE chrg;
372} ENPROTECTED,*LPENPROTECTED;
373typedef struct _ensaveclipboard {
374 NMHDR nmhdr;
375 LONG cObjectCount;
376 LONG cch;
377} ENSAVECLIPBOARD;
378typedef struct _findtextA {
379 CHARRANGE chrg;
380 LPSTR lpstrText;
381} FINDTEXTA;
382typedef struct _findtextW {
383 CHARRANGE chrg;
384 LPWSTR lpstrText;
385} FINDTEXTW;
386typedef struct _findtextexA {
387 CHARRANGE chrg;
388 LPSTR lpstrText;
389 CHARRANGE chrgText;
390} FINDTEXTEXA;
391typedef struct _findtextexW {
392 CHARRANGE chrg;
393 LPWSTR lpstrText;
394 CHARRANGE chrgText;
395} FINDTEXTEXW;
396typedef struct _formatrange {
397 HDC hdc;
398 HDC hdcTarget;
399 RECT rc;
400 RECT rcPage;
401 CHARRANGE chrg;
402} FORMATRANGE;
403typedef struct _msgfilter {
404 NMHDR nmhdr;
405 UINT msg;
406 WPARAM wParam;
407 LPARAM lParam;
408} MSGFILTER;
409typedef struct _paraformat {
410 UINT cbSize;
411 DWORD dwMask;
412 WORD wNumbering;
413 WORD wReserved;
414 LONG dxStartIndent;
415 LONG dxRightIndent;
416 LONG dxOffset;
417 WORD wAlignment;
418 SHORT cTabCount;
419 LONG rgxTabs[MAX_TAB_STOPS];
420} PARAFORMAT;
421typedef struct _paraformat2 {
422 UINT cbSize;
423 DWORD dwMask;
424 WORD wNumbering;
425 WORD wEffects;
426 LONG dxStartIndent;
427 LONG dxRightIndent;
428 LONG dxOffset;
429 WORD wAlignment;
430 SHORT cTabCount;
431 LONG rgxTabs[MAX_TAB_STOPS];
432 LONG dySpaceBefore;
433 LONG dySpaceAfter;
434 LONG dyLineSpacing;
435 SHORT sStype;
436 BYTE bLineSpacingRule;
437 BYTE bOutlineLevel;
438 WORD wShadingWeight;
439 WORD wShadingStyle;
440 WORD wNumberingStart;
441 WORD wNumberingStyle;
442 WORD wNumberingTab;
443 WORD wBorderSpace;
444 WORD wBorderWidth;
445 WORD wBorders;
446} PARAFORMAT2;
447typedef struct _selchange {
448 NMHDR nmhdr;
449 CHARRANGE chrg;
450 WORD seltyp;
451} SELCHANGE;
452typedef struct _textrange {
453 CHARRANGE chrg;
454 LPSTR lpstrText;
455} TEXTRANGEA;
456typedef struct _textrangew {
457 CHARRANGE chrg;
458 LPWSTR lpstrText;
459} TEXTRANGEW;
460typedef struct _reqresize {
461 NMHDR nmhdr;
462 RECT rc;
463} REQRESIZE;
464typedef struct _repastespecial {
465 DWORD dwAspect;
466 DWORD dwParam;
467} REPASTESPECIAL;
468typedef struct _punctuation {
469 UINT iSize;
470 LPSTR szPunctuation;
471} PUNCTUATION;
472typedef struct _gettextex {
473 DWORD cb;
474 DWORD flags;
475 UINT codepage;
476 LPCSTR lpDefaultChar;
477 LPBOOL lpUsedDefChar;
478} GETTEXTEX;
479/* GETTEXTEX flags */
480#define GT_DEFAULT 0
481#define GT_USECRLF 1
482#define GT_SELECTION 2
483typedef struct _settextex {
484 DWORD flags;
485 UINT codepage;
486} SETTEXTEX;
487/* SETTEXTEX flags */
488#define ST_DEFAULT 0
489#define ST_KEEPUNDO 1
490#define ST_SELECTION 2
491typedef LONG (*EDITWORDBREAKPROCEX)(char*,LONG,BYTE,INT);
492/* Defines for EM_SETTYPOGRAPHYOPTIONS */
493#define TO_ADVANCEDTYPOGRAPHY 1
494#define TO_SIMPLELINEBREAK 2
495/* Defines for GETTEXTLENGTHEX */
496#define GTL_DEFAULT 0
497#define GTL_USECRLF 1
498#define GTL_PRECISE 2
499#define GTL_CLOSE 4
500#define GTL_NUMCHARS 8
501#define GTL_NUMBYTES 16
502typedef struct _gettextlengthex {
503 DWORD flags;
504 UINT codepage;
505} GETTEXTLENGTHEX;
506#ifdef UNICODE
507typedef CHARFORMATW CHARFORMAT;
508typedef CHARFORMAT2W CHARFORMAT2;
509typedef FINDTEXTW FINDTEXT;
510typedef FINDTEXTEXW FINDTEXTEX;
511typedef TEXTRANGEW TEXTRANGE;
512#else
513typedef CHARFORMATA CHARFORMAT;
514typedef CHARFORMAT2A CHARFORMAT2;
515typedef FINDTEXTA FINDTEXT;
516typedef FINDTEXTEXA FINDTEXTEX;
517typedef TEXTRANGEA TEXTRANGE;
518#endif
519#pragma pack(pop)
520#ifdef __cplusplus
521}
522#endif
523#endif
Note: See TracBrowser for help on using the repository browser.