1/* 2 * Copyright 2006 Juan Lang 3 * Copyright 2015 Nikolay Sivov for CodeWeavers 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 18 */ 19 20import "unknwn.idl"; 21import "objidl.idl"; 22import "oaidl.idl"; 23 24#pragma makedep regtypelib 25 26cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") 27cpp_quote("#undef FindText") 28cpp_quote("#endif") 29 30[ 31 uuid(8cc497c9-a1df-11ce-8098-00aa0047be5d), 32 version(1.0) 33] 34library tom 35{ 36 37importlib("stdole2.tlb"); 38 39typedef enum tagTomConstants 40{ 41 tomFalse = 0, 42 tomTrue = -1, 43 tomUndefined = -9999999, 44 tomToggle = -9999998, 45 tomAutoColor = -9999997, 46 tomDefault = -9999996, 47 tomSuspend = -9999995, 48 tomResume = -9999994, 49 50 /* ITextFont::Reset() modes */ 51 tomApplyNow = 0, 52 tomApplyLater = 1, 53 tomTrackParms = 2, 54 tomCacheParms = 3, 55 tomApplyTmp = 4, 56 tomDisableSmartFont = 8, 57 tomEnableSmartFont = 9, 58 tomUsePoints = 10, 59 tomUseTwips = 11, 60 61 tomBackward = 0xc0000001, 62 tomForward = 0x3fffffff, 63 tomMove = 0, 64 tomExtend = 1, 65 tomNoSelection = 0, 66 tomSelectionIP = 1, 67 tomSelectionNormal = 2, 68 tomSelectionFrame = 3, 69 tomSelectionColumn = 4, 70 tomSelectionRow = 5, 71 tomSelectionBlock = 6, 72 tomSelectionInlineShape = 7, 73 tomSelectionShape = 8, 74 tomSelStartActive = 1, 75 tomSelAtEOL = 2, 76 tomSelOvertype = 4, 77 tomSelActive = 8, 78 tomSelReplace = 16, 79 tomEnd = 0, 80 tomStart = 32, 81 tomCollapseEnd = 0, 82 tomCollapseStart = 1, 83 tomClientCoord = 256, 84 tomNone = 0, 85 tomSingle = 1, 86 tomWords = 2, 87 tomDouble = 3, 88 tomDotted = 4, 89 tomDash = 5, 90 tomDashDot = 6, 91 tomDashDotDot = 7, 92 tomWave = 8, 93 tomThick = 9, 94 tomHair = 10, 95 tomLineSpaceSingle = 0, 96 tomLineSpace1pt5 = 1, 97 tomLineSpaceDouble = 2, 98 tomLineSpaceAtLeast = 3, 99 tomLineSpaceExactly = 4, 100 tomLineSpaceMultiple = 5, 101 tomAlignLeft = 0, 102 tomAlignCenter = 1, 103 tomAlignRight = 2, 104 tomAlignJustify = 3, 105 tomAlignDecimal = 3, 106 tomAlignBar = 4, 107 tomAlignInterWord = 3, 108 tomAlignInterLetter = 4, 109 tomAlignScaled = 5, 110 tomAlignGlyphs = 6, 111 tomAlignSnapGrid = 7, 112 tomSpaces = 0, 113 tomDots = 1, 114 tomDashes = 2, 115 tomLines = 3, 116 tomThickLines = 4, 117 tomEquals = 5, 118 tomTabBack = -3, 119 tomTabNext = -2, 120 tomTabHere = -1, 121 tomListBullet = 1, 122 tomListNumberAsArabic = 2, 123 tomListNumberAsLCLetter = 3, 124 tomListNumberAsUCLetter = 4, 125 tomListNumberAsLCRoman = 5, 126 tomListNumberAsUCRoman = 6, 127 tomListNumberAsSequence = 7, 128 tomListParentheses = 0x10000, 129 tomListPeriod = 0x20000, 130 tomListPlain = 0x30000, 131 tomCharacter = 1, 132 tomWord = 2, 133 tomSentence = 3, 134 tomParagraph = 4, 135 tomLine = 5, 136 tomStory = 6, 137 tomScreen = 7, 138 tomSection = 8, 139 tomColumn = 9, 140 tomRow = 10, 141 tomWindow = 11, 142 tomCell = 12, 143 tomCharFormat = 13, 144 tomParaFormat = 14, 145 tomTable = 15, 146 tomObject = 16, 147 tomMatchWord = 2, 148 tomMatchCase = 4, 149 tomMatchPattern = 8, 150 151 /* ITextRange story type values */ 152 tomUnknownStory = 0, 153 tomMainTextStory = 1, 154 tomFootnotesStory = 2, 155 tomEndnotesStory = 3, 156 tomCommentsStory = 4, 157 tomTextFrameStory = 5, 158 tomEvenPagesHeaderStory = 6, 159 tomPrimaryHeaderStory = 7, 160 tomEvenPagesFooterStory = 8, 161 tomPrimaryFooterStory = 9, 162 tomFirstPageHeaderStory = 10, 163 tomFirstPageFooterStory = 11, 164 165 /* ITextFont animation property */ 166 tomNoAnimation = 0, 167 tomLasVegasLights = 1, 168 tomBlinkingBackground = 2, 169 tomSparkleText = 3, 170 tomMarchingBlackAnts = 4, 171 tomMarchingRedAnts = 5, 172 tomShimmer = 6, 173 tomWipeDown = 7, 174 tomWipeRight = 8, 175 tomAnimationMax = 8, 176 177 tomLowerCase = 0, 178 tomUpperCase = 1, 179 tomTitleCase = 2, 180 tomSentenceCase = 4, 181 tomToggleCase = 5, 182 tomReadOnly = 0x100, 183 tomShareDenyRead = 0x200, 184 tomShareDenyWrite = 0x400, 185 tomPasteFile = 0x1000, 186 tomCreateNew = 0x10, 187 tomCreateAlways = 0x20, 188 tomOpenExisting = 0x30, 189 tomOpenAlways = 0x40, 190 tomTruncateExisting = 0x50, 191 tomRTF = 0x1, 192 tomText = 0x2, 193 tomHTML = 0x3, 194 tomWordDocument = 0x4, 195 tomBold = 0x80000001, 196 tomItalic = 0x80000002, 197 tomUnderline = 0x80000004, 198 tomStrikeout = 0x80000008, 199 tomProtected = 0x80000010, 200 tomLink = 0x80000020, 201 tomSmallCaps = 0x80000040, 202 tomAllCaps = 0x80000080, 203 tomHidden = 0x80000100, 204 tomOutline = 0x80000200, 205 tomShadow = 0x80000400, 206 tomEmboss = 0x80000800, 207 tomImprint = 0x80001000, 208 tomDisabled = 0x80002000, 209 tomRevised = 0x80004000, 210 tomNormalCaret = 0, 211 tomKoreanBlockCaret = 0x1, 212 tomIncludeInset = 0x1, 213 tomIgnoreCurrentFont = 0, 214 tomMatchFontCharset = 0x1, 215 tomMatchFontSignature = 0x2, 216 tomCharset = 0x80000000, 217 tomRE10Mode = 0x1, 218 tomNoIME = 0x80000, 219 tomSelfIME = 0x40000 220} tomConstants; 221 222interface ITextRange; 223interface ITextSelection; 224interface ITextStoryRanges; 225 226[ 227 uuid(8cc497c0-a1df-11ce-8098-00aa0047be5d), 228 object, 229 dual, 230 oleautomation 231] 232interface ITextDocument : IDispatch 233{ 234 [propget, id(DISPID_VALUE)] 235 HRESULT Name([retval, out] BSTR *name); 236 237 [propget] 238 HRESULT Selection([retval, out] ITextSelection **selection); 239 240 [propget] 241 HRESULT StoryCount([retval, out] LONG *count); 242 243 [propget] 244 HRESULT StoryRanges([retval, out] ITextStoryRanges **ranges); 245 246 [propget] 247 HRESULT Saved([retval, out] LONG *value); 248 249 [propput] 250 HRESULT Saved([in] LONG value); 251 252 [propget] 253 HRESULT DefaultTabStop([retval, out] float *value); 254 255 [propput] 256 HRESULT DefaultTabStop([in] float value); 257 258 HRESULT New(); 259 260 HRESULT Open([in] VARIANT *var, [in] LONG flags, [in] LONG codepage); 261 262 HRESULT Save([in] VARIANT *var, [in] LONG flags, [in] LONG codepage); 263 264 HRESULT Freeze([retval, out] LONG *count); 265 HRESULT Unfreeze([retval, out] LONG *count); 266 HRESULT BeginEditCollection(); 267 HRESULT EndEditCollection(); 268 HRESULT Undo([in] LONG count, [retval, out] LONG *prop); 269 HRESULT Redo([in] LONG count, [retval, out] LONG *prop); 270 HRESULT Range([in] LONG start, [in] LONG end, [retval, out] ITextRange **range); 271 HRESULT RangeFromPoint([in] LONG x, [in] LONG y, [retval, out] ITextRange **range); 272} 273 274interface ITextFont; 275interface ITextPara; 276 277[ 278 uuid(8cc497c2-a1df-11ce-8098-00aa0047be5d), 279 object, 280 dual, 281 oleautomation 282] 283interface ITextRange : IDispatch 284{ 285 [propget, id(DISPID_VALUE)] 286 HRESULT Text([retval, out] BSTR *text); 287 288 [propput, id(DISPID_VALUE)] 289 HRESULT Text([in] BSTR text); 290 291 [propget] 292 HRESULT Char([retval, out] LONG *ch); 293 294 [propput] 295 HRESULT Char([in] LONG ch); 296 297 [propget] 298 HRESULT Duplicate([retval, out] ITextRange **range); 299 300 [propget] 301 HRESULT FormattedText([retval, out] ITextRange **range); 302 303 [propput] 304 HRESULT FormattedText([in] ITextRange *range); 305 306 [propget] 307 HRESULT Start([retval, out] LONG *start); 308 309 [propput] 310 HRESULT Start([in] LONG start); 311 312 [propget] 313 HRESULT End([retval, out] LONG *end); 314 315 [propput] 316 HRESULT End([in] LONG end); 317 318 [propget] 319 HRESULT Font([retval, out] ITextFont **font); 320 321 [propput] 322 HRESULT Font([in] ITextFont *font); 323 324 [propget] 325 HRESULT Para([retval, out] ITextPara **para); 326 327 [propput] 328 HRESULT Para([in] ITextPara *para); 329 330 [propget] 331 HRESULT StoryLength([retval, out] LONG *len); 332 333 [propget] 334 HRESULT StoryType([retval, out] LONG *value); 335 336 HRESULT Collapse([in] LONG start); 337 HRESULT Expand([in] LONG unit, [retval, out] LONG *delta); 338 HRESULT GetIndex([in] LONG unit, [retval, out] LONG *index); 339 HRESULT SetIndex([in] LONG unit, [in] LONG index, [in] LONG extend); 340 HRESULT SetRange([in] LONG anchor, [in] LONG active); 341 HRESULT InRange([in] ITextRange *range, [retval, out] LONG *pb); 342 HRESULT InStory([in] ITextRange *range, [retval, out] LONG *pb); 343 HRESULT IsEqual([in] ITextRange *range, [retval, out] LONG *pb); 344 HRESULT Select(); 345 HRESULT StartOf([in] LONG unit, [in] LONG extend, [retval, out] LONG *delta); 346 HRESULT EndOf([in] LONG unit, [in] LONG extend, [retval, out] LONG *delta); 347 HRESULT Move([in] LONG unit, [in] LONG count, [retval, out] LONG *delta); 348 HRESULT MoveStart([in] LONG unit, [in] LONG count, [retval, out] LONG *delta); 349 HRESULT MoveEnd([in] LONG unit, [in] LONG count, [retval, out] LONG *delta); 350 HRESULT MoveWhile([in] VARIANT *charset, [in] LONG count, [retval, out] LONG *delta); 351 HRESULT MoveStartWhile([in] VARIANT *charset, [in] LONG count, [retval, out] LONG *delta); 352 HRESULT MoveEndWhile([in] VARIANT *charset, [in] LONG count, [retval, out] LONG *delta); 353 HRESULT MoveUntil([in] VARIANT *charset, [in] LONG count, [retval, out] LONG *delta); 354 HRESULT MoveStartUntil([in] VARIANT *charset, [in] LONG count, [retval, out] LONG *delta); 355 HRESULT MoveEndUntil([in] VARIANT *charset, [in] LONG count, [retval, out] LONG *delta); 356 HRESULT FindText([in] BSTR str, [in] LONG ch, [in] LONG flags, [retval, out] LONG *len); 357 HRESULT FindTextStart([in] BSTR str, [in] LONG cch, [in] LONG flags, [retval, out] LONG *len); 358 HRESULT FindTextEnd([in] BSTR str, [in] LONG ch, [in] LONG flags, [retval, out] LONG *len); 359 HRESULT Delete([in] LONG unit, [in] LONG count, [retval, out] LONG *delta); 360 HRESULT Cut([out] VARIANT *var); 361 HRESULT Copy([out] VARIANT *var); 362 HRESULT Paste([in] VARIANT *var, [in] LONG format); 363 HRESULT CanPaste([in] VARIANT *var, [in] LONG format, [retval, out] LONG *pb); 364 HRESULT CanEdit([retval, out] LONG *pb); 365 HRESULT ChangeCase([in] LONG type); 366 HRESULT GetPoint([in] LONG type, [out] LONG *cx, [out] LONG *cy); 367 HRESULT SetPoint([in] LONG x, [in] LONG y, [in] LONG type, [in] LONG extend); 368 HRESULT ScrollIntoView([in] LONG value); 369 HRESULT GetEmbeddedObject([retval, out] IUnknown **ppv); 370} 371 372[ 373 uuid(8cc497c1-a1df-11ce-8098-00aa0047be5d), 374 object, 375 dual, 376 oleautomation 377] 378interface ITextSelection : ITextRange 379{ 380 [propget] 381 HRESULT Flags([retval, out] LONG *flags); 382 383 [propput] 384 HRESULT Flags([in] LONG flags); 385 386 [propget] 387 HRESULT Type([retval, out] LONG *type); 388 389 HRESULT MoveLeft([in] LONG unit, [in] LONG count, [in] LONG extend, [retval, out] LONG *delta); 390 HRESULT MoveRight([in] LONG unit, [in] LONG count, [in] LONG extend, [retval, out] LONG *delta); 391 HRESULT MoveUp([in] LONG unit, [in] LONG count, [in] LONG extend, [retval, out] LONG *delta); 392 HRESULT MoveDown([in] LONG unit, [in] LONG count, [in] LONG extend, [retval, out] LONG *delta); 393 HRESULT HomeKey([in] LONG unit, [in] LONG extend, [retval, out] LONG *delta); 394 HRESULT EndKey([in] LONG unit, [in] LONG extend, [retval, out] LONG *delta); 395 HRESULT TypeText([in] BSTR str); 396} 397 398[ 399 uuid(8cc497c3-a1df-11ce-8098-00aa0047be5d), 400 object, 401 dual, 402 oleautomation 403] 404interface ITextFont : IDispatch 405{ 406 [propget, id(DISPID_VALUE)] 407 HRESULT Duplicate([retval, out] ITextFont **font); 408 409 [propput, id(DISPID_VALUE)] 410 HRESULT Duplicate([in] ITextFont *font); 411 412 HRESULT CanChange([out] LONG *pB); 413 HRESULT IsEqual([in] ITextFont *font, [retval, out] LONG *pB); 414 HRESULT Reset([in] LONG value); 415 416 [propget] 417 HRESULT GetStyle([retval, out] LONG *value); 418 419 [propput] 420 HRESULT SetStyle([in] LONG value); 421 422 [propget] 423 HRESULT AllCaps([retval, out] LONG *value); 424 425 [propput] 426 HRESULT AllCaps([in] LONG value); 427 428 [propget] 429 HRESULT Animation([retval, out] LONG *value); 430 431 [propput] 432 HRESULT Animation([in] LONG value); 433 434 [propget] 435 HRESULT BackColor([retval, out] LONG *value); 436 437 [propput] 438 HRESULT BackColor([in] LONG value); 439 440 [propget] 441 HRESULT Bold([retval, out] LONG *value); 442 443 [propput] 444 HRESULT Bold([in] LONG value); 445 446 [propget] 447 HRESULT Emboss([retval, out] LONG *value); 448 449 [propput] 450 HRESULT Emboss([in] LONG value); 451 452 [propget] 453 HRESULT ForeColor([retval, out] LONG *value); 454 455 [propput] 456 HRESULT ForeColor([in] LONG value); 457 458 [propget] 459 HRESULT Hidden([retval, out] LONG *value); 460 461 [propput] 462 HRESULT Hidden([in] LONG value); 463 464 [propget] 465 HRESULT Engrave([retval, out] LONG *value); 466 467 [propput] 468 HRESULT Engrave([in] LONG value); 469 470 [propget] 471 HRESULT Italic([retval, out] LONG *value); 472 473 [propput] 474 HRESULT Italic([in] LONG value); 475 476 [propget] 477 HRESULT Kerning([retval, out] float *value); 478 479 [propput] 480 HRESULT Kerning([in] float value); 481 482 [propget] 483 HRESULT LanguageID([retval, out] LONG *value); 484 485 [propput] 486 HRESULT LanguageID([in] LONG value); 487 488 [propget] 489 HRESULT Name([retval, out] BSTR *value); 490 491 [propput] 492 HRESULT Name([in] BSTR value); 493 494 [propget] 495 HRESULT Outline([retval, out] LONG *value); 496 497 [propput] 498 HRESULT Outline([in] LONG value); 499 500 [propget] 501 HRESULT Position([retval, out] float *value); 502 503 [propput] 504 HRESULT Position([in] float value); 505 506 [propget] 507 HRESULT Protected([retval, out] LONG *value); 508 509 [propput] 510 HRESULT Protected([in] LONG value); 511 512 [propget] 513 HRESULT Shadow([retval, out] LONG *value); 514 515 [propput] 516 HRESULT Shadow([in] LONG value); 517 518 [propget] 519 HRESULT Size([retval, out] float *value); 520 521 [propput] 522 HRESULT Size([in] float value); 523 524 [propget] 525 HRESULT SmallCaps([retval, out] LONG *value); 526 527 [propput] 528 HRESULT SmallCaps([in] LONG value); 529 530 [propget] 531 HRESULT Spacing([retval, out] float *value); 532 533 [propput] 534 HRESULT Spacing([in] float value); 535 536 [propget] 537 HRESULT StrikeThrough([retval, out] LONG *value); 538 539 [propput] 540 HRESULT StrikeThrough([in] LONG value); 541 542 [propget] 543 HRESULT Subscript([retval, out] LONG *value); 544 545 [propput] 546 HRESULT Subscript([in] LONG value); 547 548 [propget] 549 HRESULT Superscript([retval, out] LONG *value); 550 551 [propput] 552 HRESULT Superscript([in] LONG value); 553 554 [propget] 555 HRESULT Underline([retval, out] LONG *value); 556 557 [propput] 558 HRESULT Underline([in] LONG value); 559 560 [propget] 561 HRESULT Weight([retval, out] LONG *value); 562 563 [propput] 564 HRESULT Weight([in] LONG value); 565} 566 567[ 568 uuid(8cc497c4-a1df-11ce-8098-00aa0047be5d), 569 object, 570 dual, 571 oleautomation 572] 573interface ITextPara : IDispatch 574{ 575 [propget, id(DISPID_VALUE)] 576 HRESULT Duplicate([retval, out] ITextPara **para); 577 578 [propput, id(DISPID_VALUE)] 579 HRESULT Duplicate([in] ITextPara *para); 580 581 HRESULT CanChange([out, retval] LONG *pB); 582 HRESULT IsEqual([in] ITextPara *para, [retval, out] LONG *pB); 583 HRESULT Reset([in] LONG value); 584 585 [propget] 586 HRESULT Style([retval, out] LONG *value); 587 588 [propput] 589 HRESULT Style([in] LONG value); 590 591 [propget] 592 HRESULT Alignment([retval, out] LONG *value); 593 594 [propput] 595 HRESULT Alignment([in] LONG value); 596 597 [propget] 598 HRESULT Hyphenation([retval, out]LONG *value); 599 600 [propput] 601 HRESULT Hyphenation([in] LONG value); 602 603 [propget] 604 HRESULT FirstLineIndent([retval, out] float *value); 605 606 [propget] 607 HRESULT KeepTogether([retval, out] LONG *value); 608 609 [propput] 610 HRESULT KeepTogether([in] LONG value); 611 612 [propget] 613 HRESULT KeepWithNext([retval, out] LONG *value); 614 615 [propput] 616 HRESULT KeepWithNext([in] LONG value); 617 618 [propget] 619 HRESULT LeftIndent([retval, out] float *value); 620 621 [propget] 622 HRESULT LineSpacing([retval, out] float *value); 623 624 [propget] 625 HRESULT LineSpacingRule([retval, out] LONG *value); 626 627 [propget] 628 HRESULT ListAlignment([retval, out] LONG *value); 629 630 [propput] 631 HRESULT ListAlignment([in] LONG value); 632 633 [propget] 634 HRESULT ListLevelIndex([retval, out] LONG *value); 635 636 [propput] 637 HRESULT ListLevelIndex([in] LONG value); 638 639 [propget] 640 HRESULT ListStart([retval, out] LONG *value); 641 642 [propput] 643 HRESULT ListStart([in] LONG value); 644 645 [propget] 646 HRESULT ListTab([retval, out] float *value); 647 648 [propput] 649 HRESULT ListTab([in] float value); 650 651 [propget] 652 HRESULT ListType([retval, out] LONG *value); 653 654 [propput] 655 HRESULT ListType([in] LONG value); 656 657 [propget] 658 HRESULT NoLineNumber([retval, out] LONG *value); 659 660 [propput] 661 HRESULT NoLineNumber([in] LONG value); 662 663 [propget] 664 HRESULT PageBreakBefore([retval, out] LONG *value); 665 666 [propput] 667 HRESULT PageBreakBefore([in] LONG value); 668 669 [propget] 670 HRESULT RightIndent([retval, out] float *value); 671 672 [propput] 673 HRESULT RightIndent([in] float value); 674 675 HRESULT SetIndents([in] float StartIndent, [in] float LeftIndent, [in] float RightIndent); 676 HRESULT SetLineSpacing([in] LONG LineSpacingRule, [in] float LineSpacing); 677 678 [propget] 679 HRESULT SpaceAfter([retval, out] float *value); 680 681 [propput] 682 HRESULT SpaceAfter([in] float value); 683 684 [propget] 685 HRESULT SpaceBefore([retval, out] float *value); 686 687 [propput] 688 HRESULT SpaceBefore([in] float value); 689 690 [propget] 691 HRESULT WidowControl([retval, out] LONG *value); 692 693 [propput] 694 HRESULT WidowControl([in] LONG value); 695 696 [propget] 697 HRESULT TabCount([retval, out] LONG *count); 698 699 HRESULT AddTab([in] float tbPos, [in] LONG tbAlign, [in] LONG tbLeader); 700 HRESULT ClearAllTabs(); 701 HRESULT DeleteTab([in] float tbPos); 702 HRESULT GetTab([in] LONG iTab, [out] float *ptbPos, [out] LONG *ptbAlign, [out] LONG *ptbLeader); 703} 704 705[ 706 uuid(8cc497c5-a1df-11ce-8098-00aa0047be5d), 707 object, 708 dual, 709 oleautomation 710] 711interface ITextStoryRanges : IDispatch 712{ 713 [restricted, hidden, id(DISPID_NEWENUM)] 714 HRESULT _NewEnum([retval, out] IUnknown **ppEnum); 715 716 [id(DISPID_VALUE)] 717 HRESULT Item([in] LONG index, [retval, out] ITextRange **range); 718 719 [propget] 720 HRESULT Count([retval, out] LONG *count); 721} 722 723} /* Library tom */ 724