2 * Copyright (C) 2000 Jean-Claude Batista
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_RICHEDIT_H
20 #define __WINE_RICHEDIT_H
30 #define _RICHEDIT_VER 0x0210
31 #endif /* _RICHEDIT_VER */
33 #define cchTextLimitDefault 0x7fff
35 #define RICHEDIT_CLASS20A "RichEdit20A"
36 static const WCHAR RICHEDIT_CLASS20W
[] = { 'R','i','c','h','E','d','i','t','2','0','W', '\0' };
37 #define RICHEDIT_CLASS10A "RICHEDIT"
39 #if (_RICHEDIT_VER >= 0x0200 )
40 #define RICHEDIT_CLASS WINELIB_NAME_AW(RICHEDIT_CLASS20)
42 #define RICHEDIT_CLASS RICHEDIT_CLASS10A
45 #define EM_CANPASTE (WM_USER + 50)
46 #define EM_DISPLAYBAND (WM_USER + 51)
47 #define EM_EXGETSEL (WM_USER + 52)
48 #define EM_EXLIMITTEXT (WM_USER + 53)
49 #define EM_EXLINEFROMCHAR (WM_USER + 54)
50 #define EM_EXSETSEL (WM_USER + 55)
51 #define EM_FINDTEXT (WM_USER + 56)
52 #define EM_FORMATRANGE (WM_USER + 57)
53 #define EM_GETCHARFORMAT (WM_USER + 58)
54 #define EM_GETEVENTMASK (WM_USER + 59)
55 #define EM_GETOLEINTERFACE (WM_USER + 60)
56 #define EM_GETPARAFORMAT (WM_USER + 61)
57 #define EM_GETSELTEXT (WM_USER + 62)
58 #define EM_HIDESELECTION (WM_USER + 63)
59 #define EM_PASTESPECIAL (WM_USER + 64)
60 #define EM_REQUESTRESIZE (WM_USER + 65)
61 #define EM_SELECTIONTYPE (WM_USER + 66)
62 #define EM_SETBKGNDCOLOR (WM_USER + 67)
63 #define EM_SETCHARFORMAT (WM_USER + 68)
64 #define EM_SETEVENTMASK (WM_USER + 69)
65 #define EM_SETOLECALLBACK (WM_USER + 70)
66 #define EM_SETPARAFORMAT (WM_USER + 71)
67 #define EM_SETTARGETDEVICE (WM_USER + 72)
68 #define EM_STREAMIN (WM_USER + 73)
69 #define EM_STREAMOUT (WM_USER + 74)
70 #define EM_GETTEXTRANGE (WM_USER + 75)
71 #define EM_FINDWORDBREAK (WM_USER + 76)
72 #define EM_SETOPTIONS (WM_USER + 77)
73 #define EM_GETOPTIONS (WM_USER + 78)
74 #define EM_FINDTEXTEX (WM_USER + 79)
75 #define EM_GETWORDBREAKPROCEX (WM_USER + 80)
76 #define EM_SETWORDBREAKPROCEX (WM_USER + 81)
78 #define EM_SETUNDOLIMIT (WM_USER + 82)
79 #define EM_REDO (WM_USER + 84)
80 #define EM_CANREDO (WM_USER + 85)
81 #define EM_GETUNDONAME (WM_USER + 86)
82 #define EM_GETREDONAME (WM_USER + 87)
83 #define EM_STOPGROUPTYPING (WM_USER + 88)
85 #define EM_SETTEXTMODE (WM_USER + 89)
86 #define EM_GETTEXTMODE (WM_USER + 90)
87 #define EM_AUTOURLDETECT (WM_USER + 91)
88 #define EM_GETAUTOURLDETECT (WM_USER + 92)
89 #define EM_SETPALETTE (WM_USER + 93)
90 #define EM_GETTEXTEX (WM_USER + 94)
91 #define EM_GETTEXTLENGTHEX (WM_USER + 95)
92 #define EM_SHOWSCROLLBAR (WM_USER + 96)
93 #define EM_SETTEXTEX (WM_USER + 97)
95 #define EM_SETPUNCTUATION (WM_USER + 100)
96 #define EM_GETPUNCTUATION (WM_USER + 101)
97 #define EM_SETWORDWRAPMODE (WM_USER + 102)
98 #define EM_GETWORDWRAPMODE (WM_USER + 103)
99 #define EM_SETIMECOLOR (WM_USER + 104)
100 #define EM_GETIMECOLOR (WM_USER + 105)
101 #define EM_SETIMEOPTIONS (WM_USER + 106)
102 #define EM_GETIMEOPTIONS (WM_USER + 107)
103 #define EM_CONVPOSITION (WM_USER + 108)
105 #define EM_SETLANGOPTIONS (WM_USER + 120)
106 #define EM_GETLANGOPTIONS (WM_USER + 121)
107 #define EM_GETIMECOMPMODE (WM_USER + 122)
109 #define EM_SETLANGOPTIONS (WM_USER + 120)
110 #define EM_GETLANGOPTIONS (WM_USER + 121)
111 #define EM_GETIMECOMPMODE (WM_USER + 122)
113 #define EM_FINDTEXTW (WM_USER + 123)
114 #define EM_FINDTEXTEXW (WM_USER + 124)
116 #define EM_RECONVERSION (WM_USER + 125)
117 #define EM_SETIMEMODEBIAS (WM_USER + 126)
118 #define EM_GETIMEMODEBIAS (WM_USER + 127)
120 #define EM_SETBIDIOPTIONS (WM_USER + 200)
121 #define EM_GETBIDIOPTIONS (WM_USER + 201)
123 #define EM_SETTYPOGRAPHYOPTIONS (WM_USER + 202)
124 #define EM_GETTYPOGRAPHYOPTIONS (WM_USER + 203)
126 #define EM_SETEDITSTYLE (WM_USER + 204)
127 #define EM_GETEDITSTYLE (WM_USER + 205)
129 #define EM_OUTLINE (WM_USER + 220)
131 #define EM_GETSCROLLPOS (WM_USER + 221)
132 #define EM_SETSCROLLPOS (WM_USER + 222)
134 #define EM_SETFONTSIZE (WM_USER + 223)
135 #define EM_GETZOOM (WM_USER + 224)
136 #define EM_SETZOOM (WM_USER + 225)
138 /* New notifications */
139 #define EN_MSGFILTER 0x0700
140 #define EN_REQUESTRESIZE 0x0701
141 #define EN_SELCHANGE 0x0702
142 #define EN_DROPFILES 0x0703
143 #define EN_PROTECTED 0x0704
144 #define EN_CORRECTTEXT 0x0705
145 #define EN_STOPNOUNDO 0x0706
146 #define EN_IMECHANGE 0x0707
147 #define EN_SAVECLIPBOARD 0x0708
148 #define EN_OLEOPFAILED 0x0709
149 #define EN_OBJECTPOSITIONS 0x070a
150 #define EN_LINK 0x070b
151 #define EN_DRAGDROPDONE 0x070c
152 #define EN_PARAGRAPHEXPANDED 0x070d
153 #define EN_ALIGNLTR 0x0710
154 #define EN_ALIGNRTL 0x0711
157 typedef DWORD (CALLBACK
* EDITSTREAMCALLBACK
)( DWORD
, LPBYTE
, LONG
, LONG
* );
159 /* Rich edit control styles */
160 #define ES_SAVESEL 0x00008000
161 #define ES_SUNKEN 0x00004000
162 #define ES_DISABLENOSCROLL 0x00002000
163 #define ES_SELECTIONBAR 0x01000000
164 #define ES_VERTICAL 0x00400000
165 #define ES_NOIME 0x00080000
166 #define ES_SELFIME 0x00040000
168 /* CHARFORMAT structure */
169 typedef struct _charformat
176 COLORREF crTextColor
;
178 BYTE bPitchAndFamily
;
179 char szFaceName
[LF_FACESIZE
];
182 typedef struct _charformatw
189 COLORREF crTextColor
;
191 BYTE bPitchAndFamily
;
192 WCHAR szFaceName
[LF_FACESIZE
];
195 DECL_WINELIB_TYPE_AW(CHARFORMAT
)
197 /* CHARFORMAT masks */
198 #define CFM_BOLD 0x00000001
199 #define CFM_ITALIC 0x00000002
200 #define CFM_UNDERLINE 0x00000004
201 #define CFM_STRIKEOUT 0x00000008
202 #define CFM_PROTECTED 0x00000010
203 #define CFM_SIZE 0x80000000
204 #define CFM_COLOR 0x40000000
205 #define CFM_FACE 0x20000000
206 #define CFM_OFFSET 0x10000000
207 #define CFM_CHARSET 0x08000000
209 /* CHARFORMAT effects */
210 #define CFE_BOLD 0x00000001
211 #define CFE_ITALIC 0x00000002
212 #define CFE_UNDERLINE 0x00000004
213 #define CFE_STRIKEOUT 0x00000008
214 #define CFE_PROTECTED 0x00000010
215 #define CFE_AUTOCOLOR 0x40000000
218 #define ECOOP_SET 0x0001
219 #define ECOOP_OR 0x0002
220 #define ECOOP_AND 0x0003
221 #define ECOOP_XOR 0x0004
223 /* edit control options */
224 #define ECO_AUTOWORDSELECTION 0x00000001
225 #define ECO_AUTOVSCROLL 0x00000040
226 #define ECO_AUTOHSCROLL 0x00000080
227 #define ECO_NOHIDESEL 0x00000100
228 #define ECO_READONLY 0x00000800
229 #define ECO_WANTRETURN 0x00001000
230 #define ECO_SAVESEL 0x00008000
231 #define ECO_SELECTIONBAR 0x01000000
232 #define ECO_VERTICAL 0x00400000
234 /* Event notification masks */
235 #define ENM_NONE 0x00000000
236 #define ENM_CHANGE 0x00000001
237 #define ENM_UPDATE 0x00000002
238 #define ENM_SCROLL 0x00000004
239 #define ENM_KEYEVENTS 0x00010000
240 #define ENM_MOUSEEVENTS 0x00020000
241 #define ENM_REQUESTRESIZE 0x00040000
242 #define ENM_SELCHANGE 0x00080000
243 #define ENM_DROPFILES 0x00100000
244 #define ENM_PROTECTED 0x00200000
245 #define ENM_CORRECTTEXT 0x00400000
246 #define ENM_IMECHANGE 0x00800000
248 typedef struct _charrange
254 typedef struct _textrange
260 typedef struct _textrangew
266 DECL_WINELIB_TYPE_AW(TEXTRANGE
)
272 EDITSTREAMCALLBACK pfnCallback
;
275 #define SF_TEXT 0x0001
276 #define SF_RTF 0x0002
277 #define SF_RTFNOOBJS 0x0003
278 #define SF_TEXTIZED 0x0004
288 #endif /* __WINE_RICHEDIT_H */