riched20: Implement Start/End properties for ranges.
[wine.git] / include / tom.idl
blob343906d7afc936a351ea33df128b3db6ed574ad6
1 /*
2 * Copyright 2006 Juan Lang
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "oaidl.idl";
20 import "ocidl.idl";
22 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
23 cpp_quote("#undef FindText")
24 cpp_quote("#endif")
26 typedef enum tagTomConstants
28 tomFalse = 0,
29 tomTrue = -1,
30 tomUndefined = -9999999,
31 tomToggle = -9999998,
32 tomAutoColor = -9999997,
33 tomDefault = -9999996,
34 tomSuspend = -9999995,
35 tomResume = -9999994,
37 /* ITextFont::Reset() modes */
38 tomApplyNow = 0,
39 tomApplyLater = 1,
40 tomTrackParms = 2,
41 tomCacheParms = 3,
42 tomApplyTmp = 4,
43 tomDisableSmartFont = 8,
44 tomEnableSmartFont = 9,
45 tomUsePoints = 10,
46 tomUseTwips = 11,
48 tomBackward = 0xc0000001,
49 tomForward = 0x3fffffff,
50 tomMove = 0,
51 tomExtend = 1,
52 tomNoSelection = 0,
53 tomSelectionIP = 1,
54 tomSelectionNormal = 2,
55 tomSelectionFrame = 3,
56 tomSelectionColumn = 4,
57 tomSelectionRow = 5,
58 tomSelectionBlock = 6,
59 tomSelectionInlineShape = 7,
60 tomSelectionShape = 8,
61 tomSelStartActive = 1,
62 tomSelAtEOL = 2,
63 tomSelOvertype = 4,
64 tomSelActive = 8,
65 tomSelReplace = 16,
66 tomEnd = 0,
67 tomStart = 32,
68 tomCollapseEnd = 0,
69 tomCollapseStart = 1,
70 tomClientCoord = 256,
71 tomNone = 0,
72 tomSingle = 1,
73 tomWords = 2,
74 tomDouble = 3,
75 tomDotted = 4,
76 tomDash = 5,
77 tomDashDot = 6,
78 tomDashDotDot = 7,
79 tomWave = 8,
80 tomThick = 9,
81 tomHair = 10,
82 tomLineSpaceSingle = 0,
83 tomLineSpace1pt5 = 1,
84 tomLineSpaceDouble = 2,
85 tomLineSpaceAtLeast = 3,
86 tomLineSpaceExactly = 4,
87 tomLineSpaceMultiple = 5,
88 tomAlignLeft = 0,
89 tomAlignCenter = 1,
90 tomAlignRight = 2,
91 tomAlignJustify = 3,
92 tomAlignDecimal = 3,
93 tomAlignBar = 4,
94 tomAlignInterWord = 3,
95 tomAlignInterLetter = 4,
96 tomAlignScaled = 5,
97 tomAlignGlyphs = 6,
98 tomAlignSnapGrid = 7,
99 tomSpaces = 0,
100 tomDots = 1,
101 tomDashes = 2,
102 tomLines = 3,
103 tomThickLines = 4,
104 tomEquals = 5,
105 tomTabBack = -3,
106 tomTabNext = -2,
107 tomTabHere = -1,
108 tomListBullet = 1,
109 tomListNumberAsArabic = 2,
110 tomListNumberAsLCLetter = 3,
111 tomListNumberAsUCLetter = 4,
112 tomListNumberAsLCRoman = 5,
113 tomListNumberAsUCRoman = 6,
114 tomListNumberAsSequence = 7,
115 tomListParentheses = 0x10000,
116 tomListPeriod = 0x20000,
117 tomListPlain = 0x30000,
118 tomCharacter = 1,
119 tomWord = 2,
120 tomSentence = 3,
121 tomParagraph = 4,
122 tomLine = 5,
123 tomStory = 6,
124 tomScreen = 7,
125 tomSection = 8,
126 tomColumn = 9,
127 tomRow = 10,
128 tomWindow = 11,
129 tomCell = 12,
130 tomCharFormat = 13,
131 tomParaFormat = 14,
132 tomTable = 15,
133 tomObject = 16,
134 tomMatchWord = 2,
135 tomMatchCase = 4,
136 tomMatchPattern = 8,
137 tomUnknownStory = 0,
138 tomMainTextStory = 1,
139 tomFootnotesStory = 2,
140 tomEndnotesStory = 3,
141 tomCommentsStory = 4,
142 tomTextFrameStory = 5,
143 tomEvenPagesHeaderStory = 6,
144 tomPrimaryHeaderStory = 7,
145 tomEvenPagesFooterStory = 8,
146 tomPrimaryFooterStory = 9,
147 tomFirstPageHeaderStory = 10,
148 tomFirstPageFooterStory = 11,
149 tomNoAnimation = 0,
150 tomLasVegasLights = 1,
151 tomBlinkingBackground = 2,
152 tomSparkleText = 3,
153 tomMarchingBlackAnts = 4,
154 tomMarchingRedAnts = 5,
155 tomShimmer = 6,
156 tomWipeDown = 7,
157 tomWipeRight = 8,
158 tomAnimationMax = 8,
159 tomLowerCase = 0,
160 tomUpperCase = 1,
161 tomTitleCase = 2,
162 tomSentenceCase = 4,
163 tomToggleCase = 5,
164 tomReadOnly = 0x100,
165 tomShareDenyRead = 0x200,
166 tomShareDenyWrite = 0x400,
167 tomPasteFile = 0x1000,
168 tomCreateNew = 0x10,
169 tomCreateAlways = 0x20,
170 tomOpenExisting = 0x30,
171 tomOpenAlways = 0x40,
172 tomTruncateExisting = 0x50,
173 tomRTF = 0x1,
174 tomText = 0x2,
175 tomHTML = 0x3,
176 tomWordDocument = 0x4,
177 tomBold = 0x80000001,
178 tomItalic = 0x80000002,
179 tomUnderline = 0x80000004,
180 tomStrikeout = 0x80000008,
181 tomProtected = 0x80000010,
182 tomLink = 0x80000020,
183 tomSmallCaps = 0x80000040,
184 tomAllCaps = 0x80000080,
185 tomHidden = 0x80000100,
186 tomOutline = 0x80000200,
187 tomShadow = 0x80000400,
188 tomEmboss = 0x80000800,
189 tomImprint = 0x80001000,
190 tomDisabled = 0x80002000,
191 tomRevised = 0x80004000,
192 tomNormalCaret = 0,
193 tomKoreanBlockCaret = 0x1,
194 tomIncludeInset = 0x1,
195 tomIgnoreCurrentFont = 0,
196 tomMatchFontCharset = 0x1,
197 tomMatchFontSignature = 0x2,
198 tomCharset = 0x80000000,
199 tomRE10Mode = 0x1,
200 tomNoIME = 0x80000,
201 tomSelfIME = 0x40000
202 } tomConstants;
204 interface ITextRange;
205 interface ITextSelection;
206 interface ITextStoryRanges;
209 object,
210 uuid(8cc497c0-a1df-11ce-8098-00aa0047be5d)
212 interface ITextDocument : IDispatch
214 HRESULT GetName([retval, out]BSTR *pName);
215 HRESULT GetSelection([retval, out]ITextSelection **ppSel);
216 HRESULT GetStoryCount([retval, out]LONG *pCount);
217 HRESULT GetStoryRanges([retval, out]ITextStoryRanges **ppStories);
218 HRESULT GetSaved([retval, out]LONG *pValue);
219 HRESULT SetSaved([in]LONG Value);
220 HRESULT GetDefaultTabStop([retval, out]float *pValue);
221 HRESULT SetDefaultTabStop([in]float Value);
222 HRESULT New();
223 HRESULT Open([in]VARIANT *pVar, [in]LONG Flags, [in]LONG CodePage);
224 HRESULT Save([in]VARIANT *pVar, [in]LONG Flags, [in]LONG CodePage);
225 HRESULT Freeze([retval, out]LONG *pCount);
226 HRESULT Unfreeze([retval, out]LONG *pCount);
227 HRESULT BeginEditCollection();
228 HRESULT EndEditCollection();
229 HRESULT Undo([in]LONG Count, [retval, out]LONG *prop);
230 HRESULT Redo([in]LONG Count, [retval, out]LONG *prop);
231 HRESULT Range([in]LONG cp1, [in]LONG cp2, [retval, out]ITextRange **ppRange);
232 HRESULT RangeFromPoint([in]LONG x, [in]LONG y, [retval, out]ITextRange **ppRange);
235 interface ITextFont;
236 interface ITextPara;
239 object,
240 uuid(8cc497c2-a1df-11ce-8098-00aa0047be5d)
242 interface ITextRange : IDispatch
244 HRESULT GetText([retval, out]BSTR *pbstr);
245 HRESULT SetText([in]BSTR bstr);
246 HRESULT GetChar([retval, out]LONG *pch);
247 HRESULT SetChar([in]LONG ch);
248 HRESULT GetDuplicate([retval, out]ITextRange **ppRange);
249 HRESULT GetFormattedText([retval, out]ITextRange **ppRange);
250 HRESULT SetFormattedText([in]ITextRange *pRange);
251 HRESULT GetStart([retval, out]LONG *pcpFirst);
252 HRESULT SetStart([in]LONG cpFirst);
253 HRESULT GetEnd([retval, out]LONG *pcpLim);
254 HRESULT SetEnd([in]LONG cpLim);
255 HRESULT GetFont([retval, out]ITextFont **pFont);
256 HRESULT SetFont([in]ITextFont *pFont);
257 HRESULT GetPara([retval, out]ITextPara **ppPara);
258 HRESULT SetPara([in]ITextPara *pPara);
259 HRESULT GetStoryLength([retval, out]LONG *pcch);
260 HRESULT GetStoryType([retval, out]LONG *pValue);
261 HRESULT Collapse([in]LONG bStart);
262 HRESULT Expand([in]LONG Unit, [retval, out]LONG *pDelta);
263 HRESULT GetIndex([in]LONG Unit, [retval, out]LONG *pIndex);
264 HRESULT SetIndex([in]LONG Unit, [in]LONG Index, [in]LONG Extend);
265 HRESULT SetRange([in]LONG cpActive, [in]LONG cpOther);
266 HRESULT InRange([in]ITextRange *pRange, [retval, out]LONG *pb);
267 HRESULT InStory([in]ITextRange *pRange, [retval, out]LONG *pb);
268 HRESULT IsEqual([in]ITextRange *pRange, [retval, out]LONG *pb);
269 HRESULT Select();
270 HRESULT StartOf([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
271 HRESULT EndOf([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
272 HRESULT Move([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
273 HRESULT MoveStart([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
274 HRESULT MoveEnd([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
275 HRESULT MoveWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
276 HRESULT MoveStartWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
277 HRESULT MoveEndWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
278 HRESULT MoveUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
279 HRESULT MoveStartUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
280 HRESULT MoveEndUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta);
281 HRESULT FindText([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength);
282 HRESULT FindTextStart([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength);
283 HRESULT FindTextEnd([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength);
284 HRESULT Delete([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta);
285 HRESULT Cut([out]VARIANT *pVar);
286 HRESULT Copy([out]VARIANT *pVar);
287 HRESULT Paste([in]VARIANT *pVar, [in]LONG Format);
288 HRESULT CanPaste([in]VARIANT *pVar, [in]LONG Format, [retval, out]LONG *pb);
289 HRESULT CanEdit([retval, out]LONG *pb);
290 HRESULT ChangeCase([in]LONG Type);
291 HRESULT GetPoint([in]LONG Type, [out]LONG *cx, [out]LONG *cy);
292 HRESULT SetPoint([in]LONG x, [in]LONG y, [in]LONG Type, [in]LONG Extend);
293 HRESULT ScrollIntoView([in]LONG Value);
294 HRESULT GetEmbeddedObject([retval, out]IUnknown **ppv);
298 object,
299 uuid(8cc497c1-a1df-11ce-8098-00aa0047be5d)
301 interface ITextSelection : ITextRange
303 HRESULT GetFlags([retval, out]LONG *pFlags);
304 HRESULT SetFlags([in]LONG Flags);
305 HRESULT GetType([retval, out]LONG *pType);
306 HRESULT MoveLeft([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
307 HRESULT MoveRight([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
308 HRESULT MoveUp([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
309 HRESULT MoveDown([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta);
310 HRESULT HomeKey([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
311 HRESULT EndKey([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta);
312 HRESULT TypeText([in]BSTR bstr);
316 object,
317 uuid(8cc497c3-a1df-11ce-8098-00aa0047be5d)
319 interface ITextFont : IDispatch
321 HRESULT GetDuplicate([retval, out]ITextFont **ppFont);
322 HRESULT SetDuplicate([in]ITextFont *pFont);
323 HRESULT CanChange([out]LONG *pB);
324 HRESULT IsEqual([in]ITextFont *pFont, [retval, out]LONG *pB);
325 HRESULT Reset([in]LONG Value);
326 HRESULT GetStyle([retval, out]LONG *pValue);
327 HRESULT SetStyle([in]LONG Value);
328 HRESULT GetAllCaps([retval, out]LONG *pValue);
329 HRESULT SetAllCaps([in]LONG Value);
330 HRESULT GetAnimation([retval, out]LONG *pValue);
331 HRESULT SetAnimation([in]LONG Value);
332 HRESULT GetBackColor([retval, out]LONG *pValue);
333 HRESULT SetBackColor([in]LONG Value);
334 HRESULT GetBold([retval, out]LONG *pValue);
335 HRESULT SetBold([in]LONG Value);
336 HRESULT GetEmboss([retval, out]LONG *pValue);
337 HRESULT SetEmboss([in]LONG Value);
338 HRESULT GetForeColor([retval, out]LONG *pValue);
339 HRESULT SetForeColor([in]LONG Value);
340 HRESULT GetHidden([retval, out]LONG *pValue);
341 HRESULT SetHidden([in]LONG Value);
342 HRESULT GetEngrave([retval, out]LONG *pValue);
343 HRESULT SetEngrave([in]LONG Value);
344 HRESULT GetItalic([retval, out]LONG *pValue);
345 HRESULT SetItalic([in]LONG Value);
346 HRESULT GetKerning([retval, out]float *pValue);
347 HRESULT SetKerning([in]float Value);
348 HRESULT GetLanguageID([retval, out]LONG *pValue);
349 HRESULT SetLanguageID([in]LONG Value);
350 HRESULT GetName([retval, out]BSTR *pValue);
351 HRESULT SetName([in]BSTR Value);
352 HRESULT GetOutline([retval, out]LONG *pValue);
353 HRESULT SetOutline([in]LONG Value);
354 HRESULT GetPosition([retval, out]float *pValue);
355 HRESULT SetPosition([in]float Value);
356 HRESULT GetProtected([retval, out]LONG *pValue);
357 HRESULT SetProtected([in]LONG Value);
358 HRESULT GetShadow([retval, out]LONG *pValue);
359 HRESULT SetShadow([in]LONG Value);
360 HRESULT GetSize([retval, out]float *pValue);
361 HRESULT SetSize([in]float Value);
362 HRESULT GetSmallCaps([retval, out]LONG *pValue);
363 HRESULT SetSmallCaps([in]LONG Value);
364 HRESULT GetSpacing([retval, out]float *pValue);
365 HRESULT SetSpacing([in]float Value);
366 HRESULT GetStrikeThrough([retval, out]LONG *pValue);
367 HRESULT SetStrikeThrough([in]LONG Value);
368 HRESULT GetSubscript([retval, out]LONG *pValue);
369 HRESULT SetSubscript([in]LONG Value);
370 HRESULT GetSuperscript([retval, out]LONG *pValue);
371 HRESULT SetSuperscript([in]LONG Value);
372 HRESULT GetUnderline([retval, out]LONG *pValue);
373 HRESULT SetUnderline([in]LONG Value);
374 HRESULT GetWeight([retval, out]LONG *pValue);
375 HRESULT SetWeight([in]LONG Value);
379 object,
380 uuid(8cc497c4-a1df-11ce-8098-00aa0047be5d)
382 interface ITextPara : IDispatch
384 HRESULT GetDuplicate([retval, out]ITextPara **ppPara);
385 HRESULT SetDuplicate([in]ITextPara *pPara);
386 HRESULT CanChange([out]LONG *pB);
387 HRESULT IsEqual([in]ITextPara *pPara, [retval, out]LONG *pB);
388 HRESULT Reset([in]LONG Value);
389 HRESULT GetStyle([retval, out]LONG *pValue);
390 HRESULT SetStyle([in]LONG Value);
391 HRESULT GetAlignment([retval, out]LONG *pValue);
392 HRESULT SetAlignment([in]LONG Value);
393 HRESULT GetHyphenation([retval, out]LONG *pValue);
394 HRESULT SetHyphenation([in]LONG Value);
395 HRESULT GetFirstLineIndent([retval, out]float *pValue);
396 HRESULT GetKeepTogether([retval, out]LONG *pValue);
397 HRESULT SetKeepTogether([in]LONG Value);
398 HRESULT GetKeepWithNext([retval, out]LONG *pValue);
399 HRESULT SetKeepWithNext([in]LONG Value);
400 HRESULT GetLeftIndent([retval, out]float *pValue);
401 HRESULT GetLineSpacing([retval, out]float *pValue);
402 HRESULT GetLineSpacingRule([retval, out]LONG *pValue);
403 HRESULT GetListAlignment([retval, out]LONG *pValue);
404 HRESULT SetListAlignment([in]LONG Value);
405 HRESULT GetListLevelIndex([retval, out]LONG *pValue);
406 HRESULT SetListLevelIndex([in]LONG Value);
407 HRESULT GetListStart([retval, out]LONG *pValue);
408 HRESULT SetListStart([in]LONG Value);
409 HRESULT GetListTab([retval, out]float *pValue);
410 HRESULT SetListTab([in]float Value);
411 HRESULT GetListType([retval, out]LONG *pValue);
412 HRESULT SetListType([in]LONG Value);
413 HRESULT GetNoLineNumber([retval, out]LONG *pValue);
414 HRESULT SetNoLineNumber([in]LONG Value);
415 HRESULT GetPageBreakBefore([retval, out]LONG *pValue);
416 HRESULT SetPageBreakBefore([in]LONG Value);
417 HRESULT GetRightIndent([retval, out]float *pValue);
418 HRESULT SetRightIndent([in]float Value);
419 HRESULT SetIndents([in]float StartIndent, [in]float LeftIndent, [in]float RightIndent);
420 HRESULT SetLineSpacing([in]LONG LineSpacingRule, [in]float LineSpacing);
421 HRESULT GetSpaceAfter([retval, out]float *pValue);
422 HRESULT SetSpaceAfter([in]float Value);
423 HRESULT GetSpaceBefore([retval, out]float *pValue);
424 HRESULT SetSpaceBefore([in]float Value);
425 HRESULT GetWidowControl([retval, out]LONG *pValue);
426 HRESULT SetWidowControl([in]LONG Value);
427 HRESULT GetTabCount([retval, out]LONG *pCount);
428 HRESULT AddTab([in]float tbPos, [in]LONG tbAlign, [in]LONG tbLeader);
429 HRESULT ClearAllTabs();
430 HRESULT DeleteTab([in]float tbPos);
431 HRESULT GetTab([in]LONG iTab, [out]float *ptbPos, [out]LONG *ptbAlign, [out]LONG *ptbLeader);
435 object,
436 uuid(8cc497c5-a1df-11ce-8098-00aa0047be5d)
438 interface ITextStoryRanges : IDispatch
440 HRESULT _NewEnum([retval, out]IUnknown **ppUnkEnum);
441 HRESULT Item([in]LONG Index, [retval, out]ITextRange **ppRange);
442 HRESULT GetCount([retval, out]LONG *pCount);