1/* 2 * Copyright 2006 Juan Lang 3 * 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. 8 * 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. 13 * 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 17 */ 18 19import "oaidl.idl"; 20import "ocidl.idl"; 21 22cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") 23cpp_quote("#undef FindText") 24cpp_quote("#endif") 25 26typedef enum tagTomConstants 27{ 28 tomFalse = 0, 29 tomTrue = -1, 30 tomUndefined = -9999999, 31 tomToggle = -9999998, 32 tomAutoColor = -9999997, 33 tomDefault = -9999996, 34 tomSuspend = -9999995, 35 tomResume = -9999994, 36 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, 47 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 138 /* ITextRange story type values */ 139 tomUnknownStory = 0, 140 tomMainTextStory = 1, 141 tomFootnotesStory = 2, 142 tomEndnotesStory = 3, 143 tomCommentsStory = 4, 144 tomTextFrameStory = 5, 145 tomEvenPagesHeaderStory = 6, 146 tomPrimaryHeaderStory = 7, 147 tomEvenPagesFooterStory = 8, 148 tomPrimaryFooterStory = 9, 149 tomFirstPageHeaderStory = 10, 150 tomFirstPageFooterStory = 11, 151 152 /* ITextFont animation property */ 153 tomNoAnimation = 0, 154 tomLasVegasLights = 1, 155 tomBlinkingBackground = 2, 156 tomSparkleText = 3, 157 tomMarchingBlackAnts = 4, 158 tomMarchingRedAnts = 5, 159 tomShimmer = 6, 160 tomWipeDown = 7, 161 tomWipeRight = 8, 162 tomAnimationMax = 8, 163 164 tomLowerCase = 0, 165 tomUpperCase = 1, 166 tomTitleCase = 2, 167 tomSentenceCase = 4, 168 tomToggleCase = 5, 169 tomReadOnly = 0x100, 170 tomShareDenyRead = 0x200, 171 tomShareDenyWrite = 0x400, 172 tomPasteFile = 0x1000, 173 tomCreateNew = 0x10, 174 tomCreateAlways = 0x20, 175 tomOpenExisting = 0x30, 176 tomOpenAlways = 0x40, 177 tomTruncateExisting = 0x50, 178 tomRTF = 0x1, 179 tomText = 0x2, 180 tomHTML = 0x3, 181 tomWordDocument = 0x4, 182 tomBold = 0x80000001, 183 tomItalic = 0x80000002, 184 tomUnderline = 0x80000004, 185 tomStrikeout = 0x80000008, 186 tomProtected = 0x80000010, 187 tomLink = 0x80000020, 188 tomSmallCaps = 0x80000040, 189 tomAllCaps = 0x80000080, 190 tomHidden = 0x80000100, 191 tomOutline = 0x80000200, 192 tomShadow = 0x80000400, 193 tomEmboss = 0x80000800, 194 tomImprint = 0x80001000, 195 tomDisabled = 0x80002000, 196 tomRevised = 0x80004000, 197 tomNormalCaret = 0, 198 tomKoreanBlockCaret = 0x1, 199 tomIncludeInset = 0x1, 200 tomIgnoreCurrentFont = 0, 201 tomMatchFontCharset = 0x1, 202 tomMatchFontSignature = 0x2, 203 tomCharset = 0x80000000, 204 tomRE10Mode = 0x1, 205 tomNoIME = 0x80000, 206 tomSelfIME = 0x40000 207} tomConstants; 208 209interface ITextRange; 210interface ITextSelection; 211interface ITextStoryRanges; 212 213[ 214 object, 215 uuid(8cc497c0-a1df-11ce-8098-00aa0047be5d) 216] 217interface ITextDocument : IDispatch 218{ 219 HRESULT GetName([retval, out]BSTR *pName); 220 HRESULT GetSelection([retval, out]ITextSelection **ppSel); 221 HRESULT GetStoryCount([retval, out]LONG *pCount); 222 HRESULT GetStoryRanges([retval, out]ITextStoryRanges **ppStories); 223 HRESULT GetSaved([retval, out]LONG *pValue); 224 HRESULT SetSaved([in]LONG Value); 225 HRESULT GetDefaultTabStop([retval, out]float *pValue); 226 HRESULT SetDefaultTabStop([in]float Value); 227 HRESULT New(); 228 HRESULT Open([in]VARIANT *pVar, [in]LONG Flags, [in]LONG CodePage); 229 HRESULT Save([in]VARIANT *pVar, [in]LONG Flags, [in]LONG CodePage); 230 HRESULT Freeze([retval, out]LONG *pCount); 231 HRESULT Unfreeze([retval, out]LONG *pCount); 232 HRESULT BeginEditCollection(); 233 HRESULT EndEditCollection(); 234 HRESULT Undo([in]LONG Count, [retval, out]LONG *prop); 235 HRESULT Redo([in]LONG Count, [retval, out]LONG *prop); 236 HRESULT Range([in]LONG cp1, [in]LONG cp2, [retval, out]ITextRange **ppRange); 237 HRESULT RangeFromPoint([in]LONG x, [in]LONG y, [retval, out]ITextRange **ppRange); 238} 239 240interface ITextFont; 241interface ITextPara; 242 243[ 244 object, 245 uuid(8cc497c2-a1df-11ce-8098-00aa0047be5d) 246] 247interface ITextRange : IDispatch 248{ 249 HRESULT GetText([retval, out]BSTR *pbstr); 250 HRESULT SetText([in]BSTR bstr); 251 HRESULT GetChar([retval, out]LONG *pch); 252 HRESULT SetChar([in]LONG ch); 253 HRESULT GetDuplicate([retval, out]ITextRange **ppRange); 254 HRESULT GetFormattedText([retval, out]ITextRange **ppRange); 255 HRESULT SetFormattedText([in]ITextRange *pRange); 256 HRESULT GetStart([retval, out]LONG *pcpFirst); 257 HRESULT SetStart([in]LONG cpFirst); 258 HRESULT GetEnd([retval, out]LONG *pcpLim); 259 HRESULT SetEnd([in]LONG cpLim); 260 HRESULT GetFont([retval, out]ITextFont **pFont); 261 HRESULT SetFont([in]ITextFont *pFont); 262 HRESULT GetPara([retval, out]ITextPara **ppPara); 263 HRESULT SetPara([in]ITextPara *pPara); 264 HRESULT GetStoryLength([retval, out]LONG *pcch); 265 HRESULT GetStoryType([retval, out]LONG *pValue); 266 HRESULT Collapse([in]LONG bStart); 267 HRESULT Expand([in]LONG Unit, [retval, out]LONG *pDelta); 268 HRESULT GetIndex([in]LONG Unit, [retval, out]LONG *pIndex); 269 HRESULT SetIndex([in]LONG Unit, [in]LONG Index, [in]LONG Extend); 270 HRESULT SetRange([in]LONG anchor, [in]LONG active); 271 HRESULT InRange([in]ITextRange *pRange, [retval, out]LONG *pb); 272 HRESULT InStory([in]ITextRange *pRange, [retval, out]LONG *pb); 273 HRESULT IsEqual([in]ITextRange *pRange, [retval, out]LONG *pb); 274 HRESULT Select(); 275 HRESULT StartOf([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta); 276 HRESULT EndOf([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta); 277 HRESULT Move([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta); 278 HRESULT MoveStart([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta); 279 HRESULT MoveEnd([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta); 280 HRESULT MoveWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta); 281 HRESULT MoveStartWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta); 282 HRESULT MoveEndWhile([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta); 283 HRESULT MoveUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta); 284 HRESULT MoveStartUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta); 285 HRESULT MoveEndUntil([in]VARIANT *Cset, [in]LONG Count, [retval, out]LONG *pDelta); 286 HRESULT FindText([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength); 287 HRESULT FindTextStart([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength); 288 HRESULT FindTextEnd([in]BSTR bstr, [in]LONG cch, [in]LONG Flags, [retval, out]LONG *pLength); 289 HRESULT Delete([in]LONG Unit, [in]LONG Count, [retval, out]LONG *pDelta); 290 HRESULT Cut([out]VARIANT *pVar); 291 HRESULT Copy([out]VARIANT *pVar); 292 HRESULT Paste([in]VARIANT *pVar, [in]LONG Format); 293 HRESULT CanPaste([in]VARIANT *pVar, [in]LONG Format, [retval, out]LONG *pb); 294 HRESULT CanEdit([retval, out]LONG *pb); 295 HRESULT ChangeCase([in]LONG Type); 296 HRESULT GetPoint([in]LONG Type, [out]LONG *cx, [out]LONG *cy); 297 HRESULT SetPoint([in]LONG x, [in]LONG y, [in]LONG Type, [in]LONG Extend); 298 HRESULT ScrollIntoView([in]LONG Value); 299 HRESULT GetEmbeddedObject([retval, out]IUnknown **ppv); 300} 301 302[ 303 object, 304 uuid(8cc497c1-a1df-11ce-8098-00aa0047be5d) 305] 306interface ITextSelection : ITextRange 307{ 308 HRESULT GetFlags([retval, out]LONG *pFlags); 309 HRESULT SetFlags([in]LONG Flags); 310 HRESULT GetType([retval, out]LONG *pType); 311 HRESULT MoveLeft([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta); 312 HRESULT MoveRight([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta); 313 HRESULT MoveUp([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta); 314 HRESULT MoveDown([in]LONG Unit, [in]LONG Count, [in]LONG Extend, [retval, out]LONG *pDelta); 315 HRESULT HomeKey([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta); 316 HRESULT EndKey([in]LONG Unit, [in]LONG Extend, [retval, out]LONG *pDelta); 317 HRESULT TypeText([in]BSTR bstr); 318} 319 320[ 321 object, 322 uuid(8cc497c3-a1df-11ce-8098-00aa0047be5d) 323] 324interface ITextFont : IDispatch 325{ 326 HRESULT GetDuplicate([retval, out]ITextFont **ppFont); 327 HRESULT SetDuplicate([in]ITextFont *pFont); 328 HRESULT CanChange([out]LONG *pB); 329 HRESULT IsEqual([in]ITextFont *pFont, [retval, out]LONG *pB); 330 HRESULT Reset([in]LONG Value); 331 HRESULT GetStyle([retval, out]LONG *pValue); 332 HRESULT SetStyle([in]LONG Value); 333 HRESULT GetAllCaps([retval, out]LONG *pValue); 334 HRESULT SetAllCaps([in]LONG Value); 335 HRESULT GetAnimation([retval, out]LONG *pValue); 336 HRESULT SetAnimation([in]LONG Value); 337 HRESULT GetBackColor([retval, out]LONG *pValue); 338 HRESULT SetBackColor([in]LONG Value); 339 HRESULT GetBold([retval, out]LONG *pValue); 340 HRESULT SetBold([in]LONG Value); 341 HRESULT GetEmboss([retval, out]LONG *pValue); 342 HRESULT SetEmboss([in]LONG Value); 343 HRESULT GetForeColor([retval, out]LONG *pValue); 344 HRESULT SetForeColor([in]LONG Value); 345 HRESULT GetHidden([retval, out]LONG *pValue); 346 HRESULT SetHidden([in]LONG Value); 347 HRESULT GetEngrave([retval, out]LONG *pValue); 348 HRESULT SetEngrave([in]LONG Value); 349 HRESULT GetItalic([retval, out]LONG *pValue); 350 HRESULT SetItalic([in]LONG Value); 351 HRESULT GetKerning([retval, out]float *pValue); 352 HRESULT SetKerning([in]float Value); 353 HRESULT GetLanguageID([retval, out]LONG *pValue); 354 HRESULT SetLanguageID([in]LONG Value); 355 HRESULT GetName([retval, out]BSTR *pValue); 356 HRESULT SetName([in]BSTR Value); 357 HRESULT GetOutline([retval, out]LONG *pValue); 358 HRESULT SetOutline([in]LONG Value); 359 HRESULT GetPosition([retval, out]float *pValue); 360 HRESULT SetPosition([in]float Value); 361 HRESULT GetProtected([retval, out]LONG *pValue); 362 HRESULT SetProtected([in]LONG Value); 363 HRESULT GetShadow([retval, out]LONG *pValue); 364 HRESULT SetShadow([in]LONG Value); 365 HRESULT GetSize([retval, out]float *pValue); 366 HRESULT SetSize([in]float Value); 367 HRESULT GetSmallCaps([retval, out]LONG *pValue); 368 HRESULT SetSmallCaps([in]LONG Value); 369 HRESULT GetSpacing([retval, out]float *pValue); 370 HRESULT SetSpacing([in]float Value); 371 HRESULT GetStrikeThrough([retval, out]LONG *pValue); 372 HRESULT SetStrikeThrough([in]LONG Value); 373 HRESULT GetSubscript([retval, out]LONG *pValue); 374 HRESULT SetSubscript([in]LONG Value); 375 HRESULT GetSuperscript([retval, out]LONG *pValue); 376 HRESULT SetSuperscript([in]LONG Value); 377 HRESULT GetUnderline([retval, out]LONG *pValue); 378 HRESULT SetUnderline([in]LONG Value); 379 HRESULT GetWeight([retval, out]LONG *pValue); 380 HRESULT SetWeight([in]LONG Value); 381} 382 383[ 384 object, 385 uuid(8cc497c4-a1df-11ce-8098-00aa0047be5d) 386] 387interface ITextPara : IDispatch 388{ 389 HRESULT GetDuplicate([retval, out]ITextPara **ppPara); 390 HRESULT SetDuplicate([in]ITextPara *pPara); 391 HRESULT CanChange([out]LONG *pB); 392 HRESULT IsEqual([in]ITextPara *pPara, [retval, out]LONG *pB); 393 HRESULT Reset([in]LONG Value); 394 HRESULT GetStyle([retval, out]LONG *pValue); 395 HRESULT SetStyle([in]LONG Value); 396 HRESULT GetAlignment([retval, out]LONG *pValue); 397 HRESULT SetAlignment([in]LONG Value); 398 HRESULT GetHyphenation([retval, out]LONG *pValue); 399 HRESULT SetHyphenation([in]LONG Value); 400 HRESULT GetFirstLineIndent([retval, out]float *pValue); 401 HRESULT GetKeepTogether([retval, out]LONG *pValue); 402 HRESULT SetKeepTogether([in]LONG Value); 403 HRESULT GetKeepWithNext([retval, out]LONG *pValue); 404 HRESULT SetKeepWithNext([in]LONG Value); 405 HRESULT GetLeftIndent([retval, out]float *pValue); 406 HRESULT GetLineSpacing([retval, out]float *pValue); 407 HRESULT GetLineSpacingRule([retval, out]LONG *pValue); 408 HRESULT GetListAlignment([retval, out]LONG *pValue); 409 HRESULT SetListAlignment([in]LONG Value); 410 HRESULT GetListLevelIndex([retval, out]LONG *pValue); 411 HRESULT SetListLevelIndex([in]LONG Value); 412 HRESULT GetListStart([retval, out]LONG *pValue); 413 HRESULT SetListStart([in]LONG Value); 414 HRESULT GetListTab([retval, out]float *pValue); 415 HRESULT SetListTab([in]float Value); 416 HRESULT GetListType([retval, out]LONG *pValue); 417 HRESULT SetListType([in]LONG Value); 418 HRESULT GetNoLineNumber([retval, out]LONG *pValue); 419 HRESULT SetNoLineNumber([in]LONG Value); 420 HRESULT GetPageBreakBefore([retval, out]LONG *pValue); 421 HRESULT SetPageBreakBefore([in]LONG Value); 422 HRESULT GetRightIndent([retval, out]float *pValue); 423 HRESULT SetRightIndent([in]float Value); 424 HRESULT SetIndents([in]float StartIndent, [in]float LeftIndent, [in]float RightIndent); 425 HRESULT SetLineSpacing([in]LONG LineSpacingRule, [in]float LineSpacing); 426 HRESULT GetSpaceAfter([retval, out]float *pValue); 427 HRESULT SetSpaceAfter([in]float Value); 428 HRESULT GetSpaceBefore([retval, out]float *pValue); 429 HRESULT SetSpaceBefore([in]float Value); 430 HRESULT GetWidowControl([retval, out]LONG *pValue); 431 HRESULT SetWidowControl([in]LONG Value); 432 HRESULT GetTabCount([retval, out]LONG *pCount); 433 HRESULT AddTab([in]float tbPos, [in]LONG tbAlign, [in]LONG tbLeader); 434 HRESULT ClearAllTabs(); 435 HRESULT DeleteTab([in]float tbPos); 436 HRESULT GetTab([in]LONG iTab, [out]float *ptbPos, [out]LONG *ptbAlign, [out]LONG *ptbLeader); 437} 438 439[ 440 object, 441 uuid(8cc497c5-a1df-11ce-8098-00aa0047be5d) 442] 443interface ITextStoryRanges : IDispatch 444{ 445 HRESULT _NewEnum([retval, out]IUnknown **ppUnkEnum); 446 HRESULT Item([in]LONG Index, [retval, out]ITextRange **ppRange); 447 HRESULT GetCount([retval, out]LONG *pCount); 448} 449