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
22 cpp_quote
("#ifdef WINE_NO_UNICODE_MACROS")
23 cpp_quote
("#undef FindText")
26 typedef enum tagTomConstants
30 tomUndefined
= -9999999,
32 tomAutoColor
= -9999997,
33 tomDefault
= -9999996,
34 tomSuspend
= -9999995,
37 /* ITextFont::Reset() modes */
43 tomDisableSmartFont
= 8,
44 tomEnableSmartFont
= 9,
48 tomBackward
= 0xc0000001,
49 tomForward
= 0x3fffffff,
54 tomSelectionNormal
= 2,
55 tomSelectionFrame
= 3,
56 tomSelectionColumn
= 4,
58 tomSelectionBlock
= 6,
59 tomSelectionInlineShape
= 7,
60 tomSelectionShape
= 8,
61 tomSelStartActive
= 1,
82 tomLineSpaceSingle
= 0,
84 tomLineSpaceDouble
= 2,
85 tomLineSpaceAtLeast
= 3,
86 tomLineSpaceExactly
= 4,
87 tomLineSpaceMultiple
= 5,
94 tomAlignInterWord
= 3,
95 tomAlignInterLetter
= 4,
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,
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,
150 tomLasVegasLights
= 1,
151 tomBlinkingBackground
= 2,
153 tomMarchingBlackAnts
= 4,
154 tomMarchingRedAnts
= 5,
165 tomShareDenyRead
= 0x200,
166 tomShareDenyWrite
= 0x400,
167 tomPasteFile
= 0x1000,
169 tomCreateAlways
= 0x20,
170 tomOpenExisting
= 0x30,
171 tomOpenAlways
= 0x40,
172 tomTruncateExisting
= 0x50,
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,
193 tomKoreanBlockCaret
= 0x1,
194 tomIncludeInset
= 0x1,
195 tomIgnoreCurrentFont
= 0,
196 tomMatchFontCharset
= 0x1,
197 tomMatchFontSignature
= 0x2,
198 tomCharset
= 0x80000000,
204 interface ITextRange
;
205 interface ITextSelection
;
206 interface ITextStoryRanges
;
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
);
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
);
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
);
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
);
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);
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
);
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
);
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
);